Qubishi Raspberry Pi gpio

Source: Internet
Author: User

Wiringpi is suitable for people with C language basics who have already been in touch with MCU or embedded development before being in touch with Raspberry Pi. The API functions of wiringpi are very similar to those of Arduino, which makes it popular. The author provides a lot of instructions and sample code, including UART devices, I2C devices, and SPI devices. Without a doubt, wiringpi is very powerful.

The first thing to do is install wiringpi. Wiringpi uses the GIT tool to maintain an update code.

If you have not installed the GIT tool on your platform, enter the following command: Sudo apt-Get install Git-core If an error occurs during this process, update the software. For example, enter the following command: Sudo apt-Get update Sudo apt-Get upgrade Then you can use git to obtain the source code of wiringpi. Git clone git: // git.drogon.net/wiringpi If you want to update wiringpi. CD wiringpi Git pull Origin Go to the wiringpi directory and install wiringpi CD wiringpi ./Build The build script will help you compile and install wiringpi.

Test whether wiringpi is successfully installed. Wiringpi includes a set of gpio commands. The gpio command can be used to control various interfaces on Raspberry Pi. The following command can be used to test whether wiringpi is successfully installed. Gpio-V Gpio readall



Gpio pin description It is the description of the wiringpi pin, which must be described here. First, Raspberry Pi has versions A and B, and versions A and B have different gpio pins. Second, wiringpi re-encapsulates Raspberry Pi pins, for example, the gpio0 of wiringpi indicates the gpio17 of bcm2835. This is only an encapsulation ing relation and will not have a great impact on development and use.

The hardware circuit connection is as follows:

The procedure is as follows: This experiment is to make the LED flash and write the application in VIM:

Then compile and execute the program and print it in the terminal.
The first LED lights up, and the next learning will turn on.

Qubishi Raspberry Pi gpio

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.