mirror of
https://github.com/undera/pylgbst.git
synced 2020-11-18 19:37:26 -08:00
Remove non-working thing
This commit is contained in:
parent
8f65d1553a
commit
b2a83f6438
@ -7,11 +7,6 @@ robot.say("Place your hand in front of sensor")
|
|||||||
|
|
||||||
|
|
||||||
def callback(color, distance):
|
def callback(color, distance):
|
||||||
if color == COLOR_WHITE:
|
|
||||||
robot.motor_AB.timed(0.1, 0.2, async=True)
|
|
||||||
elif color != COLOR_NONE:
|
|
||||||
print(color)
|
|
||||||
else:
|
|
||||||
speed = (10 - distance + 1) / 10.0
|
speed = (10 - distance + 1) / 10.0
|
||||||
secs = (10 - distance + 1) / 10.0
|
secs = (10 - distance + 1) / 10.0
|
||||||
print("Distance is %.1f inches, I'm running back with %s%% speed!" % (distance, int(speed * 100)))
|
print("Distance is %.1f inches, I'm running back with %s%% speed!" % (distance, int(speed * 100)))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user