-
Notifications
You must be signed in to change notification settings - Fork 28
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
standard python and interrupt - update documentation #36
Comments
It is very good to know it has been working well for you. Did you have to make any changes to the library? If so, please share them or create a PR to add them. |
Yes, it works well and stable since months. The only things, thats different: i waive the extra check of payload.ready and set a time delay of 50 ms after each send/received Action, to make shure, i get no overlapping. |
Are those changes in your application code or in the library? If they are in the library would you please post a copy of your modified library. I'd like to see exactly what you changed. |
the files are placed here: https://github.com/Pythonaire/RFMGate |
@Pythonaire Thank you. I am a bit confused. The files you posted include rfm69_driver.py which appears to be a very old version of the library. Is that what you are using? I don't see where you made your changes. Your rfm69_test.py imports adafruit_rfm69 but what version of the library are you using? |
Ah - I see that main.py uses the rfm69_driver.py... |
yes - this driver is the older version. the changes are marginal, just suppress the permanent listening of payload_ready bit. May be i'm wrong - i'm stumbled across the note ".. note:: The D0/interrupt line is currently unused by this module and can remain unconnected."(line 153). I need the "fire and forget" technic (no "reliable datagram"), because of my use case and the interrupt feature is the solution i needed. The raspberry is a Apple homekit bridge for sensors and switches. |
hmm -- I will look into that comment about D0 - hopefully it is just a comment that should have ben removed. I know the interrupt works for the rfm9x library but I have to tested it on the rfm69 for a long time. Thank you for pointing that out. I will test it. Also note that "fire and forget" is still the default for sending packets, "reliable datagram" is available, but not required. |
I just tested the interrupt example using 2 Raspberry Pis with rfm69 bonnets. It does work!
I will review the code and update the comments -- For normal use, D0 does not have to be connected, but it can be used on a Raspberry Pi as in the example. |
i think, waiting for an interrupt is much better, than permanent cycling through the code. |
…no library * Adds configurable bitrates with GFSK modulation * Adds asyncio support so recv/send are no longer blocking * Removes TX/RX register polling in favor of pin IRQ and countio * Cleanup RPi Interrupt example, addresses adafruit#36
this library works very well (little modification) in conjunction with python3 on a raspberry, a Adafruit RFM69 breakout board and the interrupt feature (DIO0). In my case, the raspberry work as a bridge between a RFM69-network and LAN.
To use this:
io.setup(self.dio0_pin, io.IN,pull_up_down=io.PUD_DOWN)
and
io.add_event_detect(self.dio0_pin, io.RISING, callback = the_script_to_handle_the data)
maybe people are interested in this.
The text was updated successfully, but these errors were encountered: