danjperron / BitBangingDS18B20

Method to access the DS18B20 sensor using Rapsberry Pi GPIO
41 stars 29 forks source link

Will this work on WiringPi clones (BananaPi, OrangePi, Odroid etc)? #6

Closed tosiara closed 6 years ago

tosiara commented 6 years ago

Will this work on other devices (BananaPi, OrangePi, Odroid etc) that support WIringPi?

danjperron commented 6 years ago

I'm using direct access to the GPIO registers. If you are able to map the GPIO registers of the devices it should works. For this you will need to go deeper into the harwdare.

I do have a BananaPi but I can't work on it. It is my NAS/OpenVPN system.

I could check with my Rock64 . This will have to wait a few weeks.

tosiara commented 6 years ago

Sad. I wish somebody implemented DS18B20 reading in high res using WiringPi so the code can be used on different boards

RpiController commented 6 years ago

Dan, have you had a chance to look at my raspberrypi.org post in the "DS18B20 Low Refresh Rate" topic? I know it's kind of lengthy, but basically I just want to know the best way to read DS18B20 sensors with your code inside of a python program.

danjperron commented 6 years ago

It's a long time that I didn't touch WriringPi. I just look at the code inside WiringPi and it won't work at all. Everything is based on single bit. Even the function to write byte ON the GPIO loop around for bit manipulation.

Normally I should have read "DS18B20 Low refresh Rate" but I didn't touch the DS18B20 sensor on the Pi for long time since all my temperature sensor are on very low power arduino with a nRF24L01 transmitter link to a raspberry Pi. https://github.com/danjperron/nRF24L01_With_Sensor.

The best way to implement in Python will be to create a python module. This is not to hard and quite easy to do. check my example about the free running counter inside the Raspberry Pi that I just push . https://github.com/danjperron/PiFreeRunningCounter