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.
Dependencies: mbed 4DGL-uLCD-SE mbed-rtos nRF24L01P
Diff: main.cpp
- Revision:
- 22:e835b3490280
- Parent:
- 21:95009b231c1f
- Child:
- 23:3504e0899359
- Child:
- 25:02cdaf98e4ab
--- a/main.cpp Sat Apr 21 16:47:02 2018 +0000 +++ b/main.cpp Sat Apr 21 16:54:34 2018 +0000 @@ -119,6 +119,7 @@ { uint8_t spkrarray[29]; while (Button == 0) { + mode = RECEIVE; if (my_nrf24l01p.readable(0)) { rxbuff.push(spkrarray, 30); spkr.write(spkrarray[1]); @@ -134,6 +135,7 @@ // txData[txDataCnt++] = ; spkr.turnOff(); while (Button == 1) { + mode = TRANSMIT; my_nrf24l01p.write(0, (char *)micvalue, 30); } } @@ -188,6 +190,8 @@ my_nrf24l01p.setReceiveMode(); my_nrf24l01p.enable(); + mode = RECEIVE; + // Initialize the uLCD uLCD.baudrate(3000000); uLCD.background_color(BLACK);