Hi guys, I created a project where I get the temperature and humidity and I would like to send the app but I can not in any way. Would you be kind enough to help me? thanks. This is the code I use:
#include <dht11.h>
#include <Wire.h>
#include <LCD.h>
#include <LiquidCrystal_I2C.h>
#include <SoftwareSerial.h>
SoftwareSerial SwSerial(10, 11); // RX, TX
#define BLYNK_PRINT SwSerial
#include <BlynkSimpleSerial.h>
char auth[] = "MY TOKEN";
LiquidCrystal_I2C lcd(0x27, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE); // Addr, En, Rw, Rs, d4, d5, d6, d7, backlighpin, polarity
float temperatura;
int lettura;
int pinSensore = 0;
dht11 DHT;
#define DHT11_PIN 2
void setup()
{
analogReference(INTERNAL);
Serial.begin(9600);
Blynk.begin(auth);
}
void loop()
{
Blynk.run();
lettura = analogRead(pinSensore);
temperatura = lettura / 9.31;
Serial.println(temperatura);
lcd.setCursor(0,0);
lcd.print("Temper.:");
lcd.setCursor(9, 0);
lcd.print(temperatura);
int chk;
Serial.print("\t");
chk = DHT.read(DHT11_PIN);
Serial.print(DHT.humidity);
Serial.print("\t");
lcd.setCursor(0,1);
lcd.print("Umidita':");
lcd.setCursor(10, 1);
lcd.print(DHT.humidity);
lcd.setCursor(12, 1);
lcd.print("%");
delay(5000);
temp();
}
void temp()
{
lcd.clear();
lcd.print("Invio a Blynk");
Blynk.virtualWrite(6, DHT.humidity);
lcd.setCursor(0,1);
lcd.print(DHT.humidity);
delay(2000);
loop();
}
I tried to put it in the app widget Gauge with input V6 and also a value display but nothing