Skip to content

Commit c883cd2

Browse files
committed
Update GyroBalancer.py for python 3
1 parent 6f9f1f5 commit c883cd2

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

ev3dev/GyroBalancer.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python3
22
# The MIT License (MIT)
33
#
44
# Copyright (c) 2016 Laurens Valk ([email protected])
@@ -294,8 +294,8 @@ def shutdown():
294294
## Calibrate Gyro
295295
##
296296
########################################################################
297-
print "-----------------------------------"
298-
print "Calibrating..."
297+
print("-----------------------------------")
298+
print("Calibrating...")
299299

300300
#As you hold the robot still, determine the average sensor value of 100 samples
301301
gyroRateCalibrateCount = 100
@@ -305,10 +305,10 @@ def shutdown():
305305
gyroOffset = gyroOffset/gyroRateCalibrateCount
306306

307307
# Print the result
308-
print "GyroOffset: %s" % gyroOffset
309-
print "-----------------------------------"
310-
print "GO!"
311-
print "-----------------------------------"
308+
print("GyroOffset: %s" % gyroOffset)
309+
print("-----------------------------------")
310+
print("GO!")
311+
print("-----------------------------------")
312312

313313
########################################################################
314314
##

0 commit comments

Comments
 (0)