Library to use RF 433 modules #13284
knemay
started this conversation in
Show and tell
Replies: 1 comment 1 reply
-
I hope you don't mind me chucking in a couple of comments but this piece of code looks unusual for two reasons: while n < len(msg):
new_time = time.ticks_us()
if new_time < old_time: # Handle overflows
old_time = old_time - 1_073_741_824 # microseconds overflow = 2^30
if new_time > old_time + self.baud_rate:
self.trans.value(msg[n])
n += 1
old_time = new_time 1 .The recommended way to handle overflow is with ticks_diff. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey, I recentlt had to use the 433 modules and I ended up creating a small library that handles the protocol to send/recieve messages. Maybe it is usefull for someone else -> https://github.com/knemay/rf433
Beta Was this translation helpful? Give feedback.
All reactions