mirror of https://github.com/joan2937/pigpio
122 lines
5.2 KiB
HTML
122 lines
5.2 KiB
HTML
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
<head>
|
|
<meta name="description" content="Raspberry Pi Reg. C GPIO library and Python GPIO module and shell command utilities to control the GPIO, including SPI, I2C, and serial links." />
|
|
<meta name="keywords" content="raspberry, pi, C, Python, GPIO, library, shell, command, utilities, module, SPI, I2C, serial" />
|
|
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
|
<title>pigpio library</title>
|
|
<link rel="stylesheet" type="text/css" href="scripts/index.css">
|
|
<link rel="icon" href="favicon.ico" type="image/x-icon">
|
|
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon">
|
|
</head>
|
|
<body>
|
|
|
|
<table style="padding:0px; border:0px; margin:0px; width:780px; background-color:#e0e0e0;">
|
|
<td style="background:#EAF2E6 url('images/sidebar.gif') repeat-y; width:35px; height:100%"></td>
|
|
<td>
|
|
<table>
|
|
<div style="background:url('images/topbar.gif') repeat-x; height: 70px; font-size:1.5em; vertical-align: top;"><a href="index.html"><img src="images/pigpio-logo.gif" border="0" /></a>pigpio library</div>
|
|
</table>
|
|
<table><div>
|
|
<td><img src="images/rf-tx.jpg" width="250"></td>
|
|
<td><img src="images/rpi.jpg" width="250"></td>
|
|
<td><img src="images/speaker.jpg" width="250"></td>
|
|
</div></table>
|
|
<table>
|
|
<td style="vertical-align: top; background-color: #98bf21;"><a class="l1" href="index.html">pigpio</a>
|
|
<a class="l1" href="cif.html">pigpio C I/F</a>
|
|
<a class="l1" href="pigpiod.html">pigpiod</a>
|
|
<a class="l1" href="pdif2.html">pigpiod C I/F</a>
|
|
<a class="l1" href="python.html">Python</a>
|
|
<a class="l1" href="pigs.html">pigs</a>
|
|
<a class="l1" href="piscope.html">piscope</a>
|
|
<a class="l1" href="misc.html">Misc</a>
|
|
<a class="l1" href="examples.html">Examples</a>
|
|
<a class="l1" href="download.html">Download</a>
|
|
<a class="l1" href="faq.html">FAQ</a>
|
|
<a class="l1" href="sitemap.html">Site Map</a>
|
|
</td>
|
|
<td><center><h2>Download & Install</h2></center>
|
|
If the pigpio daemon is running it should be killed (sudo killall
|
|
pigpiod) before make install and restarted afterwards (sudo
|
|
pigpiod).<br>
|
|
<br>
|
|
<span style="font-weight: bold;">The initial part of the make, the
|
|
compilation of pigpio.c, takes 100 seconds on early model
|
|
Pis. Be patient. The overall install takes just over 3
|
|
minutes.</span><br style="font-weight: bold;">
|
|
<h3>Download and install (V75)<br></h3>
|
|
<code>wget https://github.com/joan2937/pigpio/archive/v75.zip<br>
|
|
unzip v75.zip<br>
|
|
cd pigpio-75<br>
|
|
make<br>
|
|
sudo make install<br></code><br>
|
|
<br>
|
|
If the Python part of the install fails it may be because you need
|
|
the setup tools.<br>
|
|
<br>
|
|
<code>sudo apt install python-setuptools
|
|
python3-setuptools<br></code><br>
|
|
<br>
|
|
<h3>To check the library</h3>
|
|
These tests make extensive use of GPIO 25 (pin 22). Make sure
|
|
nothing, or only a LED, is connected to the GPIO before running the
|
|
tests. Most tests are statistical in nature and so may on
|
|
occasion fail. Repeated failures on the same test or many
|
|
failures in a group of tests indicate a problem.<br>
|
|
<code><br>
|
|
sudo ./x_pigpio # check C I/F<br>
|
|
<br>
|
|
sudo pigpiod # start daemon<br>
|
|
<br>
|
|
./x_pigpiod_if2 # check C I/F to
|
|
daemon<br>
|
|
./x_pigpio.py # check Python I/F to daemon<br>
|
|
./x_pigs # check
|
|
pigs I/F to daemon<br>
|
|
./x_pipe # check
|
|
pipe I/F to daemon<br>
|
|
<br>
|
|
<br></code>
|
|
<h3>To compile, link, and run a C program</h3>
|
|
<code>gcc -Wall -pthread -o foobar foobar.c -lpigpio -lrt<br>
|
|
sudo ./foobar</code><code><br></code><br>
|
|
<h3>To start the pigpio daemon<br></h3>
|
|
<code>sudo pigpiod<br></code>
|
|
<h3>To stop the pigpio daemon<br></h3>
|
|
<code>sudo killall pigpiod<br></code><br>
|
|
<h3>github</h3>
|
|
<code>git clone https://github.com/joan2937/pigpio</code><br>
|
|
<h3>Raspbian (raspberrypi.org image)</h3>
|
|
<p>This may not be the most recent version. You can check the
|
|
version with the command pigpiod -v.<br></p>
|
|
<code>sudo apt-get update<br>
|
|
sudo apt-get install pigpio python-pigpio python3-pigpio</code><br>
|
|
<br>
|
|
</td>
|
|
</table>
|
|
<div style="vertical-align: center; text-align: center; background-color:#98bf21; font-size:0.8em; height:30px"><a class="l2" href="index.html">[pigpio]</a>
|
|
<a class="l2" href="cif.html">[pigpio C I/F]</a>
|
|
<a class="l2" href="pigpiod.html">[pigpiod]</a>
|
|
<a class="l2" href="pdif2.html">[pigpiod C I/F]</a>
|
|
<a class="l2" href="python.html">[Python]</a>
|
|
<a class="l2" href="pigs.html">[pigs]</a>
|
|
<a class="l2" href="piscope.html">[piscope]</a>
|
|
<a class="l2" href="misc.html">[Misc]</a>
|
|
<a class="l2" href="examples.html">[Examples]</a>
|
|
<a class="l2" href="download.html">[Download]</a>
|
|
<a class="l2" href="faq.html">[FAQ]</a>
|
|
<a class="l2" href="sitemap.html">[Site Map]</a>
|
|
</div>
|
|
<table><tr>
|
|
<td style="width: 200px"><div style="text-align: left;"><small>© 2012-2020</small></div></td>
|
|
<td style="width: 350px"><div style="text-align: center;">e-mail: pigpio @ abyz.me.uk</div></td>
|
|
<td style="width: 200px"><div style="text-align: right;"><small>Updated: 30/04/2020</small></div></td>
|
|
</tr></table>
|
|
</td>
|
|
</table>
|
|
</body>
|
|
</html>
|