Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: main.cpp
- Branch:
- RF24_library_test_tx
- Revision:
- 9:d85804e8d3b3
- Parent:
- 8:78294b936c70
- Child:
- 10:02d3ca034103
diff -r 78294b936c70 -r d85804e8d3b3 main.cpp
--- a/main.cpp Sun Nov 25 10:34:05 2018 +0000
+++ b/main.cpp Sun Nov 25 10:44:40 2018 +0000
@@ -16,8 +16,8 @@
nRF24L01P nrf(spi_MOSI, spi_MISO, spi_SCK, nrf_CSN, nrf_CE, spi_IRQ); // mosi, miso, sck, csn, ce, irq
-volatile int role = PING;
-//volatile int role = PONG;
+//volatile int role = PING;
+volatile int role = PONG;
Serial pc(USBTX, USBRX);
Serial lidar(D1, D0);
@@ -92,8 +92,8 @@
//printf("transmitting\r\n");
txDataCnt++;
getPayload(id, txDataCnt, lspeed, rspeed, txData);
- pc.printf("%s\r\n", txData);
- char txData_[] = "123456789ABCD";
+ pc.printf("PING:%s\r\n", txData);
+ //char txData_[] = "123456789ABCD";
nrf.write(NRF24L01P_PIPE_P0, txData, TRANSFER_SIZE);
wait(0.2);
}