Skip to content

Commit cf5a239

Browse files
committed
removed advanced example as just a combo
1 parent 396ecb1 commit cf5a239

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

docs/examples/touch_sensor.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
1-
from picozero import TouchSensor
1+
from picozero import TouchSensor, pico_led
22
from time import sleep
33

4+
# Capacitive touch sensor output connected to pin 2
45
touch = TouchSensor(2)
56

6-
print("Touch the sensor...")
7-
87
while True:
98
if touch.is_touched:
10-
print("Touch detected!")
9+
pico_led.on()
1110
else:
12-
print("No touch")
11+
pico_led.off()
1312
sleep(0.1)

0 commit comments

Comments
 (0)