Your new topic does not fit any of the above??? Check first. Then post here. Thanks.

Moderator: igrr

User avatar
By OliverNZ
#30712 Not using the DS18B20 in parasitic mode. Running it at 3.3V though. And readings are 3min/180sec apart. So I shouldn't have any issues with that. Also when I do the "on-demand" http call (instead of the regular HTTP post to a server) all is fine and I get the correct temp back.
User avatar
By OliverNZ
#30713 Ah sorry, just saw that I didn't include my DS18B20 code in the example above. Straightforward copy of example code...

Code: Select all...
#include <OneWire.h>
#include <DallasTemperature.h>
...
#define ONE_WIRE_BUS 5
...
OneWire oneWire(ONE_WIRE_BUS);
DallasTemperature sensors(&oneWire);
float temp;
...
void setup(void)
{
 ...
  sensors.begin();
 ...
}
...
void uploadTemp(void)
{
   sensors.requestTemperatures();
   temp = sensors.getTempCByIndex(0));
   ...
   // Upload code
  ....
}
User avatar
By xtal
#30718
OliverNZ wrote:Not using the DS18B20 in parasitic mode. Running it at 3.3V though. And readings are 3min/180sec apart. So I shouldn't have any issues with that. Also when I do the "on-demand" http call (instead of the regular HTTP post to a server) all is fine and I get the correct temp back.


"on-demand" http call (instead of the regular HTTP post to a server)

Could you elaborate on this a bit , I,ve only been playing with HTTP for about 2 weeks.
User avatar
By OliverNZ
#30719 Oh sorry, I have two functions that I call. They contain EXACTLY the same code for the DS18B20 (seen above). One gets called by a timer every 180 seconds. It does a call to a web server that records the temperature. The other is called by the webserver on the ESP-12E when I access http://.../getTemp and returns the temp float from the DS18B20.