Skip to content

Instantly share code, notes, and snippets.

View thefzsalam's full-sized avatar

Farzeen thefzsalam

  • Kerala, India
View GitHub Profile
@thefzsalam
thefzsalam / main.py
Created March 25, 2018 10:26
Final section of main.py
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):
#!/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):
#include <Servo.h>
Servo servoMain; // Define our Servo
void setup()
{
servoMain.attach(10); // servo on digital pin 10
Serial.begin(9600)
}