mirror of
https://github.com/micropython/micropython.git
synced 2025-08-27 13:00:36 +02:00
examples/hwapi: Consistently use Signal class to define LEDs.
This commit is contained in:
@@ -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)
|
||||
|
@@ -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))
|
||||
|
Reference in New Issue
Block a user