Wonder if someone can help with this one. For a couple of years I have used a wemos D1 mini with waterproof DS18B20 sensor to transmit my grog still temp to my Blynk app on my phone.
Unfortunately, the mini met a fatal end (don't ask!) and I bought a Wemos D1 R2 as a sub. I am using the same sketch as before with pin D4 for input and V5 for the Blynk virtual write. I did update the Arduino prog, though, from 1.8.1 to 1.8.13.
The code compiles, uploads and works and it writes output to the com3 monitor as before. The wifi is established and ostensibly working. The Blynk app sees it online. The Blynk authority data has been updated.
The Blynk project has a gauge widget 0-100 with V5 pin and read rate set to 2 sec. All looks fine apart from the fact there is no data shown!
Have done some searching with no result and have run out of ideas so maybe someone here has a suggestion or two.
Code excerpts below:-
#define BLYNK_PRINT Serial // Comment this out to disable prints and save space
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
#include <OneWire.h>
// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
OneWire ds(D4); // on pin D4 op wemos d1 (a 4.7K resistor is necessary)
char auth[] = "xxxxxxxxxxxx";
void setup(void)
{
(D4, INPUT_PULLUP);
Serial.begin(9600);
Blynk.begin(auth, "xxxxx", "yyyyyyyyyyyy");
}
And:-
Blynk.virtualWrite(V5, celsius + 0.71);
delay(10000);
}