Commit a0c80875 authored by TMRh20's avatar TMRh20

Merge pull request #45 from k2OS/master

Updated led_example.pde to work with newer version of library.
parents 91868e74 65d7fc16
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
// Hardware configuration // Hardware configuration
// //
// Set up nRF24L01 radio on SPI bus plus pins 9 & 10 // Set up nRF24L01 radio on SPI bus plus pins 9 & 10 (CE & CS)
RF24 radio(9,10); RF24 radio(9,10);
...@@ -229,11 +229,10 @@ void loop(void) ...@@ -229,11 +229,10 @@ void loop(void)
if ( radio.available() ) if ( radio.available() )
{ {
// Dump the payloads until we've gotten everything // Dump the payloads until we've gotten everything
bool done = false; while (radio.available())
while (!done)
{ {
// Fetch the payload, and see if this was the last one. // Fetch the payload, and see if this was the last one.
done = radio.read( button_states, num_button_pins ); radio.read( button_states, num_button_pins );
// Spew it // Spew it
printf("Got buttons\n\r"); printf("Got buttons\n\r");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment