Skip to content

Commit cb5daf4

Browse files
authored
Merge pull request #197 from kattni/cpx-express-lib
Added red LED to single-double tap code.
2 parents 78182dc + b4879da commit cb5daf4

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

CircuitPython_Made_Easy_On_CPX/cpx_tap_single_double.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,20 @@
77
# We're looking for 2 single-taps before moving on.
88
while tap_count < 2:
99
if cpx.tapped:
10+
print("Single-tap!")
1011
tap_count += 1
1112
print("Reached 2 single-taps!")
1213

13-
# Now switch to checking for double-taps
14+
# Now switch to checking for double-taps.
1415
tap_count = 0
1516
cpx.detect_taps = 2
1617

1718
# We're looking for 2 double-taps before moving on.
1819
while tap_count < 2:
1920
if cpx.tapped:
21+
print("Double-tap!")
2022
tap_count += 1
23+
2124
print("Reached 2 double-taps!")
25+
cpx.red_led = True
2226
print("Done.")

0 commit comments

Comments
 (0)