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 Temperature Sensor - compiling error

Dallas Temperature Sensor - compiling error

Scheduled Pinned Locked Moved Troubleshooting
18 Posts 10 Posters 11.9k Views 3 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.
  • C ciscokid

    Hi All
    I am trying out the sketch for the Dallas Temperature sensor as per the MySensors tutorial.
    When I verify the sketch I get the error:

    In file included from C:\Users\WALLIS~1.MET\AppData\Local\Temp\arduino_770bd48bc56f53e10c3afe135558f414\DallasTemperatureSensor.ino:29:0:
    
    \\metro-file\User-Folders\walliss0019\Documents\Arduino\libraries\DallasTemperature/DallasTemperature.h: In function 'void loop()':
    
    DallasTemperature.h:249: error: 'int16_t DallasTemperature::millisToWaitForConversion(uint8_t)' is private
    
         int16_t millisToWaitForConversion(uint8_t);
    
                 ^
    
    DallasTemperatureSensor:79: error: within this context
    
       int16_t conversionTime = sensors.millisToWaitForConversion(sensors.getResolution());
    
    

    I see from another user he had the same problem from the "Comments"section (see user KRAX at http://www.mysensors.org/build/temp)

    MySensors came back saying that the error was due to a missing library "Sorry, had a missing DallasTemperature library. This has been fixed now. Please clone sketch again (with libraries)."

    My question is how do I do this?

    I have the Arduino 1.6.6 IDE. I have downloaded the latest sketch from the link provided etc but the same error persists.
    Can anyone help me resolve this?
    Cheers

    hekH Offline
    hekH Offline
    hek
    Admin
    wrote on last edited by
    #2

    @ciscokid said:

    My question is how do I do this?

    That applied to the online codebender builder.

    When compiling locally on your computer you have to install the dallas library. It's included in the zip you downloaded.

    1 Reply Last reply
    1
    • C Offline
      C Offline
      ciscokid
      wrote on last edited by
      #3

      Thanks hek - downloaded the zip and did the install via zip libraries, however the problem persists. Can you let me know if there is a newer library i could download and point me in the right direction?
      Many thanks !

      1 Reply Last reply
      0
      • M Offline
        M Offline
        malarcy
        wrote on last edited by
        #4

        not sure what the forum etiquette is but +1 or "me too" - same error on 1.6.6 ide - I have moved all the libraries etc from the latest mysensors download to the libraries area - other samples build ok - like binaryswitch.

        M 1 Reply Last reply
        0
        • M malarcy

          not sure what the forum etiquette is but +1 or "me too" - same error on 1.6.6 ide - I have moved all the libraries etc from the latest mysensors download to the libraries area - other samples build ok - like binaryswitch.

          M Offline
          M Offline
          malarcy
          wrote on last edited by
          #5

          @malarcy LIkely bad form replying to my own message - but I found I can work around it by removing the "offending" couple of lines - the temp sensor works - but I suspect that if I chain more together then I might get timing errors and problems.

          I removed these lines

          // 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)
            gw.sleep(conversionTime);```
          

          This got me working for testing and playing - but would like some help on the proper solution.

          1 Reply Last reply
          0
          • C Offline
            C Offline
            ciscokid
            wrote on last edited by
            #6

            Just bumping this thread - would really like to have a definitive answer. There must be some clever guys out there that can shed some light :) ?

            S 1 Reply Last reply
            0
            • C ciscokid

              Just bumping this thread - would really like to have a definitive answer. There must be some clever guys out there that can shed some light :) ?

              S Offline
              S Offline
              Samuel235
              Hardware Contributor
              wrote on last edited by
              #7

              @ciscokid Just to let you know, I'm currently using the 1.5 and the development directory/branch and mine compiles perfectly fine. Try downloading the libraries again and clean install them.

              MySensors 2.1.1
              Controller - OpenHAB (Virtual Machine)
              Gateway - Arduino Mega MQTT Gateway W5100

              1 Reply Last reply
              0
              • G Offline
                G Offline
                gmccarthy
                wrote on last edited by
                #8

                I've been using the Dallas libraries on Arduino 1.6.5 with no issues. Try redownloading Arduino and mysensors api and install into a different directory.

                1 Reply Last reply
                0
                • E Offline
                  E Offline
                  erpa
                  wrote on last edited by
                  #9

                  +1 for me too, same compiling error.
                  Went from IDE 1.6.6 to 1.6.5 as suggested, but have the same error.
                  Can someone help?
                  Thanks

                  1 Reply Last reply
                  0
                  • hekH Offline
                    hekH Offline
                    hek
                    Admin
                    wrote on last edited by
                    #10

                    You're probably using and old/different Dallas library. Sure you use the one provided in the MySensors bundle?

                    1 Reply Last reply
                    0
                    • E Offline
                      E Offline
                      erpa
                      wrote on last edited by
                      #11

                      That did the trick, Thanx!!
                      Copied Dallas directory from "mysensors master" to Arduino library location.
                      Works with 1.6.6

                      S 1 Reply Last reply
                      0
                      • S Offline
                        S Offline
                        Samuel235
                        Hardware Contributor
                        wrote on last edited by
                        #12

                        One of the first steps in the troubleshooting process, that i have learnt recently, is exactly this. Making sure the libs are up to date, or even better, not conflicting/co-operating. Hek is the master at pointing out this to us all here ;)

                        MySensors 2.1.1
                        Controller - OpenHAB (Virtual Machine)
                        Gateway - Arduino Mega MQTT Gateway W5100

                        1 Reply Last reply
                        0
                        • O Offline
                          O Offline
                          oded00
                          wrote on last edited by
                          #13
                          This post is deleted!
                          1 Reply Last reply
                          0
                          • mfalkviddM Offline
                            mfalkviddM Offline
                            mfalkvidd
                            Mod
                            wrote on last edited by
                            #14

                            @oded00 Follow the instructions at http://www.mysensors.org/about/arduino#installing-the-sensor-libraries
                            Make sure you delete everything in the libraries folder before extracting the content of the MySensors library zip archive to delete any old versions.

                            1 Reply Last reply
                            0
                            • markushM Offline
                              markushM Offline
                              markush
                              wrote on last edited by
                              #15

                              Sorry guys - is this error fixed? Have the same problem after installing fresh dev branch 2.0

                              The message on compiling is: is private ... within this context

                              I have declard the section in DallasTemperature.h line 249 in public: and now it works?!?

                              Pleasy try it - for me it works :+1:

                              1 Reply Last reply
                              0
                              • E erpa

                                That did the trick, Thanx!!
                                Copied Dallas directory from "mysensors master" to Arduino library location.
                                Works with 1.6.6

                                S Offline
                                S Offline
                                Samuel235
                                Hardware Contributor
                                wrote on last edited by
                                #16

                                @markush - A few comments above is this one:

                                That did the trick, Thanx!!
                                Copied Dallas directory from "mysensors master" to Arduino library location.
                                Works with 1.6.6

                                That is in reply to Hek's response of:

                                You're probably using and old/different Dallas library. Sure you use the one provided in the MySensors bundle?

                                So firstly, I would double check that you have the correct Dallas Lib, the one that is in the MySensors bundle. Also, as mfalkvidd says above your comment, make sure you have extracted the Libs from MySensors correctly.

                                MySensors 2.1.1
                                Controller - OpenHAB (Virtual Machine)
                                Gateway - Arduino Mega MQTT Gateway W5100

                                1 Reply Last reply
                                0
                                • markushM Offline
                                  markushM Offline
                                  markush
                                  wrote on last edited by
                                  #17

                                  Yes i have read the comments. Make two fresh installs - with the same error on both.

                                  Using Arduino 1.6.7 and the dev branch 2.0

                                  I'm using a network, means my Arduino Sketchbook directory is on a server. Perhaps this is the problem....?

                                  1 Reply Last reply
                                  0
                                  • Peter MietlowskiP Offline
                                    Peter MietlowskiP Offline
                                    Peter Mietlowski
                                    wrote on last edited by
                                    #18

                                    I had the same error and it turned out that for some reason it was finding the library in a folder in My Documents and also in the Arduino install folder. I renamed the copy in My Documents (I don't remember putting it there so maybe it was older version?) and all was well.

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


                                    11

                                    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