Wouter van Kleunen
/
Saxion_nRF24L01P_Hello_World
nRF24L01P Hello World example for mbed 6
Diff: main.cpp
- Revision:
- 6:18ce87bf9df0
- Parent:
- 4:6ec07c83786b
- Child:
- 7:bf48b7619285
diff -r 50a2a3c2d002 -r 18ce87bf9df0 main.cpp --- a/main.cpp Wed Apr 14 17:34:39 2021 +0000 +++ b/main.cpp Thu May 20 12:56:14 2021 +0000 @@ -11,7 +11,7 @@ } int main() { - enum { TRANSFER_SIZE }; + enum { TRANSFER_SIZE = 1 }; char txData[TRANSFER_SIZE], rxData[TRANSFER_SIZE]; int txDataCnt = 0; @@ -29,7 +29,8 @@ printf( "Type keys to test transfers:\r\n"); my_nrf24l01p.setTransferSize( TRANSFER_SIZE ); - + my_nrf24l01p.setRfFrequency(NRF24L01P_MAX_RF_FREQUENCY); + my_nrf24l01p.setReceiveMode(); my_nrf24l01p.enable();