We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents fe66035 + 0f09c01 commit 1985550Copy full SHA for 1985550
2 files changed
CircuitPython_Templates/i2c_find_pins/code.py
@@ -29,6 +29,10 @@ def get_unique_pins():
29
"LED",
30
"SWITCH",
31
"BUTTON",
32
+ "ACCELEROMETER_INTERRUPT",
33
+ "VOLTAGE_MONITOR",
34
+ "MICROPHONE_CLOCK",
35
+ "MICROPHONE_DATA",
36
]
37
if p in dir(board)
38
EyeLights_LED_Glasses_and_Driver/Digital_Input/code.py
@@ -0,0 +1,17 @@
1
+"""
2
+CircuitPython Digital Input Example - Blinking an LED using a button switch.
3
4
+import board
5
+import digitalio
6
+
7
+led = digitalio.DigitalInOut(board.LED)
8
+led.direction = digitalio.Direction.OUTPUT
9
10
+button = digitalio.DigitalInOut(board.SWITCH)
11
+button.switch_to_input(pull=digitalio.Pull.UP)
12
13
+while True:
14
+ if not button.value:
15
+ led.value = True
16
+ else:
17
+ led.value = False
0 commit comments