mirror of
https://github.com/eclipse/upm.git
synced 2025-03-24 01:10:22 +03:00
es08a: Add output to python example
Signed-off-by: Sarah Knepper <sarah.knepper@intel.com>
This commit is contained in:
parent
de70ed8694
commit
09659c62f3
@ -29,14 +29,17 @@ gServo = servo.ES08A(5)
|
|||||||
for i in range(0,10):
|
for i in range(0,10):
|
||||||
# Set the servo arm to 0 degrees
|
# Set the servo arm to 0 degrees
|
||||||
gServo.setAngle(0)
|
gServo.setAngle(0)
|
||||||
|
print 'Set angle to 0'
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
|
|
||||||
# Set the servo arm to 90 degrees
|
# Set the servo arm to 90 degrees
|
||||||
gServo.setAngle(90)
|
gServo.setAngle(90)
|
||||||
|
print 'Set angle to 90'
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
|
|
||||||
# Set the servo arm to 180 degrees
|
# Set the servo arm to 180 degrees
|
||||||
gServo.setAngle(180)
|
gServo.setAngle(180)
|
||||||
|
print 'Set angle to 180'
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
|
|
||||||
# Delete the servo object
|
# Delete the servo object
|
||||||
|
Loading…
x
Reference in New Issue
Block a user