initial canny edge dect code

This commit is contained in:
Siwat Sirichai 2022-11-14 23:28:46 +07:00
parent ed2cf31221
commit e7db5e4dfb
4 changed files with 124 additions and 2 deletions

View file

@ -96,6 +96,7 @@ class motion:
self.drive(0)
def roam_start(self):
self.drive(25)
self.roaming = True
def roam_stop(self):
@ -117,7 +118,6 @@ class motion:
turn_speed = 40
drive_speed = 25
self.drive(drive_speed)
f_dist = self.sensors.sonar_get_distance(1)
if 0 < f_dist < sensitivity: # Close to collision, turn the vehicle
print("collision")