Control the gp_led light on the board with the Linux command

Source: Internet
Author: User

Control the gp_led light on the board with the Linux command

is found on a website, here we can see gp_led is connected with GPIO3. As for GPIO13, in this picture, with gp_led does not matter, but why in the blink draft, but can control gp_led, this left in the next post. This is mainly through the control of the GPIO3 to achieve the gp_led of the light.

Is the process of gp_led from boot to control.

1. Enter the Gpio directory

2, through the LS command can be seen in the Gpio directory of each Gpio port, found here Gpio3

3, enter the Gpio3 directory

4,cat direction View the port direction of the Gpio3, as this is the driving LED lights, the port direction needs to be set to out. You can change the direction of the port by directing Echo in (out) > Direction.

5, through Echo 1 (0) > Value to control the Gpio3 output high and low level. The specific phenomenon please gp_led on the Kanban board. Other Gpio ports can also be operated by this method.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.