Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 3 of 3

Thread: Issue with Dallas Temperature / One Wire library example

Threaded View

  1. #1
    Senior Member Constantin's Avatar
    Join Date
    Nov 2012
    Location
    In the yard with a 17' Dia. Ferris Wheel
    Posts
    1,408

    Issue with Dallas Temperature / One Wire library example

    Hi guys and gals,

    I found a bug in the Dallas Temperature library example and I wonder if anyone here has a suggestion how to fix it. If you have the Dallas Temperature Library, load the Multibus_simple example.

    If you try to compile, the compiler throws the following errors:
    Code:
    Multibus_simple:7: error: no matching function for call to 'OneWire::OneWire()'
     OneWire ds18x20[oneWirePinsCount];
                                     ^
    In file included from D:\Arduino\libraries\DallasTemperature\examples\Multibus_simple\Multibus_simple.ino:1:0:
    C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\OneWire/OneWire.h:269:5: note: candidate: OneWire::OneWire(uint8_t)
         OneWire( uint8_t pin);
         ^
    C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\OneWire/OneWire.h:269:5: note:   candidate expects 1 argument, 0 provided
    C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\OneWire/OneWire.h:254:7: note: candidate: constexpr OneWire::OneWire(const OneWire&)
    
     class OneWire
           ^
    C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\OneWire/OneWire.h:254:7: note:   candidate expects 1 argument, 0 provided
    C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\OneWire/OneWire.h:254:7: note: candidate: constexpr OneWire::OneWire(OneWire&&)
    C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\OneWire/OneWire.h:254:7: note:   candidate expects 1 argument, 0 provided
    
    Multibus_simple: In function 'void setup()':
    Multibus_simple:22: error: 'class OneWire' has no member named 'setPin'
         ds18x20[i].setPin(oneWirePins[i]);
                    ^
    Using library OneWire at version 2.3.2 in folder: C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\OneWire 
    Using library DallasTemperature at version 3.7.6 in folder: D:\Arduino\libraries\DallasTemperature 
    no matching function for call to 'OneWire::OneWire()'
    Is this a simple matter of going through the One-Wire library, note the changed functions, and then update the Dallas Temperature library?

    I hope I'm using the latest version of every library. Had the same issue with Arduino 1.8.6 on a different machine.

    Happy 4th everyone, Constantin
    Last edited by Constantin; 07-03-2017 at 02:17 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •