Wouter van Kleunen
/
Saxion_nRF24L01P_Hello_World
nRF24L01P Hello World example for mbed 6
Diff: main.cpp
- Revision:
- 3:c3afd479d9d8
- Parent:
- 2:d7d36199d4e4
- Child:
- 4:6ec07c83786b
--- a/main.cpp Wed Apr 14 15:23:48 2021 +0000 +++ b/main.cpp Wed Apr 14 17:25:45 2021 +0000 @@ -3,10 +3,7 @@ BufferedSerial pc(USBTX, USBRX); // tx, rx -nRF24L01P my_nrf24l01p(D5, D6, D7, D8, D9, D10); // mosi, miso, sck, csn, ce, irq - -DigitalOut myled1(LED1); -DigitalOut myled2(LED2); +nRF24L01P my_nrf24l01p(D11, D12, D13, D8, D9, D7); // mosi, miso, sck, csn, ce, irq FileHandle *mbed::mbed_override_console(int fd) { @@ -57,9 +54,6 @@ txDataCnt = 0; } - - // Toggle LED1 (to help debug Host -> nRF24L01+ communication) - myled1 = !myled1; } // If we've received anything in the nRF24L01+... @@ -73,9 +67,6 @@ pc.write(&rxData[i], sizeof(char)); } - - // Toggle LED2 (to help debug nRF24L01+ -> Host communication) - myled2 = !myled2; } } }