Commit 2f0a6a47 by satsob

nRF Robot

parent ac4e4521
......@@ -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();
//setWheelsStop();
}
void loop() {
......@@ -92,20 +92,21 @@ void loop() {
delay(100);
}
else if ((char (str.charAt(2))) == 5) {
Serial.println("FORWARD");
setWheelsForward();
Serial.println("BACKWARD");
setWheelsBackward();
delay(100);
}
else if ((char (str.charAt(2))) == 4) {
Serial.println("BACKWARD");
setWheelsBackward();
Serial.println("FORWARD");
setWheelsForward();
delay(100);
}
else {
}
else {
Serial.println("STOP");
setWheelsStop();
delay(100);
}
}
}
/* Hop channels through 37-39 to scan for data transmissions */
......
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