Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
satsob
/
Robotite_ylesannete_projekt
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
2f0a6a47
authored
Oct 05, 2020
by
satsob
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nRF Robot
parent
ac4e4521
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
7 deletions
nRF_BTLE_ReceiveData/nRF_RobotControl/nRF_RobotControl.ino
nRF_BTLE_ReceiveData/nRF_RobotControl/nRF_RobotControl.ino
View file @
2f0a6a47
...
...
@@ -19,7 +19,7 @@ BTLE btle(&radio); // Create BTLE object to work with the BTLE library.
/* Replace! "CustomName" to the name of your device. Password - maximum length (14)! characters.
It's for recognizing the correct data packets. */
#define PASSWORD "
CustomName
"
#define PASSWORD "
Galaxy A70
"
/* Define functions used for the robot to control */
/* Stop the robot */
...
...
@@ -58,7 +58,7 @@ void setup() {
leftWheel
.
attach
(
leftServo
);
/* Put servos to standstill */
//setWheels();
//setWheels
Stop
();
}
void
loop
()
{
...
...
@@ -92,21 +92,22 @@ void loop() {
delay
(
100
);
}
else
if
((
char
(
str
.
charAt
(
2
)))
==
5
)
{
Serial
.
println
(
"
FOR
WARD"
);
setWheels
For
ward
();
Serial
.
println
(
"
BACK
WARD"
);
setWheels
Back
ward
();
delay
(
100
);
}
else
if
((
char
(
str
.
charAt
(
2
)))
==
4
)
{
Serial
.
println
(
"
BACK
WARD"
);
setWheels
Back
ward
();
Serial
.
println
(
"
FOR
WARD"
);
setWheels
For
ward
();
delay
(
100
);
}
}
else
{
Serial
.
println
(
"STOP"
);
setWheelsStop
();
delay
(
100
);
}
}
}
/* Hop channels through 37-39 to scan for data transmissions */
btle
.
hopChannel
();
...
...
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