Releases: adafruit/Adafruit_CircuitPython_RFM9x
Allow access to RadioHead Packet Header
Updated adafruit_rfm9x.py to allow optional access to the RadioHead Packet Headers.
The user may optionally set and receive the 4 byte RadioHead packet header.
The default is to ignore the header as in the past.
On transmit, the user may provide a keyword argument: tx_header with a 4-tuple of bytes.
tx_header = (To,From,ID,Flags)
to set the outgoing header.
On receive, the user can request that the packet header be included at the beginning of the packet via a keyword argument: with_header.
If set to True, the header will be included as the first 4 bytes of the packet and the data payload begins at byte 4.
Also, the user may specify a keyword argument: rx_filter to reject any "non-broadcast" packets not addressed as specified. A "broadcast" message contains 0xff as the To address. Broadcast messages are always received.
If rx_filter is set to a value other than 0xff, then incoming packets with the To field not matching the rx_filter will be ignored unless the To field contains 0xff.
If rx_filter is set to 0xff then all packets are accepted.
To use in CircuitPython, simply install the Adafruit CircuitPython bundle.
To use in CPython, pip install adafruit-circuitpython-rfm9x
.
Read the docs for info on how to use it.
fix for M4 and RPi
- adjusted timing of delay after entering "sleep" mode for proper execution on M4 boards.
- modified rfm9x_simpletest.py to be compatible with CPython and CircuitPython.
To use in CircuitPython, simply install the Adafruit CircuitPython bundle.
To use in CPython, pip install adafruit-circuitpython-rfm9x
.
Read the docs for info on how to use it.
Now on PyPi!
- Added
setup.py
- Added PyPI release info to
.travis.yml
- Updated
requirements.txt
- Added a more comprehensive
.gitignore
To use in CircuitPython, simply install the Adafruit CircuitPython bundle.
To use in CPython, pip install adafruit-circuitpython-rfm9x
.
Read the docs for info on how to use it.
Fix Frequency and power output control
Most of the changes were to make this driver compatible with the Arduino driver.
The main changes are to the way the frequency was set - the actual "setter" was never being called and the default frequency (434mHz) remained the actual setting. In addition there was an error in calculation of the frequency setting due to the use of "//" vs "/".
The default baudrate of 10Mhz was causing some "hangs" during reads from the FIFO, even with a featherwing. Lowering it to 5MHz seems to have made this much more reliable
Several minor changes were made bring the code to closer agreement with the Arduino dirver.
Added an arbitrary 2 second timeout to the send function. It may be changed via a keyword argument. but It now avoids a possible infinite loop.
Before these changes, two devices running CP could communicate, but they could not communicate to a device using Arduino. This was due to the frequency mis-configuration. The two CP devices were consistent with eachother, but not with the Arduino Driver.
Note: the timeout keywords for the send and receive functions have been changed from "timeout_s" to just "timeout". If you are setting these, they will have to be updated.
Fix RESET handling
Fixed to work on 3.0.
Doc refinement
Thanks to @sommersoft for the documentation refinement.
To use in CircuitPython, download the .mpy file and copy it to the lib
folder on the CIRCUITPY
drive. Or, simply install the Adafruit CircuitPython bundle.
Read the docs for info on how to use it.
Initial release
Initial release for MPY generation.