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 Temp failure to compile

Dallas Temp failure to compile

Scheduled Pinned Locked Moved Troubleshooting
23 Posts 11 Posters 7.9k Views 10 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.
  • tlpeterT tlpeter

    Is there any resolution for this?
    I am facing the same problem and i do not know how to fix this.

    Edit, i found something.
    You need to comment out these lines:

    Only this way it compiles and sensors do work.
    I don't know what happens so maybe somebody with knowledge can explain this?

    //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);```
    Boots33B Offline
    Boots33B Offline
    Boots33
    Hero Member
    wrote on last edited by Boots33
    #11

    @tlpeter yes there seems to be a problem once you update the library. Even if you roll back the problem persists. If you want to use the MySensors Dallas temp sketch as it is then you need to manually replace the library with the older 3.7.2 and then it will work.

    I have uploaded the library in zip format. @hek I hope that it is OK to upload zip files

    0_1470911411126_DallasTemperature.zip

    1 Reply Last reply
    0
    • Nca78N Offline
      Nca78N Offline
      Nca78
      Hardware Contributor
      wrote on last edited by
      #12
      error: 'int16_t DallasTemperature::millisToWaitForConversion(uint8_t)' is private
      

      You are using an old version of the library, if you get the library from MySensors GitHub then the method is not private (like in the current version of the library you use) and it will compile.

      1 Reply Last reply
      0
      • tlpeterT Offline
        tlpeterT Offline
        tlpeter
        wrote on last edited by
        #13

        Thanks, that works fine.
        How come that i have an old library? i use the 2.0.0 version
        Is this perhaps a known issue which will be fixed soon?

        Nca78N 1 Reply Last reply
        0
        • tbowmoT Offline
          tbowmoT Offline
          tbowmo
          Admin
          wrote on last edited by
          #14

          It's not related to mysensors core library.

          Also, as mentioned before in this thread, the Dallas library that is in the arduino examples repository, is working.

          Are you sure that you are using the right libraries?

          1 Reply Last reply
          0
          • tlpeterT Offline
            tlpeterT Offline
            tlpeter
            wrote on last edited by tlpeter
            #15

            I tihnk so, i used libraries that i was pointed too as they are moved.
            All other sensors i have been playing with are working fine.

            1 Reply Last reply
            0
            • tlpeterT tlpeter

              Thanks, that works fine.
              How come that i have an old library? i use the 2.0.0 version
              Is this perhaps a known issue which will be fixed soon?

              Nca78N Offline
              Nca78N Offline
              Nca78
              Hardware Contributor
              wrote on last edited by
              #16

              @tlpeter it is because now the libraries which are not managed by MySensors project were moved to another repository. It means if you only updated MySensors, you kept the old libraries.

              1 Reply Last reply
              0
              • tlpeterT Offline
                tlpeterT Offline
                tlpeter
                wrote on last edited by
                #17

                I removed everything and started from scratch and after that i copied the mysensors-master library.

                Nca78N 1 Reply Last reply
                0
                • tlpeterT tlpeter

                  I removed everything and started from scratch and after that i copied the mysensors-master library.

                  Nca78N Offline
                  Nca78N Offline
                  Nca78
                  Hardware Contributor
                  wrote on last edited by
                  #18

                  @tlpeter said:

                  I removed everything and started from scratch and after that i copied the mysensors-master library.

                  "removed everything" in MySensors directory ? That's not enough, as the third party libraries are in the libraries directory of Arduino

                  1 Reply Last reply
                  0
                  • tlpeterT Offline
                    tlpeterT Offline
                    tlpeter
                    wrote on last edited by
                    #19

                    I uninstalled that too.
                    I really removed everything.
                    Uninstalled arduino and removed the folders in the program files folder and the my documents folder too.

                    1 Reply Last reply
                    0
                    • HonkH Offline
                      HonkH Offline
                      Honk
                      wrote on last edited by
                      #20

                      why not put the function millisToWaitForConversion into the example.
                      I like to have the latest libary available for sensors. It can be loaded with the arduino studio.
                      Read the min wait time is pretty easy. it is just a switch case based on the datasheet.

                      // returns number of milliseconds to wait till conversion is complete (based on IC datasheet)
                      int16_t DallasTemperature::millisToWaitForConversion(uint8_t bitResolution)
                      {
                          switch (bitResolution)
                          {
                          case 9:
                              return 94;
                          case 10:
                              return 188;
                          case 11:
                              return 375;
                          default:
                              return 750;
                          }
                      }
                      
                      1 Reply Last reply
                      0
                      • tbowmoT Offline
                        tbowmoT Offline
                        tbowmo
                        Admin
                        wrote on last edited by
                        #21

                        @tlpeter

                        Ok, so you are using a newer version of the DallasTemperature library, than the one that we have supplied in our MySensorsArduinoExamples. And yes, it seems that they have made millisToWaitForConversion() a private function there. Or someone has changed the library we included in our repository at some point in time, so it is made public.

                        There are 2 options, as I see it :)

                        1. Use the library that we have supplied in MySensorsArduinoExamples
                        2. Make a PR against the original library, found here, and make the millisToWaitForConversion() public, and get them to release a new version of the library.

                        :)

                        mfalkviddM 1 Reply Last reply
                        0
                        • tbowmoT tbowmo

                          @tlpeter

                          Ok, so you are using a newer version of the DallasTemperature library, than the one that we have supplied in our MySensorsArduinoExamples. And yes, it seems that they have made millisToWaitForConversion() a private function there. Or someone has changed the library we included in our repository at some point in time, so it is made public.

                          There are 2 options, as I see it :)

                          1. Use the library that we have supplied in MySensorsArduinoExamples
                          2. Make a PR against the original library, found here, and make the millisToWaitForConversion() public, and get them to release a new version of the library.

                          :)

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

                          The millisToWaitForConversion has always been private in milesburton's library, so the answer is the latter: someone has changed the library we included in our repository at some point in time.

                          I found the answer in git:

                          commit e47e596075282b122ac5d266ec6ad5c60ca8c978
                          Author: Robo Print <roboprint@users.noreply.github.com>
                          Date:   Sat Jun 27 23:00:37 2015 +0200
                          
                              Make DallasTemperature::millisToWaitForConversion() publicly available
                          

                          I agree with tbowmo's options.

                          1 Reply Last reply
                          0
                          • R Offline
                            R Offline
                            robosensor
                            wrote on last edited by
                            #23

                            It's my code :scream:

                            I changed this method from private to public, this function is used to determine wait time needed for right non-blocking wait call. Seems like I should make PR to original library instead of modifying MYS copy.

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


                            13

                            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