Skip to content

Commit 617bb07

Browse files
authored
Merge pull request #16 from caternuson/example_update
Update drive example
2 parents a168680 + 9ebcde9 commit 617bb07

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

examples/crickit_drive_simpletest.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,14 @@
44

55
from adafruit_crickit import crickit
66

7+
# For Circuit Playground Express, micro:bit, and RPi Crickit, use:
8+
drive_1 = crickit.drive_1
9+
# For Feather Crickit, use:
10+
#drive_1 = crickit.feather_drive_1
11+
712
# Turn on Drive 1 for 1 second and then off for 1 second
813
while True:
9-
crickit.drive_1.fraction = 1.0
14+
drive_1.fraction = 1.0
1015
time.sleep(1)
11-
crickit.drive_1.fraction = 0.0
16+
drive_1.fraction = 0.0
1217
time.sleep(1)

0 commit comments

Comments
 (0)