Gateway stuff
Fork of nRF24L01P_Hello_World_Gateway by
Revision 3:116f9c1d405a, committed 2015-07-21
- Comitter:
- jaehughes
- Date:
- Tue Jul 21 15:23:43 2015 +0000
- Parent:
- 2:2a982b2cda5e
- Commit message:
- Gateway stuff.
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
mbed.lib | Show annotated file Show diff for this revision Revisions of this file |
diff -r 2a982b2cda5e -r 116f9c1d405a main.cpp --- a/main.cpp Sat May 30 12:55:43 2015 +0000 +++ b/main.cpp Tue Jul 21 15:23:43 2015 +0000 @@ -3,7 +3,9 @@ Serial pc(USBTX, USBRX); // tx, rx -nRF24L01P my_nrf24l01p(p11, p12, p13, p14, p15, p10); // mosi, miso, sck, csn, ce, irq +//nRF24L01P my_nrf24l01p(p11, p12, p13, p14, p15, p10); // mosi, miso, sck, csn, ce, irq +//nRF24L01P my_nrf24l01p(PTD2, PTD3, PTD1, PTE1, PTE0, PTD0); +nRF24L01P my_nrf24l01p(p5, p6, p7, p9, p10, p8); // mosi, miso, sck, csn, ce, irq DigitalOut myled1(LED1); DigitalOut myled2(LED2); @@ -13,7 +15,7 @@ // The nRF24L01+ supports transfers from 1 to 32 bytes, but Sparkfun's // "Nordic Serial Interface Board" (http://www.sparkfun.com/products/9019) // only handles 4 byte transfers in the ATMega code. -#define TRANSFER_SIZE 4 +#define TRANSFER_SIZE 24 char txData[TRANSFER_SIZE], rxData[TRANSFER_SIZE]; int txDataCnt = 0; @@ -22,14 +24,15 @@ my_nrf24l01p.powerUp(); // Display the (default) setup of the nRF24L01+ chip - pc.printf( "nRF24L01+ Frequency : %d MHz\r\n", my_nrf24l01p.getRfFrequency() ); + + /* pc.printf( "nRF24L01+ Frequency : %d MHz\r\n", my_nrf24l01p.getRfFrequency() ); pc.printf( "nRF24L01+ Output power : %d dBm\r\n", my_nrf24l01p.getRfOutputPower() ); pc.printf( "nRF24L01+ Data Rate : %d kbps\r\n", my_nrf24l01p.getAirDataRate() ); pc.printf( "nRF24L01+ TX Address : 0x%010llX\r\n", my_nrf24l01p.getTxAddress() ); pc.printf( "nRF24L01+ RX Address : 0x%010llX\r\n", my_nrf24l01p.getRxAddress() ); pc.printf( "Type keys to test transfers:\r\n (transfers are grouped into %d characters)\r\n", TRANSFER_SIZE ); - +*/ my_nrf24l01p.setTransferSize( TRANSFER_SIZE ); my_nrf24l01p.setReceiveMode();
diff -r 2a982b2cda5e -r 116f9c1d405a mbed.lib --- a/mbed.lib Sat May 30 12:55:43 2015 +0000 +++ b/mbed.lib Tue Jul 21 15:23:43 2015 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/users/mbed_official/code/mbed/#e2ac27c8e93e +http://mbed.org/users/mbed_official/code/mbed/#cbbeb26dbd92