Through the previous blogs, everyone has a general understanding of the Dragonboard410c, including the introduction of the Dragonboard410c and system programming steps and system customization (Android system customization and linux system customization).
Today, I want to learn from you how to control the LED light on and off through the pins of the low-speed expansion connection. The red frame in the figure below is the low speed expansion port (J8).
First you must have a Dragonboard410c development board (feeling a bit nonsense :)), then you need to prepare an LED light and keyboard, HDMI display and power supply.
Software preparationFollow the steps outlined in the DragonBoard 410c to program the system.
Low speed expansion connection pinRefer to the pin diagrams in the figure below for the location to connect.
According to the above pin diagram, we connect pin23 (APQ_GPIO_36) and pin1 (GND) to the LED. After connecting, the following picture:
Execute the following command to export the GPIO number.
Echo 36 > /sys/class/gpio/export
After execution, the gpio36 directory will be generated in the /sys/class/gpio/ directory.
Check directoryThe generated gpio36 directory will have the following nodes:
direcTIon
Value
direcTIon is used to set the input or output, and value is used to set the high and low levels.
Set to output modeExecute the following command to modify the gpio36 mode to output:
Echo "out" > /sys/class/gpio/gpio36/direcTIon
Lighting the LEDOutput high level by the following command:
Echo "1" > /sys/class/gpio/gpio36/value
At this time, the output voltage is 1.8v.
Turn off the LEDUse the following command to turn off the LED:
Echo "0" > /sys/class/gpio/gpio36/value
At this time, the output voltage becomes 0v.
Key Switches
Yeswitch Electronics Co,.Ltd., found in 1995 in Taiwan, is specializing in manufacturing and supplying all kinds of switches, including Key Switches, Metal Switches, Toggle Switches, Rocker Switches, Automotive Switches,etc. Yeswitch Key switches, including Electrical Key Switch, CAM Lock , and self-lock key switch. It is made of Zinc alloy,stainless, brass, silver and other materials. Our key switches have three installation size, respectively are 12MM, 16MM and 19MM. It could used in wide range of applications, for example, ATM, POS machine, Computer host,recreation facilities, Cash register, elevator, electric cars,file cabinets, etc.
It is normally made of stainless,zinc alloy,brass and other metal materials, which is imported form Australian, so our products could enjoy the sound reputation in switch field with he high-end market strategy. Meanwhile, we are very familiar with UL, ROHS,SGS and related other authoritative approve standard in the switch industry.
We are focus on producing high standard and high quality switches, so our key switch is of high standard products , it could not only anti-explosion but also Anti-vibration. And we are also adhere to the three principles to serve our customers around the globe,namely,meeting global standard, accurate operation and on time delivery.
Key Switches,Momentary Key Switch,Key Switch 3 Position,Key Switch On Off
YESWITCH ELECTRONICS CO., LTD. , https://www.yeswitches.com