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-os nRF24L01P
Diff: main.cpp
- Revision:
- 12:155a1ce7c92b
- Parent:
- 11:dfaa218e7949
- Child:
- 13:f8a0252d346e
diff -r dfaa218e7949 -r 155a1ce7c92b main.cpp
--- a/main.cpp Fri Jan 14 07:52:26 2022 +0000
+++ b/main.cpp Fri Feb 11 08:19:10 2022 +0000
@@ -23,7 +23,7 @@
int main()
{
-#define TRANSFER_SIZE 32
+#define TRANSFER_SIZE 12
char c;
@@ -41,11 +41,11 @@
while (1) {
if (pc.readable())
{
- for (int i=0; i<32 ; i++){
+ for (int i=0; i< TRANSFER_SIZE ; i++){
pc.read(&c+i,1);
}
- pc.write(&c,32);
- my_nrf24l01p.write( NRF24L01P_PIPE_P0, &c ,32);
+ my_nrf24l01p.write( NRF24L01P_PIPE_P0, &c ,TRANSFER_SIZE);
+ pc.write(&c,TRANSFER_SIZE);
}
}