From aebc09868861b2a7cad73abd478fd8198d66bafb Mon Sep 17 00:00:00 2001 From: Kattni Rembor Date: Thu, 2 Jan 2020 10:42:22 -0500 Subject: [PATCH 1/2] Updating to use double-tap. --- examples/circuitplayground_tapdetect.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/circuitplayground_tapdetect.py b/examples/circuitplayground_tapdetect.py index a37895a..5e407e1 100644 --- a/examples/circuitplayground_tapdetect.py +++ b/examples/circuitplayground_tapdetect.py @@ -1,8 +1,8 @@ -"""This example prints to the serial console when the board is tapped.""" +"""This example prints to the serial console when the board is double-tapped.""" from adafruit_circuitplayground import cp -cp.detect_taps = 1 +cp.detect_taps = 2 while True: if cp.tapped: - print("Single tap detected!") + print("Tapped!") From fba4b4728bbd0c99d02ca456f90a33f6fb3f7b90 Mon Sep 17 00:00:00 2001 From: Kattni Rembor Date: Thu, 2 Jan 2020 10:43:38 -0500 Subject: [PATCH 2/2] Add comment. --- examples/circuitplayground_tapdetect.py | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/circuitplayground_tapdetect.py b/examples/circuitplayground_tapdetect.py index 5e407e1..fc1e688 100644 --- a/examples/circuitplayground_tapdetect.py +++ b/examples/circuitplayground_tapdetect.py @@ -1,6 +1,7 @@ """This example prints to the serial console when the board is double-tapped.""" from adafruit_circuitplayground import cp +# Change to 1 for single-tap detection. cp.detect_taps = 2 while True: