Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. Troubleshooting
  3. Dallas DS18B20 compiling error

Dallas DS18B20 compiling error

Scheduled Pinned Locked Moved Troubleshooting
3 Posts 2 Posters 1.7k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • JohanRCJ Offline
    JohanRCJ Offline
    JohanRC
    wrote on last edited by
    #1

    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

    RaspberryPi Domoticz - Serial gateway - 12 nodes and counting

    mfalkviddM 1 Reply Last reply
    0
    • JohanRCJ JohanRC

      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

      mfalkviddM Offline
      mfalkviddM Offline
      mfalkvidd
      Mod
      wrote on last edited by mfalkvidd
      #2

      @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

      1 Reply Last reply
      0
      • JohanRCJ Offline
        JohanRCJ Offline
        JohanRC
        wrote on last edited by JohanRC
        #3

        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

        RaspberryPi Domoticz - Serial gateway - 12 nodes and counting

        1 Reply Last reply
        1
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        15

        Online

        11.7k

        Users

        11.2k

        Topics

        113.1k

        Posts


        Copyright 2025 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • MySensors
        • OpenHardware.io
        • Categories
        • Recent
        • Tags
        • Popular