현성 김 / Mbed 2 deprecated 181202_Castone_design_master

Dependencies:   mbed nRF24L01P

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);
         }