FAQ | This is a LIVE service | Changelog

Skip to content
Snippets Groups Projects
Commit 48b09575 authored by ayush1301's avatar ayush1301
Browse files

added region 4

parent 464cca4e
No related branches found
No related tags found
No related merge requests found
......@@ -145,7 +145,7 @@ void loop() {
}
}
}
else if (region == 1 || region == 3) { //Junction detect region
else if (region == 1 || region == 3 || region == 4) { //Junction detect region
Serial.print("We are in region ");
Serial.println(region);
while (true) {
......@@ -189,7 +189,7 @@ void loop() {
turn_around(turn_around_time, 255, right);
region += 1;
}
else {
else if (region == 3) {
Serial.println("REGION 3 bois");
if (is_metal) {
turn_around(turn_around_time/2, 255, right);
......@@ -206,6 +206,12 @@ void loop() {
}
region += 1;
move_both(motors, 0);
}
//region 4
else {
move_both(motors, 255);
delay(700);
move_both(motors, 0);
while(1);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment