-
Notifications
You must be signed in to change notification settings - Fork 5
Adding msgpack example #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@jerryneedell Great job on this new library! I set up two radio featherwings to try it out and everything was very smooth sailing to get them running under this new module. |
Where do the io and msgpack modules come from for this example? I should add that I am trying to run this on Raspberry Pi and pip is not finding them. Are they available for "blinka" Nevermind -- pip install msgpack adafruit-io got them. |
They are from core modules.
|
on the Pi, If I try to run this on two systems, I get this error when I start the second:
|
I was getting an error that no module io was found until I installed adafruit-io |
The problem may be that the startup message is not constructed with msgpack - Is that causing the error. |
Yes -- I think taht is its -- I just commented out the startup message and it works fine.
|
examples/rfm_msgpack_data.py
Outdated
# initialize counter | ||
counter = 0 | ||
# send a broadcast mesage | ||
rfm.send(bytes(f"message number {counter}", "UTF-8")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This startup message is not formed with msgpack so it causes problems if send to another system expecting a msgpack encoded packet. Maybe remove this startup message or add error handling for non=msgpack packets.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you. I've removed that one with the latest commit
Looks great -- Nice example! |
Updating https://github.com/adafruit/Adafruit_CircuitPython_ADS1x15 to 2.4.0 from 2.3.0: > Merge pull request adafruit/Adafruit_CircuitPython_ADS1x15#99 from RoaCode/comparator_settings Updating https://github.com/adafruit/Adafruit_CircuitPython_RFM to 1.0.1 from 1.0.0: > Merge pull request adafruit/Adafruit_CircuitPython_RFM#2 from FoamyGuy/msgpack_example Updating https://github.com/adafruit/Adafruit_CircuitPython_ImageLoad to 1.23.1 from 1.23.0: > Merge pull request adafruit/Adafruit_CircuitPython_ImageLoad#85 from FoamyGuy/use_ruff Updating https://github.com/adafruit/Adafruit_CircuitPython_Bundle/circuitpython_library_list.md to NA from NA: > Updated download stats for the libraries
This is similar to the exist simple transmit example but is modified to send a dictionary payload using
msgpack