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: API.md
+22-1Lines changed: 22 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -40,7 +40,7 @@ To save further pins one could connect the reset pin of the MCU with reset pin o
40
40
41
41
#### Pin dio0 interrupt callbacks
42
42
43
-
The dio0 pin can be used for transmission finish callback and/or receiving callback, check `onTxDone` and `onReceive`.
43
+
The dio0 pin can be used for channel activity detection callback, transmission finish callback and/or receiving callback, check `onCadDone` , `onTxDone`, and `onReceive`.
44
44
45
45
### Set SPI interface
46
46
@@ -250,6 +250,27 @@ Returns the next byte in the packet or `-1` if no bytes are available.
250
250
251
251
**Note:** Other Arduino [`Stream` API's](https://www.arduino.cc/en/Reference/Stream) can also be used to read data from the packet
252
252
253
+
## Channel Activity Detection
254
+
**WARNING**: Channel activity detection callback uses the interrupt pin on the `dio0`, check `setPins` function!
255
+
256
+
### Register callback
257
+
258
+
Register a callback function for when channel activity detection has done.
259
+
```arduino
260
+
LoRa.onCadDone(onCadDone);
261
+
262
+
void onCadDone(boolean signalDetected) {
263
+
// ...
264
+
}
265
+
```
266
+
*`onCadDone` - function to call when channel activity detection has done.
267
+
*`signalDetected` - if `true`, the radio detects the presence of other LoRa signals.
268
+
269
+
### Channel Activity detection mode
270
+
Puts the radio in channel activity detection mode.
0 commit comments