thwill
 Guru
 Joined: 16/09/2019 Location: United KingdomPosts: 4367 |
| Posted: 01:31pm 16 Feb 2025 |
|
|
|
Peter,
What should happen when a byte transitions from 0x7F => 0xFF ? Presumably that's treated as a single bit being set and you want a 7 ?
But if a byte transitions from 0x7F => 0x00 then that should return a 64 ?
I ask because this is what down & up do on my PiHut controller and I suspect those are meant to be treated as 8 bit values, 255 (down), 127 (none), 0 (up).
EDIT: I suppose given knowledge of the transitions for up and down I can make an educated guess, i.e. if either transition changes more than one bit then I should be returning 64 or 192 ?
Tom Edited 2025-02-16 23:33 by thwill |