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 2.0k 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.
  • J Offline
    J 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
    • J 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 Online
      mfalkviddM Online
      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
      • J Offline
        J 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

        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
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        27

        Online

        12.0k

        Users

        11.2k

        Topics

        113.4k

        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