Geekzone: technology news, blogs, forums
Guest
Welcome Guest.
You haven't logged in yet. If you don't have an account you can register now.


linw

2893 posts

Uber Geek
+1 received by user: 1205


#273301 15-Aug-2020 14:20
Send private message

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);
}


Filter this topic showing only the reply marked as answer Create new topic
linw

2893 posts

Uber Geek
+1 received by user: 1205


  #2542057 16-Aug-2020 09:31
Send private message

OK, have found the problem is because the Blynk project is only accepting whole numbers! Can't remember how I got the previous Blynk project to accept decimals. More research!! 




linw

2893 posts

Uber Geek
+1 received by user: 1205


  #2542140 16-Aug-2020 11:22
Send private message

Grrrr, problem was older esp8266 board core. Mine was v2.3.0 and now is 2.7.4. That old one had the floating point bug.

 

 


Filter this topic showing only the reply marked as answer Create new topic








Geekzone Live »

Try automatic live updates from Geekzone directly in your browser, without refreshing the page, with Geekzone Live now.



Are you subscribed to our RSS feed? You can download the latest headlines and summaries from our stories directly to your computer or smartphone by using a feed reader.