
Raspberry Pi GPIO Library Introduction
Currently, there are two major GPIO libraries for Raspberry Pi: RPi.GPIO and
wiringPi.
RPi.GPIO:
RPi.GPIO is a python module to control Raspberry Pi GPIO channels. For more
information, please visit:
https://pypi.python.org/pypi/RPi.GPIO/
For examples and documentation:
http://sourceforge.net/p/raspberry-gpio-python/wiki/Home/
The RPi.GPIO module is pre-installed in the official Raspbian operating system,
thus you can use it directly.
wiringPi:
The wiringPi is a GPIO access library written in C language for BCM2835/6/7
SOC used in the Raspberry Pi. It’s released under the GNU LGPLv3 license and
usable from C and C++ and many other languages with suitable wrappers. It’s
designed familiar to people who have practiced the wiring system in the
Arduino software.
For more information about wiringPi, please visit:
Install wiringPi:
Step 1: Get the source code
$ sudo git clone git://git.drogon.net/wiringPi
Step 2: Compile and install
$ cd wiringPi
$ git pull origin
$ sudo ./build
Press Enter and the script
build
will automatically compile wiringPi source
code and then install it to the Raspberry Pi.
Summary of Contents for Ultimate Sensor Kit for Raspberry Pi
Page 1: ......
Page 12: ......
Page 21: ......
Page 42: ......
Page 58: ......
Page 66: ......
Page 70: ......
Page 81: ...Now you can see the current temperature is printed on the terminal ...
Page 90: ......
Page 93: ......
Page 99: ......
Page 105: ......
Page 107: ......
Page 114: ......
Page 117: ......
Page 120: ......
Page 141: ... sudo python main py Now you can see the temperature shown on the LCD1602 ...
Page 147: ...Now you can see the voltage value shown on the segment display ...
Page 150: ...Step 3 Run sudo python main py Now you can see the voltage value shown on the LCD1602 ...
Page 151: ......