Dear everyone,
I follow all steps which I search on th Internet
1.Install app blynk on my android
2.Install library blynk for arduino
Here my code
#include <SoftwareSerial.h>
SoftwareSerial SwSerial(0, 1); // RX, TX
#define BLYNK_PRINT SwSerial
#include <BlynkSimpleSerial.h>
#include <DHT.h>
#define DHTTYPE DHT11 // DHT 11
#define DHTPIN 6
#define PIN_UPTIME 5
DHT dht(DHTPIN, DHTTYPE);
// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "e4323fae745f44b0a9a344a02709465c";
void setup()
{
SwSerial.begin(9600);
Blynk.begin(auth);
dht.begin();
// Default baud rate is 9600. You could specify it like this:
//Blynk.begin(auth, 57600);
}
void loop()
{
// Wait a few seconds between measurements.
delay(1000);
// Reading temperature or humidity takes about 250 milliseconds!
// Sensor readings may also be up to 2 seconds 'old' (its a very slow sensor)
float h = dht.readHumidity();
// Read temperature as Celsius (the default)
float t = dht.readTemperature();
// Read temperature as Fahrenheit (isFahrenheit = true)
float f = dht.readTemperature(true);
// Check if any reads failed and exit early (to try again).
if (isnan(h) || isnan(t) || isnan(f)) {
Serial.println("Failed to read from DHT sensor!");
return;
}
// Compute heat index in Fahrenheit (the default)
float hif = dht.computeHeatIndex(f, h);
// Compute heat index in Celsius (isFahreheit = false)
float hic = dht.computeHeatIndex(t, h, false);
Blynk.virtualWrite(PIN_UPTIME, h);
Blynk.run();
}
3.Run blynk-ser.bat successfully
C:\Users\vvv\Downloads\arduino-nightly-windows\arduino-nightly\libraries\blynk-l
ibrary-0.3.3\scripts>blynk-ser.bat
Connecting device at COM3 to cloud.blynk.cc:8442…
OpenC0C("\.\COM3", baud=9600, data=8, parity=no, stop=1) - OK
Connect(“cloud.blynk.cc”, “8442”) - OK
InOut() START
DSR is OFF
When I run project from blynk, it said that my arduino nano is not in network.
Please help me.