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
@@ -242,6 +242,27 @@ Returns the next byte in the packet or `-1` if no bytes are available.
242
242
243
243
**Note:** Other Arduino [`Stream` API's](https://www.arduino.cc/en/Reference/Stream) can also be used to read data from the packet
244
244
245
+
## Channel Activity Detection
246
+
**WARNING**: Channel activity detection callback uses the interrupt pin on the `dio0`, check `setPins` function!
247
+
248
+
### Register callback
249
+
250
+
Register a callback function for when channel activity detection has done.
251
+
```arduino
252
+
LoRa.onCadDone(onCadDone);
253
+
254
+
void onCadDone(boolean signalDetected) {
255
+
// ...
256
+
}
257
+
```
258
+
*`onCadDone` - function to call when channel activity detection has done.
259
+
*`signalDetected` - if `true`, the radio detects the presence of other LoRa signals.
260
+
261
+
### Channel Activity detection mode
262
+
Puts the radio in channel activity detection mode.
0 commit comments