You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/en/module/lora.rst
+69-5Lines changed: 69 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
LoraModule
3
3
==========
4
4
5
-
.. include:: ../refs/module.loramodule.ref
5
+
.. include:: ../refs/module.lora.ref
6
6
7
7
The LoRa433_V1.1 Module is part of the M5Stack stackable module series. It is a LoRa communication module that operates at a 433MHz frequency and utilizes the Ra-02 module (SX1278 chip) solution.
:return (int): The return value is the timestamp when transmission completed, as a`time.ticks_ms()` result. It will be more accurate if the modem was initialized to use interrupts.
72
+
62
73
:param packet: The data packet to send.
63
74
:param tx_at_ms: Time to transmit the packet in milliseconds. For precise timing of sent packets, there is an optional `tx_at_ms` argument which is a timestamp (as a `time.ticks_ms()` value). If set, the packet will be sent as close as possible to this timestamp and the function will block until that time arrives
64
75
@@ -70,6 +81,8 @@ Methods
70
81
71
82
Receive a data packet.
72
83
84
+
:return (RxPacket): Returns None on timeout, or an `RxPacket` instance with the packet on success.
85
+
73
86
:param timeout_ms: Optional, sets a receive timeout in milliseconds. If None (default value), then the function will block indefinitely until a packet is received.
74
87
:param int rx_length: Necessary to set if `implicit_header` is set to `True` (see above). This is the length of the packet to receive. Ignored in the default LoRa explicit header mode, where the received radio header includes the length.
75
88
:param RxPacket rx_packet: Optional, this can be an `RxPacket` object previously received from the modem. If the newly received packet has the same length, this object is reused and returned to save an allocation. If the newly received packet has a different length, a new `RxPacket` object is allocated and returned instead.
@@ -78,6 +91,57 @@ Methods
78
91
79
92
|recv.svg|
80
93
94
+
.. method:: LoraModule.start_recv()
95
+
96
+
Start receiving data once, trigger an interrupt when data is received.
97
+
98
+
99
+
100
+
UIFLOW2:
101
+
102
+
|start_recv.svg|
103
+
104
+
.. method:: LoraModule.set_irq_callback(callback)
105
+
106
+
Set the IRQ callback function.
107
+
108
+
109
+
:param callback: The callback function. The function should accept one argument, which is the received data.
note: The return value is the timestamp when transmission completed, as a`time.ticks_ms()` result. It will be more accurate if the modem was initialized to use interrupts.
0 commit comments