adafruit-circuitpython-rfm 1.0.0__tar.gz → 1.0.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {adafruit_circuitpython_rfm-1.0.0 → adafruit_circuitpython_rfm-1.0.2}/PKG-INFO +4 -4
- {adafruit_circuitpython_rfm-1.0.0 → adafruit_circuitpython_rfm-1.0.2}/README.rst +3 -3
- {adafruit_circuitpython_rfm-1.0.0 → adafruit_circuitpython_rfm-1.0.2}/adafruit_circuitpython_rfm.egg-info/PKG-INFO +4 -4
- {adafruit_circuitpython_rfm-1.0.0 → adafruit_circuitpython_rfm-1.0.2}/adafruit_circuitpython_rfm.egg-info/SOURCES.txt +1 -0
- {adafruit_circuitpython_rfm-1.0.0 → adafruit_circuitpython_rfm-1.0.2}/adafruit_rfm/rfm69.py +1 -1
- {adafruit_circuitpython_rfm-1.0.0 → adafruit_circuitpython_rfm-1.0.2}/adafruit_rfm/rfm9x.py +1 -1
- {adafruit_circuitpython_rfm-1.0.0 → adafruit_circuitpython_rfm-1.0.2}/adafruit_rfm/rfm9xfsk.py +1 -1
- {adafruit_circuitpython_rfm-1.0.0 → adafruit_circuitpython_rfm-1.0.2}/adafruit_rfm/rfm_common.py +1 -1
- {adafruit_circuitpython_rfm-1.0.0 → adafruit_circuitpython_rfm-1.0.2}/docs/conf.py +0 -1
- adafruit_circuitpython_rfm-1.0.2/examples/rfm_msgpack_data.py +118 -0
- {adafruit_circuitpython_rfm-1.0.0 → adafruit_circuitpython_rfm-1.0.2}/pyproject.toml +1 -1
- {adafruit_circuitpython_rfm-1.0.0 → adafruit_circuitpython_rfm-1.0.2}/.github/PULL_REQUEST_TEMPLATE/adafruit_circuitpython_pr.md +0 -0
- {adafruit_circuitpython_rfm-1.0.0 → adafruit_circuitpython_rfm-1.0.2}/.github/workflows/build.yml +0 -0
- {adafruit_circuitpython_rfm-1.0.0 → adafruit_circuitpython_rfm-1.0.2}/.github/workflows/failure-help-text.yml +0 -0
- {adafruit_circuitpython_rfm-1.0.0 → adafruit_circuitpython_rfm-1.0.2}/.github/workflows/release_gh.yml +0 -0
- {adafruit_circuitpython_rfm-1.0.0 → adafruit_circuitpython_rfm-1.0.2}/.github/workflows/release_pypi.yml +0 -0
- {adafruit_circuitpython_rfm-1.0.0 → adafruit_circuitpython_rfm-1.0.2}/.pre-commit-config.yaml +0 -0
- {adafruit_circuitpython_rfm-1.0.0 → adafruit_circuitpython_rfm-1.0.2}/.readthedocs.yaml +0 -0
- {adafruit_circuitpython_rfm-1.0.0 → adafruit_circuitpython_rfm-1.0.2}/CODE_OF_CONDUCT.md +0 -0
- {adafruit_circuitpython_rfm-1.0.0 → adafruit_circuitpython_rfm-1.0.2}/LICENSE +0 -0
- {adafruit_circuitpython_rfm-1.0.0 → adafruit_circuitpython_rfm-1.0.2}/LICENSES/CC-BY-4.0.txt +0 -0
- {adafruit_circuitpython_rfm-1.0.0 → adafruit_circuitpython_rfm-1.0.2}/LICENSES/MIT.txt +0 -0
- {adafruit_circuitpython_rfm-1.0.0 → adafruit_circuitpython_rfm-1.0.2}/LICENSES/Unlicense.txt +0 -0
- {adafruit_circuitpython_rfm-1.0.0 → adafruit_circuitpython_rfm-1.0.2}/README.rst.license +0 -0
- {adafruit_circuitpython_rfm-1.0.0 → adafruit_circuitpython_rfm-1.0.2}/adafruit_circuitpython_rfm.egg-info/dependency_links.txt +0 -0
- {adafruit_circuitpython_rfm-1.0.0 → adafruit_circuitpython_rfm-1.0.2}/adafruit_circuitpython_rfm.egg-info/requires.txt +0 -0
- {adafruit_circuitpython_rfm-1.0.0 → adafruit_circuitpython_rfm-1.0.2}/adafruit_circuitpython_rfm.egg-info/top_level.txt +0 -0
- {adafruit_circuitpython_rfm-1.0.0 → adafruit_circuitpython_rfm-1.0.2}/adafruit_rfm/__init__.py +0 -0
- {adafruit_circuitpython_rfm-1.0.0 → adafruit_circuitpython_rfm-1.0.2}/docs/_static/favicon.ico +0 -0
- {adafruit_circuitpython_rfm-1.0.0 → adafruit_circuitpython_rfm-1.0.2}/docs/_static/favicon.ico.license +0 -0
- {adafruit_circuitpython_rfm-1.0.0 → adafruit_circuitpython_rfm-1.0.2}/docs/api.rst +0 -0
- {adafruit_circuitpython_rfm-1.0.0 → adafruit_circuitpython_rfm-1.0.2}/docs/api.rst.license +0 -0
- {adafruit_circuitpython_rfm-1.0.0 → adafruit_circuitpython_rfm-1.0.2}/docs/examples.rst +0 -0
- {adafruit_circuitpython_rfm-1.0.0 → adafruit_circuitpython_rfm-1.0.2}/docs/examples.rst.license +0 -0
- {adafruit_circuitpython_rfm-1.0.0 → adafruit_circuitpython_rfm-1.0.2}/docs/index.rst +0 -0
- {adafruit_circuitpython_rfm-1.0.0 → adafruit_circuitpython_rfm-1.0.2}/docs/index.rst.license +0 -0
- {adafruit_circuitpython_rfm-1.0.0 → adafruit_circuitpython_rfm-1.0.2}/docs/requirements.txt +0 -0
- {adafruit_circuitpython_rfm-1.0.0 → adafruit_circuitpython_rfm-1.0.2}/examples/rfm_fsk_node1.py +0 -0
- {adafruit_circuitpython_rfm-1.0.0 → adafruit_circuitpython_rfm-1.0.2}/examples/rfm_fsk_node2.py +0 -0
- {adafruit_circuitpython_rfm-1.0.0 → adafruit_circuitpython_rfm-1.0.2}/examples/rfm_raw.py +0 -0
- {adafruit_circuitpython_rfm-1.0.0 → adafruit_circuitpython_rfm-1.0.2}/examples/rfm_rh_asyncio_listen.py +0 -0
- {adafruit_circuitpython_rfm-1.0.0 → adafruit_circuitpython_rfm-1.0.2}/examples/rfm_rh_asyncio_listen_ack.py +0 -0
- {adafruit_circuitpython_rfm-1.0.0 → adafruit_circuitpython_rfm-1.0.2}/examples/rfm_rh_asyncio_node1.py +0 -0
- {adafruit_circuitpython_rfm-1.0.0 → adafruit_circuitpython_rfm-1.0.2}/examples/rfm_rh_base.py +0 -0
- {adafruit_circuitpython_rfm-1.0.0 → adafruit_circuitpython_rfm-1.0.2}/examples/rfm_rh_base_ack.py +0 -0
- {adafruit_circuitpython_rfm-1.0.0 → adafruit_circuitpython_rfm-1.0.2}/examples/rfm_rh_node1.py +0 -0
- {adafruit_circuitpython_rfm-1.0.0 → adafruit_circuitpython_rfm-1.0.2}/examples/rfm_rh_node1_ack.py +0 -0
- {adafruit_circuitpython_rfm-1.0.0 → adafruit_circuitpython_rfm-1.0.2}/examples/rfm_simpletest.py +0 -0
- {adafruit_circuitpython_rfm-1.0.0 → adafruit_circuitpython_rfm-1.0.2}/examples/rfm_transmit.py +0 -0
- {adafruit_circuitpython_rfm-1.0.0 → adafruit_circuitpython_rfm-1.0.2}/optional_requirements.txt +0 -0
- {adafruit_circuitpython_rfm-1.0.0 → adafruit_circuitpython_rfm-1.0.2}/requirements.txt +0 -0
- {adafruit_circuitpython_rfm-1.0.0 → adafruit_circuitpython_rfm-1.0.2}/ruff.toml +0 -0
- {adafruit_circuitpython_rfm-1.0.0 → adafruit_circuitpython_rfm-1.0.2}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: adafruit-circuitpython-rfm
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.2
|
|
4
4
|
Summary: Support for RFM69 and RFM9x modules
|
|
5
5
|
Author-email: Adafruit Industries <circuitpython@adafruit.com>
|
|
6
6
|
License: MIT
|
|
@@ -33,8 +33,8 @@ Introduction
|
|
|
33
33
|
:alt: Discord
|
|
34
34
|
|
|
35
35
|
|
|
36
|
-
.. image:: https://github.com/
|
|
37
|
-
:target: https://github.com/
|
|
36
|
+
.. image:: https://github.com/adafruit/Adafruit_CircuitPython_RFM/workflows/Build%20CI/badge.svg
|
|
37
|
+
:target: https://github.com/adafruit/Adafruit_CircuitPython_RFM/actions
|
|
38
38
|
:alt: Build Status
|
|
39
39
|
|
|
40
40
|
|
|
@@ -111,7 +111,7 @@ Or the following command to update an existing version:
|
|
|
111
111
|
Usage Example
|
|
112
112
|
=============
|
|
113
113
|
|
|
114
|
-
See examples in the GitHub Repository. <https://github.com/
|
|
114
|
+
See examples in the GitHub Repository. <https://github.com/adafruit/Adafruit_CircuitPython_RFM.git>
|
|
115
115
|
|
|
116
116
|
Documentation
|
|
117
117
|
=============
|
|
@@ -12,8 +12,8 @@ Introduction
|
|
|
12
12
|
:alt: Discord
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
.. image:: https://github.com/
|
|
16
|
-
:target: https://github.com/
|
|
15
|
+
.. image:: https://github.com/adafruit/Adafruit_CircuitPython_RFM/workflows/Build%20CI/badge.svg
|
|
16
|
+
:target: https://github.com/adafruit/Adafruit_CircuitPython_RFM/actions
|
|
17
17
|
:alt: Build Status
|
|
18
18
|
|
|
19
19
|
|
|
@@ -90,7 +90,7 @@ Or the following command to update an existing version:
|
|
|
90
90
|
Usage Example
|
|
91
91
|
=============
|
|
92
92
|
|
|
93
|
-
See examples in the GitHub Repository. <https://github.com/
|
|
93
|
+
See examples in the GitHub Repository. <https://github.com/adafruit/Adafruit_CircuitPython_RFM.git>
|
|
94
94
|
|
|
95
95
|
Documentation
|
|
96
96
|
=============
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: adafruit-circuitpython-rfm
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.2
|
|
4
4
|
Summary: Support for RFM69 and RFM9x modules
|
|
5
5
|
Author-email: Adafruit Industries <circuitpython@adafruit.com>
|
|
6
6
|
License: MIT
|
|
@@ -33,8 +33,8 @@ Introduction
|
|
|
33
33
|
:alt: Discord
|
|
34
34
|
|
|
35
35
|
|
|
36
|
-
.. image:: https://github.com/
|
|
37
|
-
:target: https://github.com/
|
|
36
|
+
.. image:: https://github.com/adafruit/Adafruit_CircuitPython_RFM/workflows/Build%20CI/badge.svg
|
|
37
|
+
:target: https://github.com/adafruit/Adafruit_CircuitPython_RFM/actions
|
|
38
38
|
:alt: Build Status
|
|
39
39
|
|
|
40
40
|
|
|
@@ -111,7 +111,7 @@ Or the following command to update an existing version:
|
|
|
111
111
|
Usage Example
|
|
112
112
|
=============
|
|
113
113
|
|
|
114
|
-
See examples in the GitHub Repository. <https://github.com/
|
|
114
|
+
See examples in the GitHub Repository. <https://github.com/adafruit/Adafruit_CircuitPython_RFM.git>
|
|
115
115
|
|
|
116
116
|
Documentation
|
|
117
117
|
=============
|
|
@@ -112,7 +112,6 @@ napoleon_numpy_docstring = False
|
|
|
112
112
|
import sphinx_rtd_theme
|
|
113
113
|
|
|
114
114
|
html_theme = "sphinx_rtd_theme"
|
|
115
|
-
html_theme_path = [sphinx_rtd_theme.get_html_theme_path(), "."]
|
|
116
115
|
|
|
117
116
|
# Add any paths that contain custom static files (such as style sheets) here,
|
|
118
117
|
# relative to this directory. They are copied after the builtin static files,
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries
|
|
2
|
+
# SPDX-License-Identifier: MIT
|
|
3
|
+
|
|
4
|
+
# Example to send a msgpack'd data packet periodically
|
|
5
|
+
# Author: Jerry Needell, Tim Cocks
|
|
6
|
+
#
|
|
7
|
+
import time
|
|
8
|
+
from io import BytesIO
|
|
9
|
+
|
|
10
|
+
import board
|
|
11
|
+
import busio
|
|
12
|
+
import digitalio
|
|
13
|
+
import msgpack
|
|
14
|
+
|
|
15
|
+
# Dictionary object that we will msgpack and send over the radio
|
|
16
|
+
payload_obj = {"counter": 0, "list": [True, False, None, 1, 3.14], "str": "CircuitPython is Fun!"}
|
|
17
|
+
|
|
18
|
+
# Define radio parameters.
|
|
19
|
+
RADIO_FREQ_MHZ = 915.0 # Frequency of the radio in Mhz. Must match your
|
|
20
|
+
# module! Can be a value like 915.0, 433.0, etc.
|
|
21
|
+
|
|
22
|
+
# Define pins connected to the chip, use these if wiring up the breakout according to the guide:
|
|
23
|
+
CS = digitalio.DigitalInOut(board.D10)
|
|
24
|
+
RESET = digitalio.DigitalInOut(board.D11)
|
|
25
|
+
|
|
26
|
+
# Initialize SPI bus.
|
|
27
|
+
spi = busio.SPI(board.SCK, MOSI=board.MOSI, MISO=board.MISO)
|
|
28
|
+
|
|
29
|
+
# Initialze RFM radio
|
|
30
|
+
# uncommnet the desired import and rfm initialization depending on the radio boards being used
|
|
31
|
+
|
|
32
|
+
# Use rfm9x for two RFM9x radios using LoRa
|
|
33
|
+
|
|
34
|
+
# from adafruit_rfm import rfm9x
|
|
35
|
+
|
|
36
|
+
# rfm = rfm9x.RFM9x(spi, CS, RESET, RADIO_FREQ_MHZ)
|
|
37
|
+
|
|
38
|
+
# Use rfm9xfsk for two RFM9x radios or RFM9x to RFM69 using FSK
|
|
39
|
+
|
|
40
|
+
from adafruit_rfm import rfm9xfsk
|
|
41
|
+
|
|
42
|
+
rfm = rfm9xfsk.RFM9xFSK(spi, CS, RESET, RADIO_FREQ_MHZ)
|
|
43
|
+
|
|
44
|
+
# Use rfm69 for two RFM69 radios using FSK
|
|
45
|
+
|
|
46
|
+
# from adafruit_rfm import rfm69
|
|
47
|
+
|
|
48
|
+
# rfm = rfm69.RFM69(spi, CS, RESET, RADIO_FREQ_MHZ)
|
|
49
|
+
|
|
50
|
+
# For RFM69 only: Optionally set an encryption key (16 byte AES key). MUST match both
|
|
51
|
+
# on the transmitter and receiver (or be set to None to disable/the default).
|
|
52
|
+
# rfm.encryption_key = None
|
|
53
|
+
# rfm.encryption_key = (
|
|
54
|
+
# b"\x01\x02\x03\x04\x05\x06\x07\x08\x01\x02\x03\x04\x05\x06\x07\x08"
|
|
55
|
+
# )
|
|
56
|
+
|
|
57
|
+
# for OOK on RFM69 or RFM9xFSK
|
|
58
|
+
# rfm.modulation_type = 1
|
|
59
|
+
|
|
60
|
+
# uncommnet to Disable the RadioHead Header
|
|
61
|
+
# rfm.radiohead = False
|
|
62
|
+
|
|
63
|
+
# in FSK/OOK modes rfo RFM69 or RFM9X - addresss filtering may be enabled
|
|
64
|
+
# rfm.enable_address_filter=True
|
|
65
|
+
# rfm.fsk_node_address=0x2
|
|
66
|
+
# rfm.fsk_broadcast_address=0xff
|
|
67
|
+
|
|
68
|
+
# set the time interval (seconds) for sending packets
|
|
69
|
+
transmit_interval = 5
|
|
70
|
+
|
|
71
|
+
# Note that the radio is configured in LoRa mode so you can't control sync
|
|
72
|
+
# word, encryption, frequency deviation, or other settings!
|
|
73
|
+
|
|
74
|
+
# You can however adjust the transmit power (in dB). The default is 13 dB but
|
|
75
|
+
# high power radios like the RFM95 can go up to 23 dB:
|
|
76
|
+
rfm.tx_power = 23
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
# initialize counter
|
|
80
|
+
counter = 0
|
|
81
|
+
|
|
82
|
+
# Wait to receive packets.
|
|
83
|
+
print("Waiting for packets...")
|
|
84
|
+
# initialize flag and timer
|
|
85
|
+
send_reading = False
|
|
86
|
+
time_now = time.monotonic()
|
|
87
|
+
while True:
|
|
88
|
+
# Look for a new packet - wait up to 2 seconds:
|
|
89
|
+
packet = rfm.receive(timeout=2.0)
|
|
90
|
+
# If no packet was received during the timeout then None is returned.
|
|
91
|
+
if packet is not None:
|
|
92
|
+
# Received a packet!
|
|
93
|
+
print("Received (raw data): ", packet)
|
|
94
|
+
|
|
95
|
+
try:
|
|
96
|
+
# Unpack and print contents
|
|
97
|
+
b = BytesIO()
|
|
98
|
+
b.write(packet)
|
|
99
|
+
b.seek(0)
|
|
100
|
+
unpacked_msg = msgpack.unpack(b)
|
|
101
|
+
print(f"Received (unpacked): {unpacked_msg}")
|
|
102
|
+
except Exception as e:
|
|
103
|
+
print("Unable to unpack message. Exception: ")
|
|
104
|
+
print(e)
|
|
105
|
+
|
|
106
|
+
# send reading after any packet received
|
|
107
|
+
if time.monotonic() - time_now > transmit_interval:
|
|
108
|
+
# reset timeer
|
|
109
|
+
time_now = time.monotonic()
|
|
110
|
+
# clear flag to send data
|
|
111
|
+
send_reading = False
|
|
112
|
+
counter = counter + 1
|
|
113
|
+
|
|
114
|
+
b = BytesIO()
|
|
115
|
+
payload_obj["counter"] = counter
|
|
116
|
+
msgpack.pack(payload_obj, b)
|
|
117
|
+
b.seek(0)
|
|
118
|
+
rfm.send(b.read())
|
|
@@ -13,7 +13,7 @@ requires = [
|
|
|
13
13
|
[project]
|
|
14
14
|
name = "adafruit-circuitpython-rfm"
|
|
15
15
|
description = "Support for RFM69 and RFM9x modules"
|
|
16
|
-
version = "1.0.
|
|
16
|
+
version = "1.0.2"
|
|
17
17
|
readme = "README.rst"
|
|
18
18
|
authors = [
|
|
19
19
|
{name = "Adafruit Industries", email = "circuitpython@adafruit.com"}
|
|
File without changes
|
{adafruit_circuitpython_rfm-1.0.0 → adafruit_circuitpython_rfm-1.0.2}/.github/workflows/build.yml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{adafruit_circuitpython_rfm-1.0.0 → adafruit_circuitpython_rfm-1.0.2}/.pre-commit-config.yaml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{adafruit_circuitpython_rfm-1.0.0 → adafruit_circuitpython_rfm-1.0.2}/LICENSES/CC-BY-4.0.txt
RENAMED
|
File without changes
|
|
File without changes
|
{adafruit_circuitpython_rfm-1.0.0 → adafruit_circuitpython_rfm-1.0.2}/LICENSES/Unlicense.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{adafruit_circuitpython_rfm-1.0.0 → adafruit_circuitpython_rfm-1.0.2}/adafruit_rfm/__init__.py
RENAMED
|
File without changes
|
{adafruit_circuitpython_rfm-1.0.0 → adafruit_circuitpython_rfm-1.0.2}/docs/_static/favicon.ico
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{adafruit_circuitpython_rfm-1.0.0 → adafruit_circuitpython_rfm-1.0.2}/docs/examples.rst.license
RENAMED
|
File without changes
|
|
File without changes
|
{adafruit_circuitpython_rfm-1.0.0 → adafruit_circuitpython_rfm-1.0.2}/docs/index.rst.license
RENAMED
|
File without changes
|
|
File without changes
|
{adafruit_circuitpython_rfm-1.0.0 → adafruit_circuitpython_rfm-1.0.2}/examples/rfm_fsk_node1.py
RENAMED
|
File without changes
|
{adafruit_circuitpython_rfm-1.0.0 → adafruit_circuitpython_rfm-1.0.2}/examples/rfm_fsk_node2.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{adafruit_circuitpython_rfm-1.0.0 → adafruit_circuitpython_rfm-1.0.2}/examples/rfm_rh_base.py
RENAMED
|
File without changes
|
{adafruit_circuitpython_rfm-1.0.0 → adafruit_circuitpython_rfm-1.0.2}/examples/rfm_rh_base_ack.py
RENAMED
|
File without changes
|
{adafruit_circuitpython_rfm-1.0.0 → adafruit_circuitpython_rfm-1.0.2}/examples/rfm_rh_node1.py
RENAMED
|
File without changes
|
{adafruit_circuitpython_rfm-1.0.0 → adafruit_circuitpython_rfm-1.0.2}/examples/rfm_rh_node1_ack.py
RENAMED
|
File without changes
|
{adafruit_circuitpython_rfm-1.0.0 → adafruit_circuitpython_rfm-1.0.2}/examples/rfm_simpletest.py
RENAMED
|
File without changes
|
{adafruit_circuitpython_rfm-1.0.0 → adafruit_circuitpython_rfm-1.0.2}/examples/rfm_transmit.py
RENAMED
|
File without changes
|
{adafruit_circuitpython_rfm-1.0.0 → adafruit_circuitpython_rfm-1.0.2}/optional_requirements.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|