Overview

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).

Low speed expansion port

Preparation work hardware preparation

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 preparation

Follow the steps outlined in the DragonBoard 410c to program the system.

Low speed expansion connection pin

Refer to the pin diagrams in the figure below for the location to connect.

Write a picture description here

Connecting LED

According to the above pin diagram, we connect pin23 (APQ_GPIO_36) and pin1 (GND) to the LED. After connecting, the following picture:

Write a picture description here

Control LED lights on and off export GPIO

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 directory

The 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 mode

Execute the following command to modify the gpio36 mode to output:

Echo "out" > /sys/class/gpio/gpio36/direcTIon

Lighting the LED

Output 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 LED

Use 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

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.


Key Switches

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 Lock Switches

Key Switches,Momentary Key Switch,Key Switch 3 Position,Key Switch On Off

YESWITCH ELECTRONICS CO., LTD. , https://www.yeswitches.com