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 context
    
    

    At this moment I am completely clueless on how to continue.

    Thanx in advance!
    Best regards Johan


  • Mod



  • 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.

    alt text


Log in to reply
 

Suggested Topics

0
Online

11.2k
Users

11.1k
Topics

112.5k
Posts