Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
RF24
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
RF24
Commits
65d7fc16
Commit
65d7fc16
authored
Nov 28, 2014
by
René Mikkelsen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated led_example.pde to work with newer version of library.
parent
bfd62ead
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
+3
-4
examples/Usage/led_remote/led_remote.pde
examples/Usage/led_remote/led_remote.pde
+3
-4
No files found.
examples/Usage/led_remote/led_remote.pde
View file @
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
"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment