Dallas DS18B20 compiling error
-
Hi All,
I am having a problem with compiling the code for 3 Dallas DS18B20 temperature sensors.
I am using the IDE 1.6.12 with fresh library's imported as per these instructions.The errors are in this piece of code:
// query conversion time and sleep until conversion completed int16_t conversionTime = sensors.millisToWaitForConversion(sensors.getResolution()); // sleep() call can be replaced by wait() call if node need to process incoming messages (or if node is repeater) sleep(conversionTime);The errors I am getting are as follows:
In file included from C:\Users\johan\Documents\Arduino\examples\DallasTemperatureSensor\DallasTemperatureSensor.ino:37:0: C:\Users\johan\Documents\Arduino\libraries\DallasTemperature/DallasTemperature.h: In function 'void loop()': C:\Users\johan\Documents\Arduino\libraries\DallasTemperature/DallasTemperature.h:252:13: error: 'int16_t DallasTemperature::millisToWaitForConversion(uint8_t)' is private int16_t millisToWaitForConversion(uint8_t); ^ DallasTemperatureSensor:85: error: within this context int16_t conversionTime = sensors.millisToWaitForConversion(sensors.getResolution()); ^ exit status 1 within this contextAt this moment I am completely clueless on how to continue.
Thanx in advance!
Best regards Johan -
Hi All,
I am having a problem with compiling the code for 3 Dallas DS18B20 temperature sensors.
I am using the IDE 1.6.12 with fresh library's imported as per these instructions.The errors are in this piece of code:
// query conversion time and sleep until conversion completed int16_t conversionTime = sensors.millisToWaitForConversion(sensors.getResolution()); // sleep() call can be replaced by wait() call if node need to process incoming messages (or if node is repeater) sleep(conversionTime);The errors I am getting are as follows:
In file included from C:\Users\johan\Documents\Arduino\examples\DallasTemperatureSensor\DallasTemperatureSensor.ino:37:0: C:\Users\johan\Documents\Arduino\libraries\DallasTemperature/DallasTemperature.h: In function 'void loop()': C:\Users\johan\Documents\Arduino\libraries\DallasTemperature/DallasTemperature.h:252:13: error: 'int16_t DallasTemperature::millisToWaitForConversion(uint8_t)' is private int16_t millisToWaitForConversion(uint8_t); ^ DallasTemperatureSensor:85: error: within this context int16_t conversionTime = sensors.millisToWaitForConversion(sensors.getResolution()); ^ exit status 1 within this contextAt this moment I am completely clueless on how to continue.
Thanx in advance!
Best regards Johan@JohanRC you need to install the dallas library available in https://github.com/mysensors/MySensorsArduinoExamples
See also
https://forum.mysensors.org/topic/2902/dallas-temp-failure-to-compile/21
https://forum.mysensors.org/topic/4828/temperature-sensor/3
https://forum.mysensors.org/topic/2434/dallas-temperature-sensor-compiling-error/18 -
Thanx 😀
The compiling errors are now solved!Unfortunately the problem is not solved yet, the led L flashes a couple of times when starting and after that it starts to burn softly.
It looks like it stops working after this.The Nano and Dallas sensors are connected OK, when I check it with a simple sketch I can reed the temperatures through the serial connection.

Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login