Raspberry Pi Advanced Gpio Library, WRINGPI2 for Python use note (i) Install

Source: Internet
Author: User

On-line tutorials, general Python with Rpi.gpio to control the Raspberry Pi Gpio, and C + + generally use WRINGPI library to operate Gpio,rpi.gpio too simple, many advanced features do not support, such as I2C/SPI library, etc., but also lack of high-precision timing and other advanced features. In contrast, WIRINGPI is rich in functionality, but in fact WRINGPI already has Python bindings that can be very simple to use in Python. Since there is basically no Chinese description of this library on the Internet, I am learning to write a few articles about the basic use of this library while taking notes.

Installation: Install PYTHON-PIP First:

I use the Archlinux,python3, the installation command is:

Pacman-s Python-pip

If you use Python2, the installation command is:

Pacman-s Python2-pip

The following Raspbian are:

Install python3-pipaptInstall Python-pip

Once the installation is complete, you can install the Python library with Pip install. To avoid the tedious, my commands are installed under the PIP command, archlinux the default is Python3 PIP3, if you use a python2 pip2 instead of Pip,debian under the default PIP2 pip, if you use Python3, Use the PIP3 instead.

Install Wiringpi2

PIP Library In addition to WIRINGPI2, there is an old version of the WIRINGPI library, you install on demand.

After installation, run the PIP list and you can see the list contains the newly installed WRINGPI2 library:

In the terminal, enter Python, go to the Python console, import, if not error, the installation is successful:

Raspberry Pi Advanced Gpio Library, WRINGPI2 for Python use note (i) Install

Related Article

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.