It just suddenly stoped working… I connected it to my PC to look at the Serial output:
[29] Blynk v0.3.1
[530] Connecting to NETGEAR69
ATE0
[1546] Failed to disable Echo
AT+CIPCLOSE
AT+CIPSTART="TCP","cloud.blynk.cc",8442
AT+CIPCLOSE
AT+CIPSTART="TCP","cloud.blynk.cc",8442
AT+CIPCLOSE
AT+CIPSTART="TCP","cloud.blynk.cc",8442
AT+CIPCLOSE
AT+CIPSTART="TCP","cloud.blynk.cc",8442
AT+CIPCLOSE
AT+CIPSTART="TCP","cloud.blynk.cc",8442
AT+CIPCLOSE
AT+CIPSTART="TCP","cloud.blynk.cc",8442
AT+CIPCLOSE
AT+CIPSTART="TCP","cloud.blynk.cc",8442
AT+CIPCLOSE
AT+CIPSTART="TCP","cloud.blynk.cc",8442
AT+CIPCLOSE
AT+CIPSTART="TCP","cloud.blynk.cc",8442
AT+CIPCLOSE
AT+CIPSTART="TCP","cloud.blynk.cc",8442
I used it to run a relay (I know how to connect it (Diode etc.)) and some sensors. I think something was wrong with the power connection (the ESP8266 got really hot (I used a logic converter and 3.3V)
Hardware: Arduino Nano, ESP8266 WiFi module, HTU21D Humidity Sensor (Sparkfun)
And here is the code:
/**************************************************************
* Blynk is a platform with iOS and Android apps to control
* Arduino, Raspberry Pi and the likes over the Internet.
* You can easily build graphic interfaces for all your
* projects by simply dragging and dropping widgets.
*
* Downloads, docs, tutorials: http://www.blynk.cc
* Blynk community: http://community.blynk.cc
* Social networks: http://www.fb.com/blynkapp
* http://twitter.com/blynk_app
*
* Blynk library is licensed under MIT license
* This example code is in public domain.
*
**************************************************************
*
* This example shows how to use ESP8266 Shield via Hardware Serial
* (on Mega, Leonardo, Micro...) to connect your project to Blynk.
*
* Note: Ensure a stable serial connection to ESP8266!
* Firmware version 1.0.0 (AT v0.22) or later is needed.
* You can change ESP baud rate. Connect to AT console and call:
* AT+UART_DEF=115200,8,1,0,0
*
* Change WiFi ssid, pass, and Blynk auth token to run :)
* Feel free to apply it to any other example. It's simple!
*
**************************************************************/
//#define BLYNK_DEBUG
#define BLYNK_PRINT Serial // Comment this out to disable prints and save space
#include <ESP8266_HardSer.h>
#include <BlynkSimpleShieldEsp8266_HardSer.h>
#include <SimpleTimer.h>
#include "SparkFunHTU21D.h"
HTU21D myHumidity;
// Set ESP8266 Serial object
#define EspSerial Serial
ESP8266 wifi(EspSerial);
// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "**************************";
void setup()
{
// Set console baud rate
Serial.begin(9600);
delay(10);
// Set ESP8266 baud rate
EspSerial.begin(9600);
delay(10);
myHumidity.begin();
delay(10);
Blynk.begin(auth, wifi, "NETGEAR69", "*****************");
//here
//here
}
//here2
void humi()
{
float humd = myHumidity.readHumidity();
Blynk.virtualWrite(5, humd);
}
void tempe()
{
float temp = myHumidity.readTemperature();
Blynk.virtualWrite(6, temp);
}
//here2
BLYNK_READ(V5) // Widget in the app READs Virtal Pin V5 with the certain frequency
{
// This command writes Arduino's uptime in seconds to Virtual Pin V5
humi();
}
BLYNK_READ(V6) // Widget in the app READs Virtal Pin V5 with the certain frequency
{
// This command writes Arduino's uptime in seconds to Virtual Pin V5
tempe();
}
void loop()
{
Blynk.run();
}