generated from pimoroni/boilerplate-micropython
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a1636ae
commit 88cf9f6
Showing
1 changed file
with
25 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,25 @@ | ||
import time | ||
|
||
from machine import I2C | ||
|
||
from qwstpad import QwSTPad | ||
|
||
""" | ||
""" | ||
|
||
# Constants | ||
SLEEP = 0.1 # The time between each reading of the buttons | ||
|
||
# Create the I2C instance and pass that to the QwSTPad | ||
i2c = I2C(0, scl=13, sda=12) | ||
qwstpad = QwSTPad(i2c) | ||
|
||
# Loop forever | ||
while True: | ||
# Read all the buttons from the qwstpad and print them out | ||
buttons = qwstpad.read_buttons() | ||
for key, value in buttons.items(): | ||
print(f"{key} = {value:n}", end=", ") | ||
print() | ||
|
||
time.sleep(SLEEP) | ||
import time | ||
|
||
from machine import I2C | ||
|
||
from qwstpad import QwSTPad | ||
|
||
""" | ||
""" | ||
|
||
# Constants | ||
SLEEP = 0.1 # The time between each reading of the buttons | ||
|
||
# Create the I2C instance and pass that to the QwSTPad | ||
i2c = I2C(0, scl=13, sda=12) | ||
qwstpad = QwSTPad(i2c) | ||
|
||
# Loop forever | ||
while True: | ||
# Read all the buttons from the qwstpad and print them out | ||
buttons = qwstpad.read_buttons() | ||
for key, value in buttons.items(): | ||
print(f"{key} = {value:n}", end=", ") | ||
print() | ||
|
||
time.sleep(SLEEP) |