Commit 7fdc12f4 by satsob

nRF Robot Stuff

parent c919cdb1
......@@ -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. */
......
......@@ -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");
}
......
......@@ -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.writeMicroseconds(1300);
leftWheel.writeMicroseconds(1700);
}
/* Drive right */
void setWheelsRight(){
rightWheel.write(1700);
leftWheel.write(1700);
rightWheel.writeMicroseconds(1700);
leftWheel.writeMicroseconds(1700);
}
/* Drive left */
void setWheelsLeft(){
rightWheel.write(1300);
leftWheel.write(1300);
rightWheel.writeMicroseconds(1300);
leftWheel.writeMicroseconds(1300);
}
/* Drive backward */
void setWheelsBackward(){
rightWheel.write(1700);
leftWheel.write(1300);
rightWheel.writeMicroseconds(1700);
leftWheel.writeMicroseconds(1300);
}
void setup() {
......
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 sign in to comment