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

Thread: Arduino UNO WIFI Rev2 with DS18B20 and library OneWire

  1. #1
    Junior Member
    Join Date
    Aug 2019
    Posts
    2

    Arduino UNO WIFI Rev2 with DS18B20 and library OneWire

    Hi,

    I use first an Arduino UNO Rev3 with DS18B20, and all works fine with the library oneWire standard.
    I try to change with an Arduino UNO WIFI Rev2, and the DS18B20 is no more detected !
    I try with another Arduino (same model), and I have the same problem.
    I make some mesure with my ascilloscope, and we see the problem (pink line = High level on one output to see when the functions 'begin and search are active, blue line= signal on the DS18B20 command:
    with the Arduino WIFI Rev2, nothing append on the output, I have tried others output with the same result!
    I try with the library OneWireNg, and with this library, it's OK
    I am not good enough to find what must be changed in the standard OneWire.h to correct the problem . After searching, I think the problem is in OneWire_direct_gpio.h (perhaps only a definition to add/change to be compliant with the new architecture of this new card ?)

    CardInfo :
    BN : Arduino Uno Wifi Rev2
    VID : 0x03eb
    PID : 0x2145

    The very simple test program is :


    #include <OneWire.h>

    int DS18S20_Pin = 7;
    int x = 0;
    OneWire ds(DS18S20_Pin);
    byte addr[8];

    void setup(void) {
    Serial.begin(9600);
    delay (500);
    digitalWrite (5, LOW);
    pinMode (5, OUTPUT);
    pinMode (4, INPUT_PULLUP); // pin 4 is connected directly to pin 5 (only for the oscilloscope - pink line)

    digitalWrite (5, HIGH);
    ds.begin (DS18S20_Pin);
    digitalWrite (5, LOW);

    digitalWrite (5, HIGH);
    ds.search(addr);
    digitalWrite (5, LOW);

    digitalWrite (5, HIGH);
    ds.reset_search();
    digitalWrite (5, LOW);
    }



    Thank in advance for your help

    Jean-Marc
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	Arduino UNO Rev3.png 
Views:	2 
Size:	73.3 KB 
ID:	17237   Click image for larger version. 

Name:	Arduino UNO WIFI Rev2.png 
Views:	1 
Size:	55.6 KB 
ID:	17238  


  2. #2
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,606
    Grab the latest OneWire from github.

  3. #3
    Junior Member
    Join Date
    Aug 2019
    Posts
    2
    Thank you for your response,
    With this last library (not referenced in Arduino), it is OK now !

    Jean-Marc

Posting Permissions

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