2017-02-08 23:21:57 -05:00
|
|
|
from machine import Pin, Signal
|
2016-11-09 17:48:26 -05:00
|
|
|
|
|
|
|
# 96Boards/Qualcomm DragonBoard 410c
|
2016-11-11 16:09:20 -05:00
|
|
|
#
|
2016-11-09 17:48:26 -05:00
|
|
|
# By default, on-board LEDs are controlled by kernel LED driver.
|
|
|
|
# To make corresponding pins be available as normal GPIO,
|
|
|
|
# corresponding driver needs to be unbound first (as root):
|
|
|
|
# echo -n "soc:leds" >/sys/class/leds/apq8016-sbc:green:user1/device/driver/unbind
|
|
|
|
# Note that application also either should be run as root, or
|
|
|
|
# /sys/class/gpio ownership needs to be changed.
|
2016-11-11 16:09:20 -05:00
|
|
|
# Likewise, onboard buttons are controlled by gpio_keys driver.
|
|
|
|
# To release corresponding GPIOs:
|
|
|
|
# echo -n "gpio_keys" >/sys/class/input/input1/device/driver/unbind
|
2016-11-09 17:48:26 -05:00
|
|
|
|
|
|
|
# User LED 1 on gpio21
|
2017-01-29 11:09:33 -05:00
|
|
|
LED = Signal(Pin(21, Pin.OUT))
|
2016-11-11 16:09:20 -05:00
|
|
|
|
2016-11-13 17:30:51 -05:00
|
|
|
# User LED 2 on gpio120
|
2017-01-29 11:09:33 -05:00
|
|
|
LED2 = Signal(Pin(120, Pin.OUT))
|
2016-11-13 17:30:51 -05:00
|
|
|
|
2016-11-11 16:09:20 -05:00
|
|
|
# Button S3 on gpio107
|
|
|
|
BUTTON = Pin(107, Pin.IN)
|