Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
uPython-mirror
Commits
a5bed537
Commit
a5bed537
authored
Jan 29, 2017
by
Paul Sokolovsky
Browse files
examples/hwapi: Consistently use Signal class to define LEDs.
parent
297af603
Changes
2
Hide whitespace changes
Inline
Side-by-side
examples/hwapi/hwconfig_dragonboard410c.py
View file @
a5bed537
...
...
@@ -13,10 +13,10 @@ from machine import Pin
# echo -n "gpio_keys" >/sys/class/input/input1/device/driver/unbind
# User LED 1 on gpio21
LED
=
Pin
(
21
,
Pin
.
OUT
)
LED
=
Signal
(
Pin
(
21
,
Pin
.
OUT
)
)
# User LED 2 on gpio120
LED2
=
Pin
(
120
,
Pin
.
OUT
)
LED2
=
Signal
(
Pin
(
120
,
Pin
.
OUT
)
)
# Button S3 on gpio107
BUTTON
=
Pin
(
107
,
Pin
.
IN
)
examples/hwapi/hwconfig_z_frdm_k64f.py
View file @
a5bed537
...
...
@@ -2,4 +2,4 @@ from machine import Pin
# Freescale/NXP FRDM-K64F board
# Blue LED on port B, pin 21
LED
=
Pin
((
"GPIO_1"
,
21
),
Pin
.
OUT
)
LED
=
Signal
(
Pin
((
"GPIO_1"
,
21
),
Pin
.
OUT
)
)
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment