Skip to content

Commit

Permalink
fix bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
dino committed Oct 21, 2021
1 parent cf8571a commit 9d0e0a2
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions examples/9.color_tracking.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@
panAngle = None
tiltAngle = None

Vilib.camera_start(True)

Vilib.camera_start(inverted_flag=True)
Vilib.display(local=True,web=True)
Vilib.color_detect_switch(True)
Vilib.detect_color_name('red')
panAngle = 0
Expand Down Expand Up @@ -53,9 +55,5 @@ def forever():
Servo(pwm_P1).angle(tiltAngle)

if __name__ == "__main__":
# while True:
# forever()
pwm_P0 = PWM("P0")
pwm_P1 = PWM("P1")
Servo(pwm_P0).angle(20)
Servo(pwm_P1).angle(20)
while True:
forever()

0 comments on commit 9d0e0a2

Please sign in to comment.