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. ...@@ -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. 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 // Replace! "CustomName" to the name of your device. Password - maximum length (14)! characters
#define PASSWORD "Galaxy A70" #define PASSWORD "CustomName"
void setup() { void setup() {
/* Start the Serial and btle. */ /* Start the Serial and btle. */
......
...@@ -8,8 +8,7 @@ BTLE btle(&radio); ...@@ -8,8 +8,7 @@ BTLE btle(&radio);
void setup() { void setup() {
Serial.begin(9600); Serial.begin(9600);
while (!Serial) { } // Serial.println("BTLE advertisement sender");
Serial.println("BTLE advertisement sender");
btle.begin("foobar"); btle.begin("foobar");
} }
......
...@@ -19,7 +19,7 @@ BTLE btle(&radio); // Create BTLE object to work with the BTLE library. ...@@ -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. /* Replace! "CustomName" to the name of your device. Password - maximum length (14)! characters.
It's for recognizing the correct data packets. */ It's for recognizing the correct data packets. */
#define PASSWORD "Galaxy A70" #define PASSWORD "CustomName"
/* Define functions used for the robot to control */ /* Define functions used for the robot to control */
/* Stop the robot */ /* Stop the robot */
...@@ -29,23 +29,23 @@ void setWheelsStop() { ...@@ -29,23 +29,23 @@ void setWheelsStop() {
} }
/* Drive forward */ /* Drive forward */
void setWheelsForward(){ void setWheelsForward(){
rightWheel.write(1300); rightWheel.writeMicroseconds(1300);
leftWheel.write(1700); leftWheel.writeMicroseconds(1700);
} }
/* Drive right */ /* Drive right */
void setWheelsRight(){ void setWheelsRight(){
rightWheel.write(1700); rightWheel.writeMicroseconds(1700);
leftWheel.write(1700); leftWheel.writeMicroseconds(1700);
} }
/* Drive left */ /* Drive left */
void setWheelsLeft(){ void setWheelsLeft(){
rightWheel.write(1300); rightWheel.writeMicroseconds(1300);
leftWheel.write(1300); leftWheel.writeMicroseconds(1300);
} }
/* Drive backward */ /* Drive backward */
void setWheelsBackward(){ void setWheelsBackward(){
rightWheel.write(1700); rightWheel.writeMicroseconds(1700);
leftWheel.write(1300); leftWheel.writeMicroseconds(1300);
} }
void setup() { 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