Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
libbob3
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
herzi
P
project
bob3
libbob3
Commits
7786547e
Commit
7786547e
authored
Oct 12, 2018
by
Sebastian Neuser
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add small example program
parent
4814c0d4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
0 deletions
+21
-0
.gitignore
.gitignore
+3
-0
example.cpp
example.cpp
+18
-0
No files found.
.gitignore
0 → 100644
View file @
7786547e
*.o
/*.elf
/*.hex
example.cpp
0 → 100644
View file @
7786547e
#include <BOB3.h>
void
setup
()
{
bob3
.
enableIRSensor
(
true
);
}
void
loop
()
{
int16_t
proximity
=
bob3
.
getIRSensor
();
int16_t
red
=
proximity
;
int16_t
green
=
15
-
proximity
;
green
=
green
<
0
?
0
:
green
;
uint16_t
color
=
rgb
(
red
,
green
,
0
);
bob3
.
setEyes
(
color
,
color
);
bob3
.
setWhiteLeds
(
bob3
.
getArm
(
1
),
bob3
.
getArm
(
2
));
}
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