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
7fdc12f4
authored
Oct 07, 2020
by
satsob
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nRF Robot Stuff
parent
c919cdb1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
12 deletions
nRF_BTLE_ReceiveData/nRF_BTLE_ReceiveData.ino
nRF_BTLE_ReceiveData/nRF_BTLE_SendData/nRF_BTLE_SendData.ino
nRF_BTLE_ReceiveData/nRF_RobotControl/nRF_RobotControl.ino
nRF_BTLE_ReceiveData/nRF_BTLE_ReceiveData.ino
View file @
7fdc12f4
...
...
@@ -7,7 +7,7 @@ RF24 radio(9,10); // Create RF24 object to work with the RF24 library.
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
#define PASSWORD "
Galaxy A70
"
#define PASSWORD "
CustomName
"
void
setup
()
{
/* Start the Serial and btle. */
...
...
nRF_BTLE_ReceiveData/nRF_BTLE_SendData/nRF_BTLE_SendData.ino
View file @
7fdc12f4
...
...
@@ -8,8 +8,7 @@ BTLE btle(&radio);
void
setup
()
{
Serial
.
begin
(
9600
);
while
(
!
Serial
)
{
}
Serial
.
println
(
"BTLE advertisement sender"
);
// Serial.println("BTLE advertisement sender");
btle
.
begin
(
"foobar"
);
}
...
...
nRF_BTLE_ReceiveData/nRF_RobotControl/nRF_RobotControl.ino
View file @
7fdc12f4
...
...
@@ -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 "
Galaxy A70
"
#define PASSWORD "
CustomName
"
/* Define functions used for the robot to control */
/* Stop the robot */
...
...
@@ -29,23 +29,23 @@ void setWheelsStop() {
}
/* Drive forward */
void
setWheelsForward
(){
rightWheel
.
write
(
1300
);
leftWheel
.
write
(
1700
);
rightWheel
.
write
Microseconds
(
1300
);
leftWheel
.
write
Microseconds
(
1700
);
}
/* Drive right */
void
setWheelsRight
(){
rightWheel
.
write
(
1700
);
leftWheel
.
write
(
1700
);
rightWheel
.
write
Microseconds
(
1700
);
leftWheel
.
write
Microseconds
(
1700
);
}
/* Drive left */
void
setWheelsLeft
(){
rightWheel
.
write
(
1300
);
leftWheel
.
write
(
1300
);
rightWheel
.
write
Microseconds
(
1300
);
leftWheel
.
write
Microseconds
(
1300
);
}
/* Drive backward */
void
setWheelsBackward
(){
rightWheel
.
write
(
1700
);
leftWheel
.
write
(
1300
);
rightWheel
.
write
Microseconds
(
1700
);
leftWheel
.
write
Microseconds
(
1300
);
}
void
setup
()
{
...
...
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