File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
CircuitPython_Templates/asyncio Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change 5
5
"""
6
6
CircuitPython asyncio example for two NeoPixel rings and one button.
7
7
REMOVE THIS LINE AND THE REST OF THIS DOCSTRING BEFORE SUBMITTING TO LEARN
8
+ THERE ARE TWO POSSIBLE THINGS IN THE CODE TO UPDATE.
8
9
9
- Update BUTTON to the pin that matches the pin to which the button is connected.
10
+ One: Update BUTTON to the pin that matches the pin to which the button is connected.
10
11
11
12
For example, on the QT Py RP2040, you would leave it as BUTTON to use the built-in Boot button.
13
+ On the FunHouse, you would update BUTTON to BUTTON_UP to use the built-in up button.
12
14
On the Feather M4 Express, you would wire the external button to A0, and update BUTTON to A0.
15
+
16
+ Two: THIS IS ONLY NECESSARY IF THE BUILT-IN BUTTON IS ACTIVE HIGH. For example the built-in
17
+ buttons on the Circuit Playground Bluefruit and the MagTag are active high.
18
+ If your button is ACTIVE HIGH, under "async def monitor_button(button, animation_controls)",
19
+ update the following line of code:
20
+ with keypad.Keys((button,), value_when_pressed=False, pull=True) as key:
21
+ To the following:
22
+ with keypad.Keys((button,), value_when_pressed=True, pull=True) as key:
13
23
"""
14
24
import asyncio
15
25
import board
You can’t perform that action at this time.
0 commit comments