This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DISTANCE_THRESHOLD_CM = 0 | |
while True: | |
# all coordinates are in cm | |
DISTANCE_THRESHOLD_CM += 10 | |
origin = Point(0,0) | |
curr_pos = origin | |
curr_orientation = Point(0,1) | |
corners = [] | |
while True: | |
if is_there_obstacle(distance_sensor_R, DISTANCE_THRESHOLD_CM): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# remember to change the GPIO values below to match your sensors | |
# GPIO output = the pin that's connected to "Trig" on the sensor | |
# GPIO input = the pin that's connected to "Echo" on the sensor | |
# This codes origin from http://goo.gl/Z2REoj | |
class UsonicSensor: | |
def __init__(self): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Servo.h> | |
Servo servoMain; // Define our Servo | |
void setup() | |
{ | |
servoMain.attach(10); // servo on digital pin 10 | |
Serial.begin(9600) | |
} | |