pstolarz / OneWireNg

Arduino 1-wire service library. OneWire compatible. Dallas thermometers support.
BSD 2-Clause "Simplified" License
89 stars 20 forks source link

Issue with Pi Pico #58

Closed GregDuckworthRenishaw closed 1 year ago

GregDuckworthRenishaw commented 1 year ago

Hi, I have been looking to use Onewire devices with the Raspberry Pi Pico. I have tried PaulStoffregen's library (https://github.com/PaulStoffregen/OneWire), but I only get crashes when searching for devices.

I found your library, which seems to suggest it works with the Pico so I added the library to my PlatformIO project but I am not having much luck.

I next tried the default example in both PlatformIO and in Arduino 2.2.0 but neither library would find the device attached to the Pico. To confirm my findings, I plugged in an Arduino Micro, using the original library, I was able to read the address of the device (therefore my pull-up is sufficient)

I can attach the project I used but it was quite literally a new Arduino IDE 2.2.0 install, automatic board manager for the board (Arduino MBED OS RP2040), only the OneWireNG library installed, and the DallasTemperature example used. Any ideas what I can try to debug this?

Thanks

Greg

pstolarz commented 1 year ago

What type of error do you get? Have you set GPIO number correctly for the example?

pstolarz commented 1 year ago

Just checked the DallasTemperature example on my Rpi Pico setup with the following cases:

All of them work fine, no issues observed.

GregDuckworthRenishaw commented 1 year ago

Thank you for the confirmation, I will go an recheck my setup and see what I can do.

Thanks

Greg

GregDuckworthRenishaw commented 1 year ago

Just to follow up: I have now got the DallasTemperature example working, thanks you.

The problem I had was the level converters that the breakout board had between the Pico and the output. More testing needed but it seems to be working well. Thanks for the confirmation :)

Greg