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.
Files changed (53) hide show
  1. {adafruit_circuitpython_rfm-1.0.0 → adafruit_circuitpython_rfm-1.0.2}/PKG-INFO +4 -4
  2. {adafruit_circuitpython_rfm-1.0.0 → adafruit_circuitpython_rfm-1.0.2}/README.rst +3 -3
  3. {adafruit_circuitpython_rfm-1.0.0 → adafruit_circuitpython_rfm-1.0.2}/adafruit_circuitpython_rfm.egg-info/PKG-INFO +4 -4
  4. {adafruit_circuitpython_rfm-1.0.0 → adafruit_circuitpython_rfm-1.0.2}/adafruit_circuitpython_rfm.egg-info/SOURCES.txt +1 -0
  5. {adafruit_circuitpython_rfm-1.0.0 → adafruit_circuitpython_rfm-1.0.2}/adafruit_rfm/rfm69.py +1 -1
  6. {adafruit_circuitpython_rfm-1.0.0 → adafruit_circuitpython_rfm-1.0.2}/adafruit_rfm/rfm9x.py +1 -1
  7. {adafruit_circuitpython_rfm-1.0.0 → adafruit_circuitpython_rfm-1.0.2}/adafruit_rfm/rfm9xfsk.py +1 -1
  8. {adafruit_circuitpython_rfm-1.0.0 → adafruit_circuitpython_rfm-1.0.2}/adafruit_rfm/rfm_common.py +1 -1
  9. {adafruit_circuitpython_rfm-1.0.0 → adafruit_circuitpython_rfm-1.0.2}/docs/conf.py +0 -1
  10. adafruit_circuitpython_rfm-1.0.2/examples/rfm_msgpack_data.py +118 -0
  11. {adafruit_circuitpython_rfm-1.0.0 → adafruit_circuitpython_rfm-1.0.2}/pyproject.toml +1 -1
  12. {adafruit_circuitpython_rfm-1.0.0 → adafruit_circuitpython_rfm-1.0.2}/.github/PULL_REQUEST_TEMPLATE/adafruit_circuitpython_pr.md +0 -0
  13. {adafruit_circuitpython_rfm-1.0.0 → adafruit_circuitpython_rfm-1.0.2}/.github/workflows/build.yml +0 -0
  14. {adafruit_circuitpython_rfm-1.0.0 → adafruit_circuitpython_rfm-1.0.2}/.github/workflows/failure-help-text.yml +0 -0
  15. {adafruit_circuitpython_rfm-1.0.0 → adafruit_circuitpython_rfm-1.0.2}/.github/workflows/release_gh.yml +0 -0
  16. {adafruit_circuitpython_rfm-1.0.0 → adafruit_circuitpython_rfm-1.0.2}/.github/workflows/release_pypi.yml +0 -0
  17. {adafruit_circuitpython_rfm-1.0.0 → adafruit_circuitpython_rfm-1.0.2}/.pre-commit-config.yaml +0 -0
  18. {adafruit_circuitpython_rfm-1.0.0 → adafruit_circuitpython_rfm-1.0.2}/.readthedocs.yaml +0 -0
  19. {adafruit_circuitpython_rfm-1.0.0 → adafruit_circuitpython_rfm-1.0.2}/CODE_OF_CONDUCT.md +0 -0
  20. {adafruit_circuitpython_rfm-1.0.0 → adafruit_circuitpython_rfm-1.0.2}/LICENSE +0 -0
  21. {adafruit_circuitpython_rfm-1.0.0 → adafruit_circuitpython_rfm-1.0.2}/LICENSES/CC-BY-4.0.txt +0 -0
  22. {adafruit_circuitpython_rfm-1.0.0 → adafruit_circuitpython_rfm-1.0.2}/LICENSES/MIT.txt +0 -0
  23. {adafruit_circuitpython_rfm-1.0.0 → adafruit_circuitpython_rfm-1.0.2}/LICENSES/Unlicense.txt +0 -0
  24. {adafruit_circuitpython_rfm-1.0.0 → adafruit_circuitpython_rfm-1.0.2}/README.rst.license +0 -0
  25. {adafruit_circuitpython_rfm-1.0.0 → adafruit_circuitpython_rfm-1.0.2}/adafruit_circuitpython_rfm.egg-info/dependency_links.txt +0 -0
  26. {adafruit_circuitpython_rfm-1.0.0 → adafruit_circuitpython_rfm-1.0.2}/adafruit_circuitpython_rfm.egg-info/requires.txt +0 -0
  27. {adafruit_circuitpython_rfm-1.0.0 → adafruit_circuitpython_rfm-1.0.2}/adafruit_circuitpython_rfm.egg-info/top_level.txt +0 -0
  28. {adafruit_circuitpython_rfm-1.0.0 → adafruit_circuitpython_rfm-1.0.2}/adafruit_rfm/__init__.py +0 -0
  29. {adafruit_circuitpython_rfm-1.0.0 → adafruit_circuitpython_rfm-1.0.2}/docs/_static/favicon.ico +0 -0
  30. {adafruit_circuitpython_rfm-1.0.0 → adafruit_circuitpython_rfm-1.0.2}/docs/_static/favicon.ico.license +0 -0
  31. {adafruit_circuitpython_rfm-1.0.0 → adafruit_circuitpython_rfm-1.0.2}/docs/api.rst +0 -0
  32. {adafruit_circuitpython_rfm-1.0.0 → adafruit_circuitpython_rfm-1.0.2}/docs/api.rst.license +0 -0
  33. {adafruit_circuitpython_rfm-1.0.0 → adafruit_circuitpython_rfm-1.0.2}/docs/examples.rst +0 -0
  34. {adafruit_circuitpython_rfm-1.0.0 → adafruit_circuitpython_rfm-1.0.2}/docs/examples.rst.license +0 -0
  35. {adafruit_circuitpython_rfm-1.0.0 → adafruit_circuitpython_rfm-1.0.2}/docs/index.rst +0 -0
  36. {adafruit_circuitpython_rfm-1.0.0 → adafruit_circuitpython_rfm-1.0.2}/docs/index.rst.license +0 -0
  37. {adafruit_circuitpython_rfm-1.0.0 → adafruit_circuitpython_rfm-1.0.2}/docs/requirements.txt +0 -0
  38. {adafruit_circuitpython_rfm-1.0.0 → adafruit_circuitpython_rfm-1.0.2}/examples/rfm_fsk_node1.py +0 -0
  39. {adafruit_circuitpython_rfm-1.0.0 → adafruit_circuitpython_rfm-1.0.2}/examples/rfm_fsk_node2.py +0 -0
  40. {adafruit_circuitpython_rfm-1.0.0 → adafruit_circuitpython_rfm-1.0.2}/examples/rfm_raw.py +0 -0
  41. {adafruit_circuitpython_rfm-1.0.0 → adafruit_circuitpython_rfm-1.0.2}/examples/rfm_rh_asyncio_listen.py +0 -0
  42. {adafruit_circuitpython_rfm-1.0.0 → adafruit_circuitpython_rfm-1.0.2}/examples/rfm_rh_asyncio_listen_ack.py +0 -0
  43. {adafruit_circuitpython_rfm-1.0.0 → adafruit_circuitpython_rfm-1.0.2}/examples/rfm_rh_asyncio_node1.py +0 -0
  44. {adafruit_circuitpython_rfm-1.0.0 → adafruit_circuitpython_rfm-1.0.2}/examples/rfm_rh_base.py +0 -0
  45. {adafruit_circuitpython_rfm-1.0.0 → adafruit_circuitpython_rfm-1.0.2}/examples/rfm_rh_base_ack.py +0 -0
  46. {adafruit_circuitpython_rfm-1.0.0 → adafruit_circuitpython_rfm-1.0.2}/examples/rfm_rh_node1.py +0 -0
  47. {adafruit_circuitpython_rfm-1.0.0 → adafruit_circuitpython_rfm-1.0.2}/examples/rfm_rh_node1_ack.py +0 -0
  48. {adafruit_circuitpython_rfm-1.0.0 → adafruit_circuitpython_rfm-1.0.2}/examples/rfm_simpletest.py +0 -0
  49. {adafruit_circuitpython_rfm-1.0.0 → adafruit_circuitpython_rfm-1.0.2}/examples/rfm_transmit.py +0 -0
  50. {adafruit_circuitpython_rfm-1.0.0 → adafruit_circuitpython_rfm-1.0.2}/optional_requirements.txt +0 -0
  51. {adafruit_circuitpython_rfm-1.0.0 → adafruit_circuitpython_rfm-1.0.2}/requirements.txt +0 -0
  52. {adafruit_circuitpython_rfm-1.0.0 → adafruit_circuitpython_rfm-1.0.2}/ruff.toml +0 -0
  53. {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.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/jerryneedell/Adafruit_CircuitPython_RFM/workflows/Build%20CI/badge.svg
37
- :target: https://github.com/jerryneedell/Adafruit_CircuitPython_RFM/actions
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/jerryneedell/Adafruit_CircuitPython_RFM.git>
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/jerryneedell/Adafruit_CircuitPython_RFM/workflows/Build%20CI/badge.svg
16
- :target: https://github.com/jerryneedell/Adafruit_CircuitPython_RFM/actions
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/jerryneedell/Adafruit_CircuitPython_RFM.git>
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.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/jerryneedell/Adafruit_CircuitPython_RFM/workflows/Build%20CI/badge.svg
37
- :target: https://github.com/jerryneedell/Adafruit_CircuitPython_RFM/actions
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/jerryneedell/Adafruit_CircuitPython_RFM.git>
114
+ See examples in the GitHub Repository. <https://github.com/adafruit/Adafruit_CircuitPython_RFM.git>
115
115
 
116
116
  Documentation
117
117
  =============
@@ -38,6 +38,7 @@ docs/_static/favicon.ico
38
38
  docs/_static/favicon.ico.license
39
39
  examples/rfm_fsk_node1.py
40
40
  examples/rfm_fsk_node2.py
41
+ examples/rfm_msgpack_data.py
41
42
  examples/rfm_raw.py
42
43
  examples/rfm_rh_asyncio_listen.py
43
44
  examples/rfm_rh_asyncio_listen_ack.py
@@ -44,7 +44,7 @@ except ImportError:
44
44
  pass
45
45
 
46
46
 
47
- __version__ = "1.0.0"
47
+ __version__ = "1.0.2"
48
48
  __repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_RFM.git"
49
49
 
50
50
 
@@ -30,7 +30,7 @@ try:
30
30
  except ImportError:
31
31
  pass
32
32
 
33
- __version__ = "1.0.0"
33
+ __version__ = "1.0.2"
34
34
  __repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_RFM.git"
35
35
 
36
36
  # pylint: disable=duplicate-code
@@ -32,7 +32,7 @@ try:
32
32
  except ImportError:
33
33
  pass
34
34
 
35
- __version__ = "1.0.0"
35
+ __version__ = "1.0.2"
36
36
  __repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_RFM.git"
37
37
 
38
38
  # pylint: disable=duplicate-code
@@ -36,7 +36,7 @@ except ImportError:
36
36
  pass
37
37
 
38
38
 
39
- __version__ = "1.0.0"
39
+ __version__ = "1.0.2"
40
40
  __repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_RFM.git"
41
41
 
42
42
 
@@ -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.0"
16
+ version = "1.0.2"
17
17
  readme = "README.rst"
18
18
  authors = [
19
19
  {name = "Adafruit Industries", email = "circuitpython@adafruit.com"}