Hi all,
I’m using Arduino Uno with Arduino Ethernet Shield 2 (W5500) with 1x DS18B20 temperature sensor.
When I open serial monitor, it connects to the Blynk cloud successfully, also on the app it says that the project is also connected and online but for some reason I am getting no change in values on the app.
My project settings are:
Board: Arduino Uno
Connection type: Ethernet
and I’ve set a gauge widget using V1 pin, as I’ve also configured it in the code.
I have the latest Blynk library version for Arduino and the latest version of the app on my phone.
#define BLYNK_PRINT Serial // Comment this out to disable prints and save space
#include <SPI.h>
#include <Ethernet2.h>
#include <BlynkSimpleEthernet2.h>
#include <OneWire.h>
#include <DallasTemperature.h>
#define ONE_WIRE_BUS 2
OneWire oneWire(ONE_WIRE_BUS);
DallasTemperature sensors(&oneWire);
char auth[] = " xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ";
void setup()
{
Serial.begin(9600);
Blynk.begin(auth);
sensors.begin();
}
void sendTemps()
{
sensors.requestTemperatures(); // Polls the sensors
float tempC = sensors.getTempCByIndex(0); // Gets first probe on wire in lieu of by address
Blynk.virtualWrite(V1, tempC);
}
void loop()
{
Blynk.run();
}