OneWire slave interrupt based lib

Working libraries, libraries being ported and related hardware
Posts: 18
Joined: Sun Feb 26, 2017 12:01 pm

OneWire slave interrupt based lib

Postby fari » Tue Feb 28, 2017 10:09 pm

Hello everybody!

I have migrated the library of Youen Neuoy to STM321f103 (Arduino). You have got the advantage, that the polling does not bloc your micro, since the onewire communication is interrupt based. The attached example simulates the DHT22 sensor
Some timing constants have to be adjusted, if you change your Arduino compiler options!
I have fixed one bug, which caused a total deadlock of the onewire network. Still there are few telegram errors (app. 1%)
Unfortunately I do not own a logic analyser and could not trace the cause of erroneous telegrams .

I have signed into gitHUB and will upload the library soon!
(48.42 KiB) Downloaded 29 times

User avatar
Posts: 5470
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia

Re: OneWire slave interrupt based lib

Postby RogerClark » Tue Feb 28, 2017 11:31 pm


Thanks for posting

I2C slave is / was a noticeable gap in the core functionality

Posts: 1
Joined: Mon Apr 24, 2017 10:32 am

Re: OneWire slave interrupt based lib

Postby youen » Mon Apr 24, 2017 10:38 am

@RogerClark I suppose you meant 1-wire and not I2C ?

@fari Thanks for the fix of the deadlock, I observed it a few times and had another report of the bug, but didn't find the time to really look at it yet. I'm curious of what it was, I'll compare your version to see what you did. You don't mind if I merge that on github? Or maybe you want to commit your work on github first to properly appear in the commit history?

Return to “Libraries & Hardware”

Who is online

Users browsing this forum: No registered users and 1 guest