From: <Saved by Mozilla 5.0 (Windows)>
Subject: RPi Low-level peripherals - eLinux.org
Date: Thu, 04 Jul 2013 20:37:24 -0300
MIME-Version: 1.0
Content-Type: multipart/related;
	type="text/html";
	boundary="----=_NextPart_000_0000_B1EEFC57.91762831"
X-MAF-Information: Produced By MAF V3.0.0

This is a multi-part message in MIME format.

------=_NextPart_000_0000_B1EEFC57.91762831
Content-Type: text/html;
	charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Content-Location: http://elinux.org/RPi_Low-level_peripherals

<!DOCTYPE html><html dir=3D"ltr" class=3D"client-js" lang=3D"en"><head>
<meta http-equiv=3D"content-type" content=3D"text/html; charset=3DUTF-8">
<meta http-equiv=3D"content-type" content=3D"text/html; charset=3DUTF-8">
<meta charset=3D"UTF-8"><script type=3D"text/javascript"><!--

/* Script removed by snapshot save */

--></script>
<title>RPi Low-level peripherals - eLinux.org</title>
<meta name=3D"generator" content=3D"MediaWiki 1.22alpha">
<link rel=3D"shortcut icon" href=3D"urn:download-error:http://elinux.org/fa=
vicon.ico">
<link rel=3D"search" type=3D"application/opensearchdescription+xml" href=3D=
"http://elinux.org/opensearch_desc.php" title=3D"eLinux.org (en)">
<link rel=3D"EditURI" type=3D"application/rsd+xml" href=3D"http://elinux.or=
g/api.php?action=3Drsd">
<link rel=3D"copyright" href=3D"http://creativecommons.org/licenses/by-sa/3=
.0/">
<link rel=3D"alternate" type=3D"application/atom+xml" title=3D"eLinux.org=
 Atom feed" href=3D"http://elinux.org/index.php?title=3DSpecial:RecentChang=
es&amp;feed=3Datom">
<link rel=3D"stylesheet" href=3D"urn:snapshot-FF8594AC:file:///C:/Users/DaL=
uz/AppData/Local/Temp/maftemp-3cd13269/1386029278824_854/1372981044953_969/=
index_files/load.php.css">
<style><!--

/* Effective stylesheet produced by snapshot save */

.suggestions { overflow: hidden; position: absolute; top: 0px; left: 0px;=
 width: 0px; border: medium none; z-index: 1099; padding: 0px; margin: -1px=
 -1px 0px 0px; }

html > body .suggestions { margin: -1px 0px 0px; }

.suggestions-special { position: relative; background-color: white; cursor:=
 pointer; border: 1px solid rgb(170, 170, 170); margin: -2px 0px 0px; displ=
ay: none; padding: 0.25em; line-height: 1.25em; }

.suggestions-results { background-color: white; cursor: pointer; border: 1p=
x solid rgb(170, 170, 170); padding: 0px; margin: 0px; }

--></style><style><!--

/* Effective stylesheet produced by snapshot save */

--></style><meta name=3D"ResourceLoaderDynamicStyles" content=3D"">
<style><!--

/* Effective stylesheet produced by snapshot save */

a:lang(ar), a:lang(ckb), a:lang(fa), a:lang(kk-arab), a:lang(mzn), a:lang(p=
s), a:lang(ur) { text-decoration: none; }

--></style>

<script src=3D"urn:snapshot-84EC9971:file:///C:/Users/DaLuz/AppData/Local/T=
emp/maftemp-3cd13269/1386029278824_854/1372981044953_969/index_files/load.p=
hp.js"></script><script src=3D"urn:snapshot-E492C916:file:///C:/Users/DaLuz=
/AppData/Local/Temp/maftemp-3cd13269/1386029278824_854/1372981044953_969/in=
dex_files/load.php-1.js"></script>
<script><!--

/* Script removed by snapshot save */

--></script><script><!--

/* Script removed by snapshot save */

--></script>
<script><!--

/* Script removed by snapshot save */

--></script><script src=3D"urn:snapshot-DEC93D6D:file:///C:/Users/DaLuz/App=
Data/Local/Temp/maftemp-3cd13269/1386029278824_854/1372981044953_969/index_=
files/load.php-2.js"></script>
<style type=3D"text/css"><!--

/* Effective stylesheet produced by snapshot save */

.source-basic4gl { line-height: normal; }

.source-basic4gl li, .source-basic4gl pre { line-height: normal; border: 0p=
x none white; }

.basic4gl.source-basic4gl .de1, .basic4gl.source-basic4gl .de2 { font: 1em/=
1.2em monospace,monospace; margin: 0px; padding: 0px; background: none repe=
at scroll 0% 0% transparent; vertical-align: top; }

.basic4gl.source-basic4gl { font-family: monospace; }

.basic4gl.source-basic4gl .kw2 { color: rgb(255, 0, 0); }

.basic4gl.source-basic4gl .kw3 { color: rgb(0, 0, 255); }

.basic4gl.source-basic4gl .br0 { color: rgb(0, 0, 128); }

.basic4gl.source-basic4gl .sy0 { color: rgb(0, 0, 255); }

.basic4gl.source-basic4gl .st0 { color: rgb(0, 128, 0); }

.basic4gl.source-basic4gl .nu0 { color: rgb(0, 0, 128); font-weight: bold; }

--></style><!--[if lt IE 7]><style type=3D"text/css">body{behavior:url("/sk=
ins/vector/csshover.min.htc")}</style><![endif]--><script src=3D"urn:snapsh=
ot-82327080:file:///C:/Users/DaLuz/AppData/Local/Temp/maftemp-3cd13269/1386=
029278824_854/1372981044953_969/index_files/load.php-3.js" async=3D""></scr=
ipt></head>
<body class=3D"mediawiki ltr sitedir-ltr ns-0 ns-subject page-RPi_Low-level=
_peripherals skin-vector action-view vector-animateLayout">
		<div id=3D"mw-page-base" class=3D"noprint"></div>
		<div id=3D"mw-head-base" class=3D"noprint"></div>
		<div id=3D"content" class=3D"mw-body" role=3D"main">
			<a id=3D"top"></a>
			<div id=3D"mw-js-message" style=3D"display:none;"></div>
						<div id=3D"siteNotice"><script><!--

/* Script removed by snapshot save */

--></script><div id=3D"localNotice" dir=3D"ltr" lang=3D"en"><div style=3D"m=
argin:0; margin-top:10px; margin-right:10px; border:1px solid #dfdfdf; padd=
ing:0 1em 1em 1em; background-color:#ffffcc; align:right;">
<p><b>Please note that User Registration has been temporarily disabled due=
 to a recent increase in automated registrations.  If anyone needs an accou=
nt, please request one here: <a href=3D"http://elinux.org/Special:RequestAc=
count" title=3D"Special:RequestAccount"> RequestAccount</a>. Thanks for you=
r patience!--<a href=3D"http://elinux.org/User:Wmat" title=3D"User:Wmat">Wm=
at</a> (<a href=3D"http://elinux.org/User_talk:Wmat" title=3D"User talk:Wma=
t">talk</a>) 04:16, 27 November 2012 (UTC)<br></b>
<span style=3D"color:#FF0000;"><b>Please email <a href=3D"http://elinux.org=
/User:Wmat" title=3D"User:Wmat">User:Wmat</a> if you experience any issues=
 with the Request Account form.</b></span>
</p>
</div>
</div></div>
						<h1 id=3D"firstHeading" class=3D"firstHeading" lang=3D"en"><span dir=
=3D"auto">RPi Low-level peripherals</span></h1>
			<div id=3D"bodyContent">
								<div id=3D"siteSub">From eLinux.org</div>
								<div id=3D"contentSub"></div>
																<div id=3D"jump-to-nav" class=3D"mw-jump">
					Jump to:					<a href=3D"#mw-navigation">navigation</a>, 					<a href=
=3D"#p-search">search</a>
				</div>
								<div id=3D"mw-content-text" dir=3D"ltr" class=3D"mw-content-ltr" la=
ng=3D"en"><p><br>
</p>
<table style=3D"clear: right; margin-bottom: .5em; float: right; padding:=
 .5em 0 .8em 1.4em; background: none; width: auto;" cellpadding=3D"0" cells=
pacing=3D"0">
<tbody><tr>
<td> <table id=3D"toc" class=3D"toc"><tbody><tr><td><div id=3D"toctitle"><h=
2>Contents</h2><span class=3D"toctoggle">=C2=A0[<a href=3D"#" class=3D"inte=
rnal" id=3D"togglelink">hide</a>]=C2=A0</span></div>
<ul>
<li class=3D"toclevel-1 tocsection-1"><a href=3D"#Introduction"><span class=
=3D"tocnumber">1</span> <span class=3D"toctext">Introduction</span></a></li>
<li class=3D"toclevel-1 tocsection-2"><a href=3D"#General_Purpose_Input.2FO=
utput_.28GPIO.29"><span class=3D"tocnumber">2</span> <span class=3D"toctext=
">General Purpose Input/Output (GPIO)</span></a>
<ul>
<li class=3D"toclevel-2 tocsection-3"><a href=3D"#Referring_to_pins_on_the_=
Expansion_header"><span class=3D"tocnumber">2.1</span> <span class=3D"tocte=
xt">Referring to pins on the Expansion header</span></a></li>
<li class=3D"toclevel-2 tocsection-4"><a href=3D"#Power_pins"><span class=
=3D"tocnumber">2.2</span> <span class=3D"toctext">Power pins</span></a></li>
<li class=3D"toclevel-2 tocsection-5"><a href=3D"#GPIO_hardware_hacking"><s=
pan class=3D"tocnumber">2.3</span> <span class=3D"toctext">GPIO hardware ha=
cking</span></a></li>
<li class=3D"toclevel-2 tocsection-6"><a href=3D"#P2_header"><span class=3D=
"tocnumber">2.4</span> <span class=3D"toctext">P2 header</span></a></li>
<li class=3D"toclevel-2 tocsection-7"><a href=3D"#P3_header"><span class=3D=
"tocnumber">2.5</span> <span class=3D"toctext">P3 header</span></a></li>
<li class=3D"toclevel-2 tocsection-8"><a href=3D"#P5_header"><span class=3D=
"tocnumber">2.6</span> <span class=3D"toctext">P5 header</span></a></li>
<li class=3D"toclevel-2 tocsection-9"><a href=3D"#P6_header"><span class=3D=
"tocnumber">2.7</span> <span class=3D"toctext">P6 header</span></a></li>
<li class=3D"toclevel-2 tocsection-10"><a href=3D"#Driver_support"><span cl=
ass=3D"tocnumber">2.8</span> <span class=3D"toctext">Driver support</span><=
/a></li>
<li class=3D"toclevel-2 tocsection-11"><a href=3D"#Graphical_User_Interface=
s"><span class=3D"tocnumber">2.9</span> <span class=3D"toctext">Graphical=
 User Interfaces</span></a>
<ul>
<li class=3D"toclevel-3 tocsection-12"><a href=3D"#WebIOPi"><span class=3D"=
tocnumber">2.9.1</span> <span class=3D"toctext">WebIOPi</span></a></li>
</ul>
</li>
</ul>
</li>
<li class=3D"toclevel-1 tocsection-13"><a href=3D"#GPIO_Code_examples"><spa=
n class=3D"tocnumber">3</span> <span class=3D"toctext">GPIO Code examples</=
span></a>
<ul>
<li class=3D"toclevel-2 tocsection-14"><a href=3D"#C"><span class=3D"tocnum=
ber">3.1</span> <span class=3D"toctext">C</span></a>
<ul>
<li class=3D"toclevel-3 tocsection-15"><a href=3D"#C_2"><span class=3D"tocn=
umber">3.1.1</span> <span class=3D"toctext">C</span></a>
<ul>
<li class=3D"toclevel-4 tocsection-16"><a href=3D"#GPIO_Pull_Up.2FPull_Down=
_Register_Example"><span class=3D"tocnumber">3.1.1.1</span> <span class=3D"=
toctext">GPIO Pull Up/Pull Down Register Example</span></a></li>
</ul>
</li>
<li class=3D"toclevel-3 tocsection-17"><a href=3D"#C_.2B_wiringPi"><span cl=
ass=3D"tocnumber">3.1.2</span> <span class=3D"toctext">C + wiringPi</span><=
/a></li>
<li class=3D"toclevel-3 tocsection-18"><a href=3D"#C_3"><span class=3D"tocn=
umber">3.1.3</span> <span class=3D"toctext">C</span></a></li>
<li class=3D"toclevel-3 tocsection-19"><a href=3D"#C.23"><span class=3D"toc=
number">3.1.4</span> <span class=3D"toctext">C#</span></a></li>
</ul>
</li>
<li class=3D"toclevel-2 tocsection-20"><a href=3D"#Ruby"><span class=3D"toc=
number">3.2</span> <span class=3D"toctext">Ruby</span></a></li>
<li class=3D"toclevel-2 tocsection-21"><a href=3D"#Perl"><span class=3D"toc=
number">3.3</span> <span class=3D"toctext">Perl</span></a></li>
<li class=3D"toclevel-2 tocsection-22"><a href=3D"#Python"><span class=3D"t=
ocnumber">3.4</span> <span class=3D"toctext">Python</span></a></li>
<li class=3D"toclevel-2 tocsection-23"><a href=3D"#Java"><span class=3D"toc=
number">3.5</span> <span class=3D"toctext">Java</span></a>
<ul>
<li class=3D"toclevel-3 tocsection-24"><a href=3D"#Java_using_the_Pi4J_Libr=
ary"><span class=3D"tocnumber">3.5.1</span> <span class=3D"toctext">Java us=
ing the Pi4J Library</span></a></li>
<li class=3D"toclevel-3 tocsection-25"><a href=3D"#Java_2"><span class=3D"t=
ocnumber">3.5.2</span> <span class=3D"toctext">Java</span></a></li>
<li class=3D"toclevel-3 tocsection-26"><a href=3D"#Java_Webapp_GPIO_web_con=
trol_via_http"><span class=3D"tocnumber">3.5.3</span> <span class=3D"toctex=
t">Java Webapp GPIO web control via http</span></a></li>
</ul>
</li>
<li class=3D"toclevel-2 tocsection-27"><a href=3D"#Bash_shell_script.2C_usi=
ng_sysfs.2C_part_of_the_raspbian_operating_system"><span class=3D"tocnumber=
">3.6</span> <span class=3D"toctext">Bash shell script, using sysfs, part=
 of the raspbian operating system</span></a></li>
<li class=3D"toclevel-2 tocsection-28"><a href=3D"#Shell_script_-_take_2"><=
span class=3D"tocnumber">3.7</span> <span class=3D"toctext">Shell script -=
 take 2</span></a></li>
<li class=3D"toclevel-2 tocsection-29"><a href=3D"#Lazarus_.2F_Free_Pascal"=
><span class=3D"tocnumber">3.8</span> <span class=3D"toctext">Lazarus / Fre=
e Pascal</span></a></li>
<li class=3D"toclevel-2 tocsection-30"><a href=3D"#BASIC"><span class=3D"to=
cnumber">3.9</span> <span class=3D"toctext">BASIC</span></a>
<ul>
<li class=3D"toclevel-3 tocsection-31"><a href=3D"#BASIC_-_Return_to_BASIC"=
><span class=3D"tocnumber">3.9.1</span> <span class=3D"toctext">BASIC - Ret=
urn to BASIC</span></a></li>
<li class=3D"toclevel-3 tocsection-32"><a href=3D"#BASIC_2"><span class=3D"=
tocnumber">3.9.2</span> <span class=3D"toctext">BASIC</span></a></li>
</ul>
</li>
</ul>
</li>
<li class=3D"toclevel-1 tocsection-33"><a href=3D"#SPI"><span class=3D"tocn=
umber">4</span> <span class=3D"toctext">SPI</span></a></li>
<li class=3D"toclevel-1 tocsection-34"><a href=3D"#MIPI_CSI-2"><span class=
=3D"tocnumber">5</span> <span class=3D"toctext">MIPI CSI-2</span></a></li>
<li class=3D"toclevel-1 tocsection-35"><a href=3D"#DSI"><span class=3D"tocn=
umber">6</span> <span class=3D"toctext">DSI</span></a></li>
<li class=3D"toclevel-1 tocsection-36"><a href=3D"#CEC"><span class=3D"tocn=
umber">7</span> <span class=3D"toctext">CEC</span></a></li>
<li class=3D"toclevel-1 tocsection-37"><a href=3D"#References"><span class=
=3D"tocnumber">8</span> <span class=3D"toctext">References</span></a></li>
</ul>
</td></tr></tbody></table>
</td></tr></tbody></table>
<p>Back to the <a href=3D"http://elinux.org/R-Pi_Hub" title=3D"R-Pi Hub" cl=
ass=3D"mw-redirect">Hub</a>.
</p><p><br>
<b>Hardware &amp; Peripherals:</b>
</p><p><i><a href=3D"http://elinux.org/RPi_Hardware" title=3D"RPi Hardware"=
>Hardware</a> and <a href=3D"http://elinux.org/RPi_HardwareHistory" title=
=3D"RPi HardwareHistory">Hardware History</a>.</i>
</p><p><i><strong class=3D"selflink">Low-level Peripherals</strong> and <a=
 href=3D"http://elinux.org/RPi_Expansion_Boards" title=3D"RPi Expansion Boa=
rds">Expansion Boards</a>.</i>
</p><p><i><a href=3D"http://elinux.org/RPi_Screens" title=3D"RPi Screens">S=
creens</a>, <a href=3D"http://elinux.org/RPi_Cases" title=3D"RPi Cases">Cas=
es</a> and <a href=3D"http://elinux.org/RPi_VerifiedPeripherals" title=3D"R=
Pi VerifiedPeripherals">Other Peripherals</a>.</i>
</p>
<div style=3D"clear:both;"></div>
<p><br>
</p>
<h2><span class=3D"mw-headline" id=3D"Introduction">Introduction</span></h2>
<p>In addition to the familiar USB, Ethernet and HDMI ports, the R-Pi offer=
s lower-level interfaces intended to connect more directly with chips and=
 subsystem modules. These GPIO (general purpose I/O) signals on the 2x13 he=
ader pins include SPI, I2C, serial UART, 3V3 and 5V power. These interfaces=
 are not "plug and play" and require care to avoid miswiring. The pins use=
 a 3V3 logic level and are not tolerant of 5V levels, such as you might fin=
d on a 5V powered Arduino. CSI (camera serial interface) can be used to con=
nect the 5 MP camera available. Not yet software-enabled is the flex cable=
 connectors with DSI (display serial interface) and a serial link inside th=
e HDMI connector called CEC. (consumer electronics control)
</p>
<h2><span class=3D"mw-headline" id=3D"General_Purpose_Input.2FOutput_.28GPI=
O.29">General Purpose Input/Output (GPIO)</span></h2>
<div class=3D"thumb tright"><div class=3D"thumbinner" style=3D"width:256px;=
"><a href=3D"http://elinux.org/File:GPIOs.png" class=3D"image"><img alt=3D"=
" src=3D"file:///C:/Users/DaLuz/AppData/Local/Temp/maftemp-3cd13269/1386029=
278824_854/1372981044953_969/index_files/GPIOs.png" class=3D"thumbimage" he=
ight=3D"581" width=3D"254"></a>  <div class=3D"thumbcaption"><div class=3D"=
magnify"><a href=3D"http://elinux.org/File:GPIOs.png" class=3D"internal" ti=
tle=3D"Enlarge"><img src=3D"file:///C:/Users/DaLuz/AppData/Local/Temp/mafte=
mp-3cd13269/1386029278824_854/1372981044953_969/index_files/magnify-clip.pn=
g" alt=3D"" height=3D"11" width=3D"15"></a></div>The layout of the Raspberr=
y Pi P1 pin-header seen from the top, containing pins useable for general=
 purpose I/O. Colour coded to the table. Three pins changed between PCB Rev=
.1 and Rev.2 <a rel=3D"nofollow" class=3D"external text" href=3D"https://si=
tes.google.com/site/burngatehouse/home/drawings/GPIOs2.gif">Source</a></div=
></div></div>
<p>General Purpose Input/Output (a.k.a. GPIO) is a generic pin on a chip wh=
ose behavior (including whether it is an input or output pin) can be contro=
lled (programmed) through software.
</p><p>The Raspberry Pi allows peripherals and expansion boards (such as th=
e <a href=3D"http://elinux.org/Rpi_Gertboard" title=3D"Rpi Gertboard" class=
=3D"mw-redirect">Rpi Gertboard</a>) to access the CPU by exposing the input=
s and outputs.
</p><p>For further general information about GPIOs, see: <a rel=3D"nofollow=
" class=3D"external text" href=3D"http://en.wikipedia.org/wiki/GPIO">the wi=
kipedia article</a>.<br>
For further specific information about the Raspberry Pi's BCM2835 GPIOs, se=
e: <a href=3D"http://elinux.org/RPi_BCM2835_GPIOs" title=3D"RPi BCM2835 GPI=
Os">this wiki article</a>.
</p><p>The production Raspberry Pi board has a 26-pin 2.54=C2=A0mm (100=C2=
=A0mil)<sup id=3D"cite_ref-1" class=3D"reference"><a href=3D"#cite_note-1">=
[1]</a></sup> expansion header, marked as P1, arranged in a 2x13 strip. The=
y provide 8 GPIO pins plus access to I=C2=B2C, SPI, UART), as well as +3.3=
=C2=A0V, +5=C2=A0V and GND supply lines. Pin one is the pin in the first co=
lumn and on the bottom row. <sup id=3D"cite_ref-2" class=3D"reference"><a=
 href=3D"#cite_note-2">[2]</a></sup>
</p><p><a href=3D"http://elinux.org/File:RPi_P1_header.png" class=3D"image"=
><img alt=3D"RPi P1 header.png" src=3D"file:///C:/Users/DaLuz/AppData/Local=
/Temp/maftemp-3cd13269/1386029278824_854/1372981044953_969/index_files/RPi_=
P1_header.png" height=3D"167" width=3D"450"></a>
</p><p><b>GPIO voltage levels are 3.3=C2=A0V and are not 5=C2=A0V tolerant.=
 There is no over-voltage protection on the board</b> - the intention is th=
at people interested in serious interfacing will use an external board with=
 buffers, level conversion and analog I/O rather than soldering directly on=
to the main board.
</p><p>All the GPIO pins can be reconfigured to provide alternate functions=
, SPI, <a rel=3D"nofollow" class=3D"external text" href=3D"http://en.wikipe=
dia.org/wiki/Pulse-width_modulation">PWM</a>, I=C2=B2C and so. At reset onl=
y pins GPIO 14 &amp; 15 are assigned to the alternate function UART, these=
 two can be switched back to GPIO to provide a total of 17 GPIO pins<sup id=
=3D"cite_ref-3" class=3D"reference"><a href=3D"#cite_note-3">[3]</a></sup>.=
 Each of their functions and full details of how to access are detailed in=
 the chipset datasheet <sup id=3D"cite_ref-4" class=3D"reference"><a href=
=3D"#cite_note-4">[4]</a></sup>.
</p><p>Each GPIO can interrupt, high/low/rise/fall/change.<sup id=3D"cite_r=
ef-5" class=3D"reference"><a href=3D"#cite_note-5">[5]</a></sup><sup id=3D"=
cite_ref-6" class=3D"reference"><a href=3D"#cite_note-6">[6]</a></sup> Ther=
e is currently no support for GPIO interrupts in the official kernel, howew=
er a patch exists, requiring compilation of modified source tree.<sup id=3D=
"cite_ref-7" class=3D"reference"><a href=3D"#cite_note-7">[7]</a></sup> The=
 'Raspbian "wheezy"' <sup id=3D"cite_ref-8" class=3D"reference"><a href=3D"=
#cite_note-8">[8]</a></sup> version that is currently recommended for start=
ers already includes GPIO interrupts.
</p><p>GPIO input hysteresis (Schmitt trigger) can be on or off, output sle=
w rate can be fast or limited, and source and sink current is configurable=
 from 2=C2=A0mA up to 16=C2=A0mA. Note that chipset GPIO pins 0-27 are in=
 the same block and these properties are set per block, not per pin. See <a=
 rel=3D"nofollow" class=3D"external text" href=3D"http://www.scribd.com/doc=
/101830961/GPIO-Pads-Control2">GPIO Datasheet Addendum - GPIO Pads Control<=
/a>. Particular attention should be applied to the note regarding SSO (Simu=
ltaneous Switching Outputs): to avoid interference, driving currents should=
 be kept as low as possible.
</p><p>The available <a href=3D"http://elinux.org/RPi_BCM2835_GPIOs" title=
=3D"RPi BCM2835 GPIOs">alternative functions</a> and their corresponding pi=
ns are detailed below. These numbers are in reference to the chipset docume=
ntation and may not match the numbers exposed in Linux. Only fully usable=
 functions are detailed, for some alternative functions not all the necessa=
ry pins are available for the funtionality to be actually used.
</p><p>There is also some information on the <a href=3D"http://elinux.org/R=
Pi_Tutorial_Easy_GPIO_Hardware_%26_Software" title=3D"RPi Tutorial Easy GPI=
O Hardware &amp; Software">Tutorial on Easy GPIO Hardware &amp; Software</a=
>.
</p><p>Kernel boot messages go to the UART at 115200=C2=A0bit/s - there are=
 more details on the <a href=3D"http://elinux.org/RPi_Serial_Connection" ti=
tle=3D"RPi Serial Connection">serial port</a> page.
</p><p><b>R-Pi PCB Revision 2 UPDATE:</b> According to Eben at <a rel=3D"no=
follow" class=3D"external autonumber" href=3D"http://www.raspberrypi.org/ar=
chives/1929#comment-31646">[1]</a> the R-Pi Rev.2 board being rolled out st=
arting in September 2012 adds 4 more GPIO on a new connector called P5, and=
 changes some of the existing P1 GPIO pinouts. On Rev2, GPIO_GEN2 [BCM2835/=
GPIO27] is routed to P1 pin 13, and changes what was SCL0/SDA0 to SCL1/SDA1=
: SCL1 [BCM2835/GPIO3] is routed to P1 pin 5, SDA1 [BCM2835/GPIO2] is route=
d to P1 pin 3. Also the power and ground connections previously marked "Do=
 Not Connect" on P1 will remain as connected, specifically: P1-04:+5V0, P1-=
09:GND, P1-14:GND, P1-17:+3V3, P1-20:GND, P1-25:GND. According to this comm=
ent <a rel=3D"nofollow" class=3D"external autonumber" href=3D"http://www.ra=
spberrypi.org/archives/2081#comment-33577">[2]</a> (and confirmed in this=
 post <a rel=3D"nofollow" class=3D"external autonumber" href=3D"http://www.=
raspberrypi.org/archives/2233">[3]</a>) the P1 pinout is not expected to ch=
ange in future beyond the current Rev.2 layout.=20
</p><p><b>P1 Header Pinout, top row:</b>
</p>
<table style=3D"text-align:center;" border=3D"1">
<tbody><tr>
<td> <b>Pin Number</b> </td>
<td> <b>Pin Name Rev1</b> </td>
<td> <b>Pin Name Rev2</b> </td>
<td> <b>Hardware Notes</b> </td>
<td> <b>Alt 0 Function</b> </td>
<td> <b>Other Alternative Functions</b>
</td></tr>
<tr>
<td> P1-02 </td>
<td bgcolor=3D"red"> <span style=3D"color:white">5V0</span> </td>
<td bgcolor=3D"red"> <span style=3D"color:white">5V0</span> </td>
<td> Supply through input poly fuse
</td></tr>
<tr>
<td> P1-04 </td>
<td bgcolor=3D"red"> <span style=3D"color:white">5V0</span> </td>
<td bgcolor=3D"red"> <span style=3D"color:white">5V0</span> </td>
<td> Supply through input poly fuse
</td></tr>
<tr>
<td> P1-06 </td>
<td bgcolor=3D"black"> <span style=3D"color:white">GND</span> </td>
<td bgcolor=3D"black"> <span style=3D"color:white">GND</span>
</td></tr>

<tr>
<td> P1-08 </td>
<td bgcolor=3D"lime"> GPIO 14 </td>
<td bgcolor=3D"lime"> GPIO 14 </td>
<td> Boot to Alt 0 -&gt; </td>
<td bgcolor=3D"yellow"> UART0_TXD </td>
<td> ALT5 =3D UART1_TXD
</td></tr>
<tr>
<td> P1-10 </td>
<td bgcolor=3D"lime"> GPIO 15 </td>
<td bgcolor=3D"lime"> GPIO 15 </td>
<td> Boot to Alt 0 -&gt; </td>
<td bgcolor=3D"yellow"> UART0_RXD </td>
<td> ALT5 =3D UART1_RXD
</td></tr>
<tr>
<td> P1-12 </td>
<td bgcolor=3D"lime"> GPIO 18 </td>
<td bgcolor=3D"lime"> GPIO 18 </td>
<td> </td>
<td> PCM_CLK </td>
<td> ALT4 =3D SPI1_CE0_N ALT5 =3D PWM0
</td></tr>
<tr>
<td> P1-14 </td>
<td bgcolor=3D"black"> <span style=3D"color:white">GND</span> </td>
<td bgcolor=3D"black"> <span style=3D"color:white">GND</span>
</td></tr>
<tr>
<td> P1-16 </td>
<td bgcolor=3D"lime"> GPIO23 </td>
<td bgcolor=3D"lime"> GPIO23 </td>
<td> </td>
<td> </td>
<td> ALT3 =3D SD1_CMD ALT4 =3D ARM_RTCK
</td></tr>
<tr>
<td> P1-18 </td>
<td bgcolor=3D"lime"> GPIO24 </td>
<td bgcolor=3D"lime"> GPIO24 </td>
<td> </td>
<td> </td>
<td> ALT3 =3D SD1_DAT0 ALT4 =3D ARM_TDO
</td></tr>
<tr>
<td> P1-20 </td>
<td bgcolor=3D"black"> <span style=3D"color:white">GND</span> </td>
<td bgcolor=3D"black"> <span style=3D"color:white">GND</span>
</td></tr>
<tr>
<td> P1-22 </td>
<td bgcolor=3D"lime"> GPIO25 </td>
<td bgcolor=3D"lime"> GPIO25 </td>
<td> </td>
<td> </td>
<td> ALT3 =3D SD1_DAT1 ALT4 =3D ARM_TCK
</td></tr>
<tr>
<td> P1-24 </td>
<td bgcolor=3D"lime"> GPIO08 </td>
<td bgcolor=3D"lime"> GPIO08 </td>
<td> </td>
<td bgcolor=3D"purple"> <span style=3D"color:white">SPI0_CE0_N</span> </td>
<td>
</td></tr>
<tr>
<td> P1-26 </td>
<td bgcolor=3D"lime"> GPIO07 </td>
<td bgcolor=3D"lime"> GPIO07 </td>
<td> </td>
<td bgcolor=3D"purple"> <span style=3D"color:white">SPI0_CE1_N</span> </td>
<td>
</td></tr></tbody></table>
<p><br>
<b>P1 Header Pinout, bottom row:</b>
</p>
<table style=3D"text-align:center;" border=3D"1">
<tbody><tr>
<td> <b>Pin Number</b> </td>
<td> <b>Pin Name Rev1</b> </td>
<td> <b>Pin Name Rev2</b> </td>
<td> <b>Hardware Notes</b> </td>
<td> <b>Alt 0 Function</b> </td>
<td> <b>Other Alternative Functions</b>
</td></tr>
<tr>
<td> P1-01 </td>
<td bgcolor=3D"orange"> 3.3=C2=A0V </td>
<td bgcolor=3D"orange"> 3.3=C2=A0V </td>
<td> 50=C2=A0mA max (01 &amp; 17)
</td></tr>
<tr>
<td> P1-03 </td>
<td bgcolor=3D"lime"> GPIO 0 </td>
<td bgcolor=3D"lime"> <b>GPIO 2</b></td>
<td> 1K8 pull up resistor </td>
<td bgcolor=3D"cyan"> I2C0_SDA / <b>I2C1_SDA</b> </td>
<td>
</td></tr>
<tr>
<td> P1-05 </td>
<td bgcolor=3D"lime"> GPIO 1 </td>
<td bgcolor=3D"lime"> <b>GPIO 3</b></td>
<td> 1K8 pull up resistor </td>
<td bgcolor=3D"cyan"> I2C0_SCL / <b>I2C1_SCL</b> </td>
<td>
</td></tr>
<tr>
<td> P1-07 </td>
<td bgcolor=3D"lime"> GPIO 4 </td>
<td bgcolor=3D"lime"> GPIO 4 </td>
<td> </td>
<td> GPCLK0 </td>
<td> ALT5 =3D ARM_TDI
</td></tr>
<tr>
<td> P1-09 </td>
<td bgcolor=3D"black"> <span style=3D"color:white">GND</span> </td>
<td bgcolor=3D"black"> <span style=3D"color:white">GND</span>
</td></tr>
<tr>
<td> P1-11 </td>
<td bgcolor=3D"lime"> GPIO17 </td>
<td bgcolor=3D"lime"> GPIO17 </td>
<td> </td>
<td> </td>
<td> ALT3 =3D UART0_RTS ALT4 =3D SPI1_CE1_N ALT5 =3D UART1_RTS
</td></tr>
<tr>
<td> P1-13 </td>
<td bgcolor=3D"lime"> GPIO21 </td>
<td bgcolor=3D"lime"> <b>GPIO27</b> </td>
<td> </td>
<td> PCM_DOUT / <b>reserved</b> </td>
<td> ALT4 =3D SPI1_SCLK ALT5 =3D GPCLK1 / <b>ALT3 =3D SD1_DAT3 ALT4 =3D ARM=
_TMS</b>
</td></tr>
<tr>
<td> P1-15 </td>
<td bgcolor=3D"lime"> GPIO22 </td>
<td bgcolor=3D"lime"> GPIO22 </td>
<td> </td>
<td> </td>
<td> ALT3 =3D SD1_CLK ALT4 =3D ARM_TRST
</td></tr>
<tr>
<td> P1-17 </td>
<td bgcolor=3D"orange"> 3.3=C2=A0V </td>
<td bgcolor=3D"orange"> 3.3=C2=A0V </td>
<td> 50=C2=A0mA max (01 &amp; 17)
</td></tr>
<tr>
<td> P1-19 </td>
<td bgcolor=3D"lime"> GPIO10 </td>
<td bgcolor=3D"lime"> GPIO10 </td>
<td> </td>
<td bgcolor=3D"purple"> <span style=3D"color:white">SPI0_MOSI</span> </td>
<td>
</td></tr>
<tr>
<td> P1-21 </td>
<td bgcolor=3D"lime"> GPIO9 </td>
<td bgcolor=3D"lime"> GPIO9 </td>
<td> </td>
<td bgcolor=3D"purple"> <span style=3D"color:white">SPI0_MISO</span> </td>
<td>
</td></tr>
<tr>
<td> P1-23 </td>
<td bgcolor=3D"lime"> GPIO11 </td>
<td bgcolor=3D"lime"> GPIO11 </td>
<td> </td>
<td bgcolor=3D"purple"> <span style=3D"color:white">SPI0_SCLK</span> </td>
<td>
</td></tr>
<tr>
<td> P1-25 </td>
<td bgcolor=3D"black"> <span style=3D"color:white">GND</span> </td>
<td bgcolor=3D"black"> <span style=3D"color:white">GND</span>
</td></tr></tbody></table>
<p><br>
</p>
<table border=3D"1">
<tbody><tr>
<th> Colour legend
</th></tr>
<tr>
<td bgcolor=3D"red"> <span style=3D"color:white">+5=C2=A0V</span>
</td></tr>
<tr>
<td bgcolor=3D"orange"> +3.3=C2=A0V
</td></tr>
<tr>
<td bgcolor=3D"black"> <span style=3D"color:white">Ground, 0V</span>
</td></tr>
<tr>
<td bgcolor=3D"yellow"> UART
</td></tr>
<tr>
<td bgcolor=3D"lime"> GPIO
</td></tr>
<tr>
<td bgcolor=3D"purple"> <span style=3D"color:white">SPI</span>
</td></tr>
<tr>
<td bgcolor=3D"cyan"> I=C2=B2C
</td></tr></tbody></table>
<p>KiCad symbol: <a href=3D"http://elinux.org/File:Conn-raspberry.lib" titl=
e=3D"File:Conn-raspberry.lib">File:Conn-raspberry.lib</a>
</p><p><sup id=3D"cite_ref-9" class=3D"reference"><a href=3D"#cite_note-9">=
[9]</a></sup>
</p><p>Pin 3 (SDA0) and Pin 5 (SCL0) are preset to be used as an I=C2=B2C=
 interface. So there are 1.8=C2=A0kilohm pulls up resistors on the board fo=
r these pins.<sup id=3D"cite_ref-10" class=3D"reference"><a href=3D"#cite_n=
ote-10">[10]</a></sup>
</p><p>Pin 12 supports <a rel=3D"nofollow" class=3D"external text" href=3D"=
http://en.wikipedia.org/wiki/Pulse-width_modulation">PWM</a> .
</p><p>It is also possible to reconfigure GPIO connector pins P1-7, 15, 16,=
 18, 22 (chipset GPIOs 4 and 22 to 25) to provide an ARM JTAG interface.<su=
p id=3D"cite_ref-11" class=3D"reference"><a href=3D"#cite_note-11">[11]</a>=
</sup> However ARM_TMS isn't available on the GPIO connector (chipset pin=
 12 or 27 is needed).  Chipset pin 27 is available on S5, the CSI camera in=
terface however.
</p><p>It is also possible to reconfigure GPIO connector pins P1-12 and 13=
 (chipset GPIO 18 and 21) to provide an I2S (a hardware modification may be=
 required<sup id=3D"cite_ref-I2S_12-0" class=3D"reference"><a href=3D"#cite=
_note-I2S-12">[12]</a></sup>) or PCM interface.<sup id=3D"cite_ref-13" clas=
s=3D"reference"><a href=3D"#cite_note-13">[13]</a></sup> However, PCM_FS an=
d PCM_DIN (chipset pins 19 and 20) are needed for I2S or PCM.
</p><p>A second I=C2=B2C interface (GPIO02_ALT0 is SDA1 and GPIO03_ALT0 is=
 SCL1) and two further GPIOs (GPIO05_ALT0 is GPCLK1, and GPIO27) are availa=
ble on S5, the CSI camera interface.
</p>
<h3><span class=3D"mw-headline" id=3D"Referring_to_pins_on_the_Expansion_he=
ader">Referring to pins on the Expansion header</span></h3>
<p>The header is referred to as "The GPIO Connector (P1)".  To avoid nomenc=
lature confusion between Broadcom signal names on the SoC and pin names on=
 the expansion header, the following naming is highly recommended.
</p>
<ul><li> The expansion header is referred to as "Expansion Header" or "GPIO=
 Connector (P1)"
</li><li> Pins on the GPIO connector (P1) are referred to as P1-01, etc.
</li><li> Names GPIO0, GPIO1, GPIOx-ALTy, etc. refer to the signal names on=
 the SoC as enumerated in the Broadcom datasheet, where "x" matches BCM2835=
 number (without leading zero) and "y" is the alternate number column 0 to=
 5 on page 102-103 of the Broadcom document. For example, depending on what=
 you are describing, use either "GPIO7" to refer to a row of the table, and=
 "GPIO7-ALT0" would refer to a specific cell of the table.
</li><li> When refering to signal names, you should modify the Broadcom nam=
e slightly to minimize confusion. The Broadcom SPI bus pin names are fine,=
 such as "SPI0_*" and "SPI1_*", but they didn't do the same on the I=C2=B2C=
 and UART pins.  Instead of using "SDA0" and "SCL0", you should use "I2C0_S=
DA" and "I2C0_SCL"; and instead of "TX" or "TXD" and "RX" or "RXD", you sho=
uld use "UART0_TXD" and "UART0_RXD".
</li></ul>
<h3><span class=3D"mw-headline" id=3D"Power_pins">Power pins</span></h3>
<p>The maximum permitted current draw from the 3.3=C2=A0V pins is 50=C2=A0m=
A.
</p><p>Maximum permitted current draw from the 5=C2=A0V pin is the USB inpu=
t current (usually 1=C2=A0A) minus any current draw from the rest of the bo=
ard.<sup id=3D"cite_ref-14" class=3D"reference"><a href=3D"#cite_note-14">[=
14]</a></sup>
</p>
<ul><li>Model A: 1000=C2=A0mA - 500=C2=A0mA -&gt; max current draw: 500=C2=
=A0mA
</li><li>Model B: 1000=C2=A0mA - 700=C2=A0mA -&gt; max current draw: 300=C2=
=A0mA
</li></ul>
<p>Be very careful with the 5=C2=A0V pins P1-02 and P1-04, because if you=
 short 5=C2=A0V to any other P1 pin you may permanently damage your RasPi.=
  Before probing P1, it's a good idea to strip short pieces of insulation=
 off a wire and push them over the 5=C2=A0V pins so you don't accidentally=
 short them with a probe.
</p>
<h3><span class=3D"mw-headline" id=3D"GPIO_hardware_hacking">GPIO hardware=
 hacking</span></h3>
The complete list of <a href=3D"http://elinux.org/RPi_BCM2835_GPIOs" title=
=3D"RPi BCM2835 GPIOs">chipset GPIO pins</a> which are available on the GPI=
O connector is: <blockquote><a href=3D"http://elinux.org/RPi_BCM2835_GPIOs#=
GPIO0" title=3D"RPi BCM2835 GPIOs">0</a>, <a href=3D"http://elinux.org/RPi_=
BCM2835_GPIOs#GPIO1" title=3D"RPi BCM2835 GPIOs">1</a>, <a href=3D"http://e=
linux.org/RPi_BCM2835_GPIOs#GPIO4" title=3D"RPi BCM2835 GPIOs">4</a>, <a hr=
ef=3D"http://elinux.org/RPi_BCM2835_GPIOs#GPIO7" title=3D"RPi BCM2835 GPIOs=
">7</a>, <a href=3D"http://elinux.org/RPi_BCM2835_GPIOs#GPIO8" title=3D"RPi=
 BCM2835 GPIOs">8</a>, <a href=3D"http://elinux.org/RPi_BCM2835_GPIOs#GPIO9=
" title=3D"RPi BCM2835 GPIOs">9</a>, <a href=3D"http://elinux.org/RPi_BCM28=
35_GPIOs#GPIO10" title=3D"RPi BCM2835 GPIOs">10</a>, <a href=3D"http://elin=
ux.org/RPi_BCM2835_GPIOs#GPIO11" title=3D"RPi BCM2835 GPIOs">11</a>, <a hre=
f=3D"http://elinux.org/RPi_BCM2835_GPIOs#GPIO14" title=3D"RPi BCM2835 GPIOs=
">14</a>, <a href=3D"http://elinux.org/RPi_BCM2835_GPIOs#GPIO15" title=3D"R=
Pi BCM2835 GPIOs">15</a>, <a href=3D"http://elinux.org/RPi_BCM2835_GPIOs#GP=
IO17" title=3D"RPi BCM2835 GPIOs">17</a>, <a href=3D"http://elinux.org/RPi_=
BCM2835_GPIOs#GPIO18" title=3D"RPi BCM2835 GPIOs">18</a>, <a href=3D"http:/=
/elinux.org/RPi_BCM2835_GPIOs#GPIO21" title=3D"RPi BCM2835 GPIOs">21</a>,=
 <a href=3D"http://elinux.org/RPi_BCM2835_GPIOs#GPIO22" title=3D"RPi BCM283=
5 GPIOs">22</a>, <a href=3D"http://elinux.org/RPi_BCM2835_GPIOs#GPIO23" tit=
le=3D"RPi BCM2835 GPIOs">23</a>, <a href=3D"http://elinux.org/RPi_BCM2835_G=
PIOs#GPIO24" title=3D"RPi BCM2835 GPIOs">24</a>, <a href=3D"http://elinux.o=
rg/RPi_BCM2835_GPIOs#GPIO25" title=3D"RPi BCM2835 GPIOs">25</a></blockquote>
<p>(on the Revision2.0 RaspberryPis, this list changes to: <a href=3D"http:=
//elinux.org/RPi_BCM2835_GPIOs#GPIO2" title=3D"RPi BCM2835 GPIOs">2</a>, <a=
 href=3D"http://elinux.org/RPi_BCM2835_GPIOs#GPIO3" title=3D"RPi BCM2835 GP=
IOs">3</a>, <a href=3D"http://elinux.org/RPi_BCM2835_GPIOs#GPIO4" title=3D"=
RPi BCM2835 GPIOs">4</a>, <a href=3D"http://elinux.org/RPi_BCM2835_GPIOs#GP=
IO7" title=3D"RPi BCM2835 GPIOs">7</a>, <a href=3D"http://elinux.org/RPi_BC=
M2835_GPIOs#GPIO8" title=3D"RPi BCM2835 GPIOs">8</a>, <a href=3D"http://eli=
nux.org/RPi_BCM2835_GPIOs#GPIO9" title=3D"RPi BCM2835 GPIOs">9</a>, <a href=
=3D"http://elinux.org/RPi_BCM2835_GPIOs#GPIO10" title=3D"RPi BCM2835 GPIOs"=
>10</a>, <a href=3D"http://elinux.org/RPi_BCM2835_GPIOs#GPIO11" title=3D"RP=
i BCM2835 GPIOs">11</a>, <a href=3D"http://elinux.org/RPi_BCM2835_GPIOs#GPI=
O14" title=3D"RPi BCM2835 GPIOs">14</a>, <a href=3D"http://elinux.org/RPi_B=
CM2835_GPIOs#GPIO15" title=3D"RPi BCM2835 GPIOs">15</a>, <a href=3D"http://=
elinux.org/RPi_BCM2835_GPIOs#GPIO17" title=3D"RPi BCM2835 GPIOs">17</a>, <a=
 href=3D"http://elinux.org/RPi_BCM2835_GPIOs#GPIO18" title=3D"RPi BCM2835=
 GPIOs">18</a>, <a href=3D"http://elinux.org/RPi_BCM2835_GPIOs#GPIO22" titl=
e=3D"RPi BCM2835 GPIOs">22</a>, <a href=3D"http://elinux.org/RPi_BCM2835_GP=
IOs#GPIO23" title=3D"RPi BCM2835 GPIOs">23</a>, <a href=3D"http://elinux.or=
g/RPi_BCM2835_GPIOs#GPIO24" title=3D"RPi BCM2835 GPIOs">24</a>, <a href=3D"=
http://elinux.org/RPi_BCM2835_GPIOs#GPIO25" title=3D"RPi BCM2835 GPIOs">25<=
/a>, <a href=3D"http://elinux.org/RPi_BCM2835_GPIOs#GPIO27" title=3D"RPi BC=
M2835 GPIOs">27</a>, with <a href=3D"http://elinux.org/RPi_BCM2835_GPIOs#GP=
IO28" title=3D"RPi BCM2835 GPIOs">28</a>, <a href=3D"http://elinux.org/RPi_=
BCM2835_GPIOs#GPIO29" title=3D"RPi BCM2835 GPIOs">29</a>, <a href=3D"http:/=
/elinux.org/RPi_BCM2835_GPIOs#GPIO30" title=3D"RPi BCM2835 GPIOs">30</a>,=
 <a href=3D"http://elinux.org/RPi_BCM2835_GPIOs#GPIO31" title=3D"RPi BCM283=
5 GPIOs">31</a> additionally available on the <a href=3D"#P5_header">P5 hea=
der</a>)
</p><p>As noted above, P1-03 and P1-05 (SDA0 and SCL0 / SDA1 and SCL1) have=
 1.8=C2=A0kilohm pull-up resistors to 3.3=C2=A0V.
</p><p>If 17 GPIOs aren't sufficient for your project, there are a few othe=
r signals potentially available, with varying levels of software and hardwa=
re (soldering iron) hackery skills:
</p><p>GPIO02, 03, 05 and 27 are available on S5 (the CSI interface) when=
 a camera peripheral is not connected to that socket, and are configured by=
 default to provide the functions SDA1, SCL1, CAM_CLK and CAM_GPIO respecti=
vely.  SDA1 and SCL1 have 1K6 pull-up resistors to 3.3=C2=A0V.
</p><p>GPIO06 is LAN_RUN and is available on pad 12 of the footprint for IC=
3 on the Model A. On Model B, it is in use for the Ethernet function.
</p><p>There are a few other chipset GPIO pins accessible on the PCB but ar=
e in use:
</p>
<ul><li> GPIO16 drives status LED D5 (usually SD card access indicator)
</li><li> GPIO28-31 are used by the board ID and are connected to resistors=
 R3 to R10 (only on Rev1.0 boards).
</li><li> GPIO40 and 45 are used by analogue audio and support <a rel=3D"no=
follow" class=3D"external text" href=3D"http://en.wikipedia.org/wiki/Pulse-=
width_modulation">PWM</a>. They connect to the analogue audio circuitry via=
 R21 and R27 respectively.
</li><li> GPIO46 is HDMI hotplug detect (goes to pin 6 of IC1).
</li><li> GPIO47 to 53 are used by the SD card interface.  In particular,=
 GPIO47 is SD card detect (this would seem to be a good candidate for re-us=
e).  GPIO47 is connected to the SD card interface card detect switch; GPIO4=
8 to 53 are connected to the SD card interface via resistors R45 to R50.
</li></ul>
<h3><span class=3D"mw-headline" id=3D"P2_header">P2 header</span></h3>
<p>The P2 header is the VideoCore JTAG and used only during the production=
 of the board. It cannot be used as the ARM JTAG <sup id=3D"cite_ref-15" cl=
ass=3D"reference"><a href=3D"#cite_note-15">[15]</a></sup>. This connector=
 is unpopulated in Rev 2.0 boards.=20
</p><p><a href=3D"http://elinux.org/File:RPi_P2_header.png" class=3D"image"=
><img alt=3D"RPi P2 header.png" src=3D"file:///C:/Users/DaLuz/AppData/Local=
/Temp/maftemp-3cd13269/1386029278824_854/1372981044953_969/index_files/RPi_=
P2_header.png" height=3D"285" width=3D"126"></a>
</p><p>Useful P2 pins:
</p>
<ul><li> Pin 1 - 3.3V (same as P1-01, 50 mA max current draw across both of=
 them)
</li><li> Pin 7 - GND
</li><li> Pin 8 - GND
</li></ul>
<h3><span class=3D"mw-headline" id=3D"P3_header">P3 header</span></h3>
<p>The P3 header, unpopulated, is the LAN9512 JTAG <sup id=3D"cite_ref-16"=
 class=3D"reference"><a href=3D"#cite_note-16">[16]</a></sup>.
</p><p><a href=3D"http://elinux.org/File:RPi_P3_header.png" class=3D"image"=
><img alt=3D"RPi P3 header.png" src=3D"file:///C:/Users/DaLuz/AppData/Local=
/Temp/maftemp-3cd13269/1386029278824_854/1372981044953_969/index_files/RPi_=
P3_header.png" height=3D"255" width=3D"116"></a>
</p><p>Useful P3 pins:
</p>
<ul><li> Pin 7 - GND
</li></ul>
<h3><span class=3D"mw-headline" id=3D"P5_header">P5 header</span></h3>
<p>The P5 header was added with the release of the Revision 2.0 PCB design.
</p><p><a href=3D"http://elinux.org/File:RPi_P5_header.png" class=3D"image"=
><img alt=3D"RPi P5 header.png" src=3D"file:///C:/Users/DaLuz/AppData/Local=
/Temp/maftemp-3cd13269/1386029278824_854/1372981044953_969/index_files/RPi_=
P5_header.png" height=3D"188" width=3D"248"></a>
</p><p><b>P5 Header Pinout (seen from the back of the board), top row:</b>
</p>
<table style=3D"text-align:center;" border=3D"1">
<tbody><tr>
<td> <b>Pin Number</b> </td>
<td> <b>Pin Name Rev2</b> </td>
<td> <b>Hardware Notes</b> </td>
<td> <b>Alt 0 Function</b> </td>
<td> <b>Other Alternative Functions</b>
</td></tr>
<tr>
<td> P5-01 </td>
<td bgcolor=3D"red"> <span style=3D"color:white">5V0</span> </td>
<td> Supply through input poly fuse
</td></tr>
<tr>
<td> P5-03 </td>
<td bgcolor=3D"lime"> GPIO28 </td>
<td> </td>
<td bgcolor=3D"cyan"> I2C0_SDA </td>
<td> ALT2 =3D PCM_CLK
</td></tr>
<tr>
<td> P5-05 </td>
<td bgcolor=3D"lime"> GPIO30 </td>
<td> </td>
<td> </td>
<td> ALT2 =3D PCM_DIN ALT3 =3D UART0_CTS ALT5 =3D UART1_CTS
</td></tr>
<tr>
<td> P5-07 </td>
<td bgcolor=3D"black"> <span style=3D"color:white">GND</span>
</td></tr></tbody></table>
<p><b>P5 Header Pinout (seen from the back of the board), bottom row:</b>
</p>
<table style=3D"text-align:center;" border=3D"1">
<tbody><tr>
<td> <b>Pin Number</b> </td>
<td> <b>Pin Name Rev2</b> </td>
<td> <b>Hardware Notes</b> </td>
<td> <b>Alt 0 Function</b> </td>
<td> <b>Other Alternative Functions</b>
</td></tr>
<tr>
<td> P5-02 </td>
<td bgcolor=3D"orange"> 3.3=C2=A0V </td>
<td> 50=C2=A0mA max (combined with P1)
</td></tr>
<tr>
<td> P5-04 </td>
<td bgcolor=3D"lime"> GPIO29 </td>
<td> </td>
<td bgcolor=3D"cyan"> I2C0_SCL </td>
<td> ALT2 =3D PCM_FS
</td></tr>
<tr>
<td> P5-06 </td>
<td bgcolor=3D"lime"> GPIO31 </td>
<td> </td>
<td> </td>
<td> ALT2 =3D PCM_DOUT ALT3 =3D UART0_RTS ALT5 =3D UART1_RTS
</td></tr>
<tr>
<td> P5-08 </td>
<td bgcolor=3D"black"> <span style=3D"color:white">GND</span>
</td></tr></tbody></table>
<div class=3D"thumb tleft"><div class=3D"thumbinner" style=3D"width:152px;"=
><a href=3D"http://elinux.org/File:Male-slanted2small.jpg" class=3D"image">=
<img alt=3D"" src=3D"file:///C:/Users/DaLuz/AppData/Local/Temp/maftemp-3cd1=
3269/1386029278824_854/1372981044953_969/index_files/150px-Male-slanted2sma=
ll.jpg" class=3D"thumbimage" srcset=3D"/images/thumb/7/72/Male-slanted2smal=
l.jpg/225px-Male-slanted2small.jpg 1.5x, /images/thumb/7/72/Male-slanted2sm=
all.jpg/300px-Male-slanted2small.jpg 2x" height=3D"134" width=3D"150"></a>=
  <div class=3D"thumbcaption"><div class=3D"magnify"><a href=3D"http://elin=
ux.org/File:Male-slanted2small.jpg" class=3D"internal" title=3D"Enlarge"><i=
mg src=3D"file:///C:/Users/DaLuz/AppData/Local/Temp/maftemp-3cd13269/138602=
9278824_854/1372981044953_969/index_files/magnify-clip.png" alt=3D"" height=
=3D"11" width=3D"15"></a></div>Slanted P5 header</div></div></div>
<p>Note that the connector is intended to be mounted on the <b>bottom</b>=
 of the PCB, so that for those who put the connector on the top side, the=
 pin numbers are swapped. Pin 1 and pin 2 are swapped, pin 3 and 4, etc.=20
</p><p>Some people have come to the conclusion that the best way (for them)=
 to attach this header is on top, <a rel=3D"nofollow" class=3D"external tex=
t" href=3D"http://raspi.tv/2013/the-leaning-header-of-pi5a-how-best-to-sold=
er-a-header-on-p5">at a slant away from the P1 header.</a>
</p><p>The new header can provide a second I2C channel (SDA + SCL) and hand=
shake lines for the existing UART (TxD and RxD), or it can be used for an=
 I2S (audio codec chip) interface using the PCM signals CLK, FS (Frame Sync=
), Din and Dout.
</p><p>Note that the connector is placed JUST off-grid with respect to the=
 P1 connector.
</p>
<h3><span class=3D"mw-headline" id=3D"P6_header">P6 header</span></h3>
<p>The P6 header was added with the release of the Revision 2.0 PCB design.
</p><p><a href=3D"http://elinux.org/File:RPi_P6_header.png" class=3D"image"=
><img alt=3D"RPi P6 header.png" src=3D"file:///C:/Users/DaLuz/AppData/Local=
/Temp/maftemp-3cd13269/1386029278824_854/1372981044953_969/index_files/RPi_=
P6_header.png" height=3D"123" width=3D"151"></a>
</p><p><b>P6 Pinout:</b>
</p>
<table style=3D"text-align:center;" border=3D"1">
<tbody><tr>
<td> <b>Pin Number</b> </td>
<td> <b>Pin Name Rev2</b> </td>
<td> <b>Hardware Notes</b>
</td></tr>
<tr>
<td> P6-01 </td>
<td> RUN </td>
<td> Short to ground to reset the BCM2835
</td></tr>
<tr>
<td> P6-02 </td>
<td bgcolor=3D"black"> <span style=3D"color:white">GND</span>
</td></tr></tbody></table>
<p><a rel=3D"nofollow" class=3D"external text" href=3D"http://raspi.tv/2012=
/making-a-reset-switch-for-your-rev-2-raspberry-pi">A reset button can be=
 attached to the P6 header</a>, with which the Pi can be reset.
Momentarily shorting the two pins of P6 together will cause a soft reset of=
 the CPU (which can also 'wake' the Pi from halt/shutdown state).
</p>
<h3><span class=3D"mw-headline" id=3D"Driver_support">Driver support</span>=
</h3>
<p>The Foundation will not include a GPIO driver in the initial release, st=
andard Linux GPIO drivers should work with minimal modification.<sup id=3D"=
cite_ref-17" class=3D"reference"><a href=3D"#cite_note-17">[17]</a></sup>
</p><p>The community implemented SPI and I=C2=B2C drivers <sup id=3D"cite_r=
ef-18" class=3D"reference"><a href=3D"#cite_note-18">[18]</a></sup>, which=
 will be integrated with the new Linux pinctrl concept in a later version=
 of the kernel. (On Oct. 14 2012, it was already included in the latest ras=
pbian image.) A first compiled version as Linux modules is available to ins=
tall on the 19/04/2012 Debian image, including 1-wire support<sup id=3D"cit=
e_ref-19" class=3D"reference"><a href=3D"#cite_note-19">[19]</a></sup>. The=
 I=C2=B2C and SPI driver uses the hardware modules of the microcontroller=
 and interrupts for low CPU usage, the 1-wire support uses bitbanging on th=
e GPIO ports, which results in higher CPU usage.
</p><p>GordonH<sup id=3D"cite_ref-20" class=3D"reference"><a href=3D"#cite_=
note-20">[20]</a></sup> wrote a (mostly) Arduino compatible/style <a rel=3D=
"nofollow" class=3D"external text" href=3D"https://projects.drogon.net/rasp=
berry-pi/wiringpi/">WiringPi library</a> in C for controlling the GPIO pins.
</p><p>A useful tutorial on setting up I=C2=B2C driver support can be found=
 at <a rel=3D"nofollow" class=3D"external text" href=3D"http://www.robot-el=
ectronics.co.uk/htm/raspberry_pi_examples.htm">Robot Electronics</a> - look=
 for the downloadable document rpi_i2c_setup.doc
</p>
<h3><span class=3D"mw-headline" id=3D"Graphical_User_Interfaces">Graphical=
 User Interfaces</span></h3>
<h4><span class=3D"mw-headline" id=3D"WebIOPi">WebIOPi</span></h4>
<p><a rel=3D"nofollow" class=3D"external text" href=3D"http://code.google.c=
om/p/webiopi/">WebIOPi</a> allows you to control each GPIO with a simple we=
b interface that you can use with any browser. Available in PHP and Python,=
 they both require root access, but Python version serves HTTP itself. You=
 can setup each GPIO as input or output and change their states (LOW/HIGH).=
 WebIOPi is fully customizable, so you can use it for home remote control.=
 It also work over Internet. UART/SPI/I2C support will be added later. If=
 you need some computing for your GPIO go to code examples below.
</p>
<h2><span class=3D"mw-headline" id=3D"GPIO_Code_examples">GPIO Code example=
s</span></h2>
<h3><span class=3D"mw-headline" id=3D"C">C</span></h3>
<p>Examples in different C-Languages.
</p>
<h4><span class=3D"mw-headline" id=3D"C_2">C</span></h4>
<p><a rel=3D"nofollow" class=3D"external text" href=3D"http://www.raspberry=
pi.org/forum/educational-applications/gertboard/page-4/#p31555">Gert van Lo=
o &amp; Dom, has provided</a> some tested code which accesses the GPIO pins=
 through direct GPIO register manipulation in C-code.
(Thanks to Dom for doing the difficult work of finding and testing the mapp=
ing.)
Example GPIO code:
</p>
<pre>//
//  How to access GPIO registers from C-code on the Raspberry-Pi
//  Example program
//  15-January-2012
//  Dom and Gert
//  Revised: 15-Feb-2013


// Access from ARM Running Linux

#define BCM2708_PERI_BASE        0x20000000
#define GPIO_BASE                (BCM2708_PERI_BASE + 0x200000) /* GPIO con=
troller */


#include &lt;stdio.h&gt;
#include &lt;stdlib.h&gt;
#include &lt;fcntl.h&gt;
#include &lt;sys/mman.h&gt;
#include &lt;unistd.h&gt;

#define PAGE_SIZE (4*1024)
#define BLOCK_SIZE (4*1024)

int  mem_fd;
void *gpio_map;

// I/O access
volatile unsigned *gpio;


// GPIO setup macros. Always use INP_GPIO(x) before using OUT_GPIO(x) or SE=
T_GPIO_ALT(x,y)
#define INP_GPIO(g) *(gpio+((g)/10)) &amp;=3D ~(7&lt;&lt;(((g)%10)*3))
#define OUT_GPIO(g) *(gpio+((g)/10)) |=3D  (1&lt;&lt;(((g)%10)*3))
#define SET_GPIO_ALT(g,a) *(gpio+(((g)/10))) |=3D (((a)&lt;=3D3?(a)+4:(a)=
=3D=3D4?3:2)&lt;&lt;(((g)%10)*3))

#define GPIO_SET *(gpio+7)  // sets   bits which are 1 ignores bits which=
 are 0
#define GPIO_CLR *(gpio+10) // clears bits which are 1 ignores bits which=
 are 0

void setup_io();

int main(int argc, char **argv)
{
  int g,rep;

  // Set up gpi pointer for direct register access
  setup_io();

  // Switch GPIO 7..11 to output mode

 /************************************************************************\
  * You are about to change the GPIO settings of your computer.          *
  * Mess this up and it will stop working!                               *
  * It might be a good idea to 'sync' before running this program        *
  * so at least you still have your code changes written to the SD-card! *
 \************************************************************************/

  // Set GPIO pins 7-11 to output
  for (g=3D7; g&lt;=3D11; g++)
  {
    INP_GPIO(g); // must use INP_GPIO before we can use OUT_GPIO
    OUT_GPIO(g);
  }

  for (rep=3D0; rep&lt;10; rep++)
  {
     for (g=3D7; g&lt;=3D11; g++)
     {
       GPIO_SET =3D 1&lt;&lt;g;
       sleep(1);
     }
     for (g=3D7; g&lt;=3D11; g++)
     {
       GPIO_CLR =3D 1&lt;&lt;g;
       sleep(1);
     }
  }

  return 0;

} // main


//
// Set up a memory regions to access GPIO
//
void setup_io()
{
   /* open /dev/mem */
   if ((mem_fd =3D open("/dev/mem", O_RDWR|O_SYNC) ) &lt; 0) {
      printf("can't open /dev/mem \n");
      exit(-1);
   }

   /* mmap GPIO */
   gpio_map =3D mmap(
      NULL,             //Any adddress in our space will do
      BLOCK_SIZE,       //Map length
      PROT_READ|PROT_WRITE,// Enable reading &amp; writting to mapped memory
      MAP_SHARED,       //Shared with other processes
      mem_fd,           //File to map
      GPIO_BASE         //Offset to GPIO peripheral
   );

   close(mem_fd); //No need to keep mem_fd open after mmap

   if (gpio_map =3D=3D MAP_FAILED) {
      printf("mmap error=C2=A0%d\n", (int)gpio_map);//errno also set!
      exit(-1);
   }

   // Always use volatile pointer!
   gpio =3D (volatile unsigned *)gpio_map;


} // setup_io

</pre>
<h5><span class=3D"mw-headline" id=3D"GPIO_Pull_Up.2FPull_Down_Register_Exa=
mple">GPIO Pull Up/Pull Down Register Example</span></h5>
<pre>   // enable pull-up on GPIO24&amp;25
   GPIO_PULL =3D 2;
   short_wait();
   // clock on GPIO 24 &amp; 25 (bit 24 &amp; 25 set)
   GPIO_PULLCLK0 =3D 0x03000000;
   short_wait();
   GPIO_PULL =3D 0;
   GPIO_PULLCLK0 =3D 0;
</pre>
<h4><span class=3D"mw-headline" id=3D"C_.2B_wiringPi">C + wiringPi</span></=
h4>
<p>Get and install wiringPi: <a rel=3D"nofollow" class=3D"external free" hr=
ef=3D"https://projects.drogon.net/raspberry-pi/wiringpi/download-and-instal=
l/">https://projects.drogon.net/raspberry-pi/wiringpi/download-and-install/=
</a>
</p><p>Save this, and compile with:
</p>
<pre>  gcc -o blink blink.c -lwiringPi
</pre>
<p>and run with:
</p>
<pre>  sudo ./blink
</pre>
<pre>/*
 * blink.c:
 *      blinks the first LED
 *      Gordon Henderson, projects@drogon.net
 */

#include &lt;stdio.h&gt;
#include &lt;wiringPi.h&gt;

int main (void)
{
  printf ("Raspberry Pi blink\n")=C2=A0;

  if (wiringPiSetup () =3D=3D -1)
    return 1=C2=A0;

  pinMode (0, OUTPUT)=C2=A0;         // aka BCM_GPIO pin 17

  for (;;)
  {
    digitalWrite (0, 1)=C2=A0;       // On
    delay (500)=C2=A0;               // mS
    digitalWrite (0, 0)=C2=A0;       // Off
    delay (500)=C2=A0;
  }
  return 0=C2=A0;
}
</pre>
<h4><span class=3D"mw-headline" id=3D"C_3">C</span></h4>
<p>This must be done as root. To change to the root user:
</p>
<pre>sudo -i</pre>
<p>You must also get and install the bcm2835 library, which supports
GPIO and SPI interfaces. Details and downloads=20
from  <a rel=3D"nofollow" class=3D"external free" href=3D"http://www.open.c=
om.au/mikem/bcm2835">http://www.open.com.au/mikem/bcm2835</a>
</p>
<pre>// blink.c
//
// Example program for bcm2835 library
// Blinks a pin on an off every 0.5 secs
//
// After installing bcm2835, you can build this=20
// with something like:
// gcc -o blink -l rt blink.c -l bcm2835
// sudo ./blink
//
// Or you can test it before installing with:
// gcc -o blink -l rt -I ../../src ../../src/bcm2835.c blink.c
// sudo ./blink
//
// Author: Mike McCauley (mikem@open.com.au)
// Copyright (C) 2011 Mike McCauley
// $Id: RF22.h,v 1.21 2012/05/30 01:51:25 mikem Exp $

#include &lt;bcm2835.h&gt;

// Blinks on RPi pin GPIO 11
#define PIN RPI_GPIO_P1_11

int main(int argc, char **argv)
{
    // If you call this, it will not actually access the GPIO
    // Use for testing
//    bcm2835_set_debug(1);

    if (!bcm2835_init())
	return 1;

    // Set the pin to be an output
    bcm2835_gpio_fsel(PIN, BCM2835_GPIO_FSEL_OUTP);

    // Blink
    while (1)
    {
	// Turn it on
	bcm2835_gpio_write(PIN, HIGH);
=09
	// wait a bit
	delay(500);
=09
	// turn it off
	bcm2835_gpio_write(PIN, LOW);
=09
	// wait a bit
	delay(500);
    }

    return 0;
}
</pre>
<h4><span class=3D"mw-headline" id=3D"C.23">C#</span></h4>
<p>RaspberryPiDotNet library is available at <a rel=3D"nofollow" class=3D"e=
xternal free" href=3D"https://github.com/cypherkey/RaspberryPi.Net/">https:=
//github.com/cypherkey/RaspberryPi.Net/</a>.
The library includes a GPIOFile and GPIOMem class. The GPIOMem requires com=
piling Mike McCauley's bcm2835 library above in to a shared object.
</p>
<pre>using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using RaspberryPiDotNet;
using System.Threading;

namespace RaspPi
{
    class Program
    {
        static void Main(string[] args)
        {
            // Access the GPIO pin using a static method
            GPIOFile.Write(GPIO.GPIOPins.GPIO00, true);

            // Create a new GPIO object
            GPIOMem gpio =3D new GPIOMem(GPIO.GPIOPins.GPIO01);
            gpio.Write(false);
        }
    }
}
</pre>
<p><br>
</p>
<h3><span class=3D"mw-headline" id=3D"Ruby">Ruby</span></h3>
<p>This example uses the WiringPi Ruby Gem: <a rel=3D"nofollow" class=3D"ex=
ternal free" href=3D"http://pi.gadgetoid.co.uk/post/015-wiringpi-now-with-s=
erial">http://pi.gadgetoid.co.uk/post/015-wiringpi-now-with-serial</a> whic=
h you can install on your Pi with "gem install wiringpi"
</p>
<pre>MY_PIN =3D 1

require 'wiringpi'
io =3D WiringPi::GPIO.new
io.mode(MY_PIN,OUTPUT)
io.write(MY_PIN,HIGH)
io.read(MY_PIN)
</pre>
<p>Alternatively the Pi Piper Gem (<a rel=3D"nofollow" class=3D"external fr=
ee" href=3D"https://github.com/jwhitehorn/pi_piper">https://github.com/jwhi=
tehorn/pi_piper</a>) allows for event driven programming:
</p>
<pre>require 'pi_piper'
include PiPiper

watch=C2=A0:pin =3D&gt; 23 do
  puts "Pin changed from #{last_value} to #{value}"
end

PiPiper.wait
</pre>
<p><br>
</p>
<h3><span class=3D"mw-headline" id=3D"Perl">Perl</span></h3>
<p>This must be done as root. To change to the root user:
</p>
<pre>sudo su -</pre>
<p>Supports GPIO and SPI interfaces.
You must also get and install the bcm2835 library. Details and downloads=20
from  <a rel=3D"nofollow" class=3D"external free" href=3D"http://www.open.c=
om.au/mikem/bcm2835">http://www.open.com.au/mikem/bcm2835</a>
You must then get and install the Device::BCM2835 perl library from CPAN=20
<a rel=3D"nofollow" class=3D"external free" href=3D"http://search.cpan.org/=
%7Emikem/Device-BCM2835-1.0/lib/Device/BCM2835.pm">http://search.cpan.org/~=
mikem/Device-BCM2835-1.0/lib/Device/BCM2835.pm</a>
</p>
<pre>use Device::BCM2835;
use strict;

# call set_debug(1) to do a non-destructive test on non-RPi hardware
#Device::BCM2835::set_debug(1);
Device::BCM2835::init()=20
 || die "Could not init library";

# Blink pin 11:
# Set RPi pin 11 to be an output
Device::BCM2835::gpio_fsel(&amp;Device::BCM2835::RPI_GPIO_P1_11,=20
                            &amp;Device::BCM2835::BCM2835_GPIO_FSEL_OUTP);

while (1)
{
    # Turn it on
    Device::BCM2835::gpio_write(&amp;Device::BCM2835::RPI_GPIO_P1_11, 1);
    Device::BCM2835::delay(500); # Milliseconds
    # Turn it off
    Device::BCM2835::gpio_write(&amp;Device::BCM2835::RPI_GPIO_P1_11, 0);
    Device::BCM2835::delay(500); # Milliseconds
}


</pre>
<h3><span class=3D"mw-headline" id=3D"Python">Python</span></h3>
<p>The RPi.GPIO module is installed by default in Raspbian.=20
Any Python script that controls GPIO must be run as root.
</p>
<pre>import RPi.GPIO as GPIO

# use P1 header pin numbering convention
GPIO.setmode(GPIO.BOARD)

# Set up the GPIO channels - one input and one output
GPIO.setup(11, GPIO.IN)
GPIO.setup(12, GPIO.OUT)

# Input from pin 11
input_value =3D GPIO.input(11)

# Output to pin 12
GPIO.output(12, GPIO.HIGH)

# The same script as above but using BCM GPIO 00..nn numbers
GPIO.setmode(GPIO.BCM)
GPIO.setup(17, GPIO.IN)
GPIO.setup(18, GPIO.OUT)
input_value =3D GPIO.input(17)
GPIO.output(18, GPIO.HIGH)</pre>
<p>More documentation is available at <a rel=3D"nofollow" class=3D"external=
 free" href=3D"http://code.google.com/p/raspberry-gpio-python/wiki/Main">ht=
tp://code.google.com/p/raspberry-gpio-python/wiki/Main</a>
</p><p>Also available is RPIO at <a rel=3D"nofollow" class=3D"external free=
" href=3D"https://pypi.python.org/pypi/RPIO">https://pypi.python.org/pypi/R=
PIO</a>
RPIO extends RPi.GPIO with TCP socket interrupts, command line tools and mo=
re.
</p>
<h3><span class=3D"mw-headline" id=3D"Java">Java</span></h3>
<h4><span class=3D"mw-headline" id=3D"Java_using_the_Pi4J_Library">Java usi=
ng the Pi4J Library</span></h4>
<p>This uses the Java library available at <a rel=3D"nofollow" class=3D"ext=
ernal free" href=3D"http://www.pi4j.com/">http://www.pi4j.com/</a>.=20
(Any Java application that controls GPIO must be run as root.)
</p><p>Please note that the Pi4J library uses the WiringPi GPIO pin numberi=
ng scheme <sup id=3D"cite_ref-21" class=3D"reference"><a href=3D"#cite_note=
-21">[21]</a></sup> <sup id=3D"cite_ref-22" class=3D"reference"><a href=3D"=
#cite_note-22">[22]</a></sup>.  Please see the usage documentation for more=
 details: <a rel=3D"nofollow" class=3D"external free" href=3D"http://pi4j.c=
om/usage.html">http://pi4j.com/usage.html</a> =20
</p>
<pre>public static void main(String[] args) {

    // create gpio controller
    GpioController gpio =3D GpioFactory.getInstance();
       =20
    // provision gpio pin #01 as an output pin and turn off
    GpioPinDigitalOutput outputPin =3D gpio.provisionDigitalOutputPin(Raspi=
Pin.GPIO_01, "MyLED", PinState.LOW);
   =20
    // turn output to LOW/OFF state
    outputPin.low();

    // turn output to HIGH/ON state
    outputPin.high();


    // provision gpio pin #02 as an input pin with its internal pull down=
 resistor enabled
    GpioPinDigitalInput inputPin =3D gpio.provisionDigitalInputPin(RaspiPin=
.GPIO_02, "MyButton", PinPullResistance.PULL_DOWN);

    // get input state from pin 2
    boolean input_value =3D inputPin.isHigh();
}
</pre>
<p>More complete and detailed examples are included on the Pi4J website at=
 <a rel=3D"nofollow" class=3D"external free" href=3D"http://www.pi4j.com/">=
http://www.pi4j.com/</a>.=20
</p><p>The Pi4J library includes support for:
</p>
<ul><li> GPIO Control
</li><li> GPIO Listeners
</li><li> Serial Communication
</li><li> I2C Communication
</li><li> SPI Communication
</li></ul>
<h4><span class=3D"mw-headline" id=3D"Java_2">Java</span></h4>
<p>This uses the Java library available at <a rel=3D"nofollow" class=3D"ext=
ernal free" href=3D"https://github.com/jkransen/framboos">https://github.co=
m/jkransen/framboos</a>. It does not depend on (or use) the wiringPi driver=
, but uses the same numbering scheme. Instead it uses the default driver un=
der /sys/class/gpio that ships with the distro, so it works out of the box.=
 Any Java application that controls GPIO must be run as root.
</p>
<pre>public static void main(String[] args) {
  // reading from an in pin
  InPin button =3D new InPin(8);
  boolean isButtonPressed =3D button.getValue();
  button.close();

  // writing to an out pin
  OutPin led =3D new Outpin(0);
  led.setValue(true);
  led.setValue(false);
  led.close();
}
</pre>
<h4><span class=3D"mw-headline" id=3D"Java_Webapp_GPIO_web_control_via_http=
">Java Webapp GPIO web control via http</span></h4>
<p>This uses the Java Webapp available at <a rel=3D"nofollow" class=3D"exte=
rnal free" href=3D"https://bitbucket.org/sbub/raspberry-pi-gpio-web-control=
/overview">https://bitbucket.org/sbub/raspberry-pi-gpio-web-control/overvie=
w</a>. You can control your GPIO over the internet. Any Java application th=
at controls GPIO must be run as root.
</p>
<pre>host:~ sb$ curl 'http://raspberrypi:8080/handle?g0=3D1&amp;g1=3D0'
{"g1":0,"g0":1}

</pre>
<h3><span class=3D"mw-headline" id=3D"Bash_shell_script.2C_using_sysfs.2C_p=
art_of_the_raspbian_operating_system">Bash shell script, using sysfs, part=
 of the raspbian operating system</span></h3>
<p>The export and unexport of pins must be done as root.=20
To change to the root user see below:  To change back, the word exit must=
 be entered.
</p>
<pre>sudo -i</pre>
<p>Export creates a new folder for the exported pin, and creates files for=
 each of its control functions (i.e. active_low, direction, edge, power, su=
bsystem, uevent, and value). Upon creation, the control files can be read=
 by all users (not just root), but can only be written to by user root, the=
 file's owner. Nevertheless, once created, it is possible to allow users ot=
her than root, to also write inputs to the control files, by changing the=
 ownership or permissions of these files. Changes to the file's ownership=
 or permissions must initially be done as root, as their owner and group is=
 set to root upon creation. Typically you might change the owner to be the=
 (non root) user controlling the GPIO, or you might add write permission,=
 and change the group ownership to one of which the user controlling the GP=
IO is a member. By such means, using only packages provided in the recommen=
ded rasbian distribution, it is possible for Python CGI scripts, which are=
 typically run as user nobody, to be used for control of the GPIO over the=
 internet from a browser at a remote location.
</p>
<pre>#!/bin/sh

# GPIO numbers should be from this list
# 0, 1, 4, 7, 8, 9, 10, 11, 14, 15, 17, 18, 21, 22, 23, 24, 25

# Note that the GPIO numbers that you program here refer to the pins
# of the BCM2835 and *not* the numbers on the pin header.=20
# So, if you want to activate GPIO7 on the header you should be=20
# using GPIO4 in this script. Likewise if you want to activate GPIO0
# on the header you should be using GPIO17 here.

# Set up GPIO 4 and set to output
echo "4" &gt; /sys/class/gpio/export
echo "out" &gt; /sys/class/gpio/gpio4/direction

# Set up GPIO 7 and set to input
echo "7" &gt; /sys/class/gpio/export
echo "in" &gt; /sys/class/gpio/gpio7/direction

# Write output
echo "1" &gt; /sys/class/gpio/gpio4/value

# Read from input
cat /sys/class/gpio/gpio7/value=20

# Clean up
echo "4" &gt; /sys/class/gpio/unexport
echo "7" &gt; /sys/class/gpio/unexport
</pre>
<h3><span class=3D"mw-headline" id=3D"Shell_script_-_take_2">Shell script=
 - take 2</span></h3>
<p>You need the wiringPi library from
<a rel=3D"nofollow" class=3D"external free" href=3D"https://projects.drogon=
.net/raspberry-pi/wiringpi/download-and-install/">https://projects.drogon.n=
et/raspberry-pi/wiringpi/download-and-install/</a>. Once installed, there=
 is a new command <b>gpio</b> which can be used
as a <b>non-root</b> user to control the GPIO pins.
</p>
The man page <pre>man gpio</pre> has full details, but briefly:
<pre>  gpio -g mode 17 out
  gpio -g mode 18 pwm

  gpio -g write 17 1
  gpio -g pwm 18 512
</pre>
<p>The <b>-g</b> flag tells the <b>gpio</b> program to use the BCM GPIO pin=
 numbering
scheme (otherwise it will use the wiringPi numbering scheme by default).
</p><p>The gpio command can also control the internal pull-up and pull-down
resistors:
</p>
<pre>  gpio -g mode 17 up
</pre>
<p>This sets the pull-up resistor - however any change of mode, even
setting a pin that's already set as an input to an input will remove
the pull-up/pull-down resistors, so they may need to be reset.
</p><p>Additionally, it can export/un-export the GPIO devices for use by
other non-root programms - e.g. Python scripts. (Although you
may need to drop the calls to GPIO.Setup() in the Python scripts, and
do the setup separately in a little shell script, or call the <b>gpio</b>=
 program
from inside Python).
</p>
<pre>  gpio export 17 out
  gpio export 18 in
</pre>
<p>These exports GPIO-17 and sets it to output, and exports GPIO-18
and sets it to input.=20
</p><p>And when done:
</p>
<pre>  gpio unexport 17
</pre>
<p>The export/unexport commands always use the BCM GPIO pin numbers regardl=
ess of the
presence of the <b>-g</b> flag or not.
</p><p>If you want to use the internal pull-up/down's with the /sys/class/g=
pio mechanisms,
then you can set them after exporting them. So:
</p>
<pre>  gpio -g export 4 in
  gpio -g mode 4 up
</pre>
<p>You can then use GPIO-4 as an input in your Python, Shell, Java, etc. pr=
ograms without the use
of an external resistor to pull the pin high. (If that's what you were afte=
r - for example, a simple push
button switch taking the pin to ground.)
</p><p>A fully working example of a shell script using the GPIO pins
can be found at <a rel=3D"nofollow" class=3D"external free" href=3D"http://=
project-downloads.drogon.net/files/gpioExamples/tuxx.sh">http://project-dow=
nloads.drogon.net/files/gpioExamples/tuxx.sh</a>.
</p><p><br>
</p>
<h3><span class=3D"mw-headline" id=3D"Lazarus_.2F_Free_Pascal">Lazarus / Fr=
ee Pascal</span></h3>
<div class=3D"thumb tright"><div class=3D"thumbinner" style=3D"width:256px;=
"><a href=3D"http://elinux.org/File:RPI_GPIO_testprogram_with_lazarus.png"=
 class=3D"image"><img alt=3D"" src=3D"file:///C:/Users/DaLuz/AppData/Local/=
Temp/maftemp-3cd13269/1386029278824_854/1372981044953_969/index_files/254px=
-RPI_GPIO_testprogram_with_lazarus.png" class=3D"thumbimage" srcset=3D"/ima=
ges/thumb/6/63/RPI_GPIO_testprogram_with_lazarus.png/381px-RPI_GPIO_testpro=
gram_with_lazarus.png 1.5x, /images/thumb/6/63/RPI_GPIO_testprogram_with_la=
zarus.png/508px-RPI_GPIO_testprogram_with_lazarus.png 2x" height=3D"203" wi=
dth=3D"254"></a>  <div class=3D"thumbcaption"><div class=3D"magnify"><a hre=
f=3D"http://elinux.org/File:RPI_GPIO_testprogram_with_lazarus.png" class=3D=
"internal" title=3D"Enlarge"><img src=3D"file:///C:/Users/DaLuz/AppData/Loc=
al/Temp/maftemp-3cd13269/1386029278824_854/1372981044953_969/index_files/ma=
gnify-clip.png" alt=3D"" height=3D"11" width=3D"15"></a></div>A simple app=
 for controlling GPIO pin 17 with Lazarus</div></div></div>
<p>The GPIO pins are accessible from <a href=3D"http://elinux.org/Lazarus_o=
n_RPi" title=3D"Lazarus on RPi">Lazarus</a> without any third-party softwar=
e. This is performed by means of  the <a rel=3D"nofollow" class=3D"external=
 text" href=3D"http://www.freepascal.org/docs-html/rtl/baseunix/index.html"=
>BaseUnix</a> unit that is part of every distribution of Lazarus and Free=
 Pascal or by invoking Unix shell commands with <b>fpsystem</b>. The follow=
ing example uses GPIO pin 17 as output port. It is assumed that you created=
 a form with a TToggleBox named GPIO17ToggleBox and for logging purposes a=
 TMemo with name LogMemo (optional). The program has to be executed with ro=
ot privileges.
</p><p><i>Unit for controlling the GPIO port:</i>
</p>
<pre>unit Unit1;

{Demo application for GPIO on Raspberry Pi}
{Inspired by the Python input/output demo application by Gareth Halfacree}
{written for the Raspberry Pi User Guide, ISBN 978-1-118-46446-5}

{$mode objfpc}{$H+}

interface

uses
  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls,
  Unix, BaseUnix;

type

  { TForm1 }

  TForm1 =3D class(TForm)
    LogMemo: TMemo;
    GPIO17ToggleBox: TToggleBox;
    procedure FormActivate(Sender: TObject);
    procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
    procedure GPIO17ToggleBoxChange(Sender: TObject);
  private
    { private declarations }
  public
    { public declarations }
  end;

const
  PIN_17: PChar =3D '17';
  PIN_ON: PChar =3D '1';
  PIN_OFF: PChar =3D '0';
  OUT_DIRECTION: PChar =3D 'out';

var
  Form1: TForm1;
  gReturnCode: longint; {stores the result of the IO operation}

implementation

{$R *.lfm}

{ TForm1 }

procedure TForm1.FormActivate(Sender: TObject);
var
  fileDesc: integer;
begin
  { Prepare SoC pin 17 (pin 11 on GPIO port) for access: }
  try
    fileDesc=C2=A0:=3D fpopen('/sys/class/gpio/export', O_WrOnly);
    gReturnCode=C2=A0:=3D fpwrite(fileDesc, PIN_17[0], 2);
    LogMemo.Lines.Add(IntToStr(gReturnCode));
  finally
    gReturnCode=C2=A0:=3D fpclose(fileDesc);
    LogMemo.Lines.Add(IntToStr(gReturnCode));
  end;
  { Set SoC pin 17 as output: }
  try
    fileDesc=C2=A0:=3D fpopen('/sys/class/gpio/gpio17/direction', O_WrOnly);
    gReturnCode=C2=A0:=3D fpwrite(fileDesc, OUT_DIRECTION[0], 3);
    LogMemo.Lines.Add(IntToStr(gReturnCode));
  finally
    gReturnCode=C2=A0:=3D fpclose(fileDesc);
    LogMemo.Lines.Add(IntToStr(gReturnCode));
  end;
end;

procedure TForm1.FormClose(Sender: TObject; var CloseAction: TCloseAction);
var
  fileDesc: integer;
begin
  { Free SoC pin 17: }
  try
    fileDesc=C2=A0:=3D fpopen('/sys/class/gpio/unexport', O_WrOnly);
    gReturnCode=C2=A0:=3D fpwrite(fileDesc, PIN_17[0], 2);
    LogMemo.Lines.Add(IntToStr(gReturnCode));
  finally
    gReturnCode=C2=A0:=3D fpclose(fileDesc);
    LogMemo.Lines.Add(IntToStr(gReturnCode));
  end;
end;

procedure TForm1.GPIO17ToggleBoxChange(Sender: TObject);
var
  fileDesc: integer;
begin
  if GPIO17ToggleBox.Checked then
  begin
    { Swith SoC pin 17 on: }
    try
      fileDesc=C2=A0:=3D fpopen('/sys/class/gpio/gpio17/value', O_WrOnly);
      gReturnCode=C2=A0:=3D fpwrite(fileDesc, PIN_ON[0], 1);
      LogMemo.Lines.Add(IntToStr(gReturnCode));
    finally
      gReturnCode=C2=A0:=3D fpclose(fileDesc);
      LogMemo.Lines.Add(IntToStr(gReturnCode));
    end;
  end
  else
  begin
    { Switch SoC pin 17 off: }
    try
      fileDesc=C2=A0:=3D fpopen('/sys/class/gpio/gpio17/value', O_WrOnly);
      gReturnCode=C2=A0:=3D fpwrite(fileDesc, PIN_OFF[0], 1);
      LogMemo.Lines.Add(IntToStr(gReturnCode));
    finally
      gReturnCode=C2=A0:=3D fpclose(fileDesc);
      LogMemo.Lines.Add(IntToStr(gReturnCode));
    end;
  end;
end;

end.
</pre>
<p><i>Main program:</i>
</p>
<pre>program io_test;

{$mode objfpc}{$H+}

uses
  {$IFDEF UNIX}{$IFDEF UseCThreads}
  cthreads,
  {$ENDIF}{$ENDIF}
  Interfaces, // this includes the LCL widgetset
  Forms, Unit1
  { you can add units after this };

{$R *.res}

begin
  Application.Initialize;
  Application.CreateForm(TForm1, Form1);
  Application.Run;
end.
</pre>
<p>Alternative ways to access the GPIO port with Lazarus / Free Pascal is=
 by using <a rel=3D"nofollow" class=3D"external text" href=3D"http://www.la=
zarus.freepascal.org/index.php/topic,17404.0.html">Lazarus wrapper unit for=
 Gordon Henderson's wiringPi C library</a> or <a rel=3D"nofollow" class=3D"=
external text" href=3D"http://wiki.lazarus.freepascal.org/Lazarus_on_Raspbe=
rry_Pi#2._Hardware_access_via_encapsulated_shell_calls">encapsulated shell=
 calls</a>.
</p><p>The <a rel=3D"nofollow" class=3D"external text" href=3D"http://wiki.=
freepascal.org/Lazarus_on_Raspberry_Pi">Lazarus wiki</a> describes a <a rel=
=3D"nofollow" class=3D"external text" href=3D"http://wiki.freepascal.org/La=
zarus_on_Raspberry_Pi#Reading_the_status_of_a_port">demo program</a> that=
 can read the status of a GPIO pin.
</p>
<h3><span class=3D"mw-headline" id=3D"BASIC">BASIC</span></h3>
<h4><span class=3D"mw-headline" id=3D"BASIC_-_Return_to_BASIC">BASIC - Retu=
rn to BASIC</span></h4>
<p><b>RTB</b> or Return to Basic can be found here: <a rel=3D"nofollow" cla=
ss=3D"external free" href=3D"https://projects.drogon.net/return-to-basic/">=
https://projects.drogon.net/return-to-basic/</a>
</p><p>It's a new BASIC featuring modern looping constructs, switch stateme=
nts, named procedures and functions as well as graphics (caresian and turtl=
e), file handling and more. It also supports the Pi's on-board GPIO without=
 needing to be run as root. (You don't need any special setup routines eith=
er)
</p><p>Sample blink program:
</p>
<pre>// blink.rtb:
//    Blink program in Return to Basic
//    Gordon Henderson, projects@drogon.net
//
PinMode (0, 1) // Output
CYCLE=20
  DigitalWrite (0, 1) // Pin 0 ON
  WAIT (0.5) // 0.5 seconds
  DigitalWrite (0, 0)
  WAIT (0.5)
REPEAT=20
END=20
</pre>
<h4><span class=3D"mw-headline" id=3D"BASIC_2">BASIC</span></h4>
<p><b>Bywater BASIC Interpreter</b>
</p><p>The Bywater BASIC Interpreter (bwBASIC) implements a large superset=
 of the ANSI Standard for Minimal BASIC (X3.60-1978) and a significant subs=
et of the ANSI Standard for Full BASIC (X3.113-1987) in C. It also offers=
 shell programming facilities as an extension of BASIC. bwBASIC seeks to be=
 as portable as possible.=20
You can download it at.
<a rel=3D"nofollow" class=3D"external free" href=3D"http://packages.debian.=
org/stable/interpreters/bwbasic">http://packages.debian.org/stable/interpre=
ters/bwbasic</a>
</p><p><b>BASIC programming of the I/O</b>
</p><p><b>Setting up a GPIO pin to be used for inputs or for outputs.</b>
</p><p>We cannot load the control words directly into the  32 bit ARM regis=
ters with 32 bit addresses, as bwBASIC has no POKE and PEEK commands and ot=
her versions of BASIC (as far as I know) only handle 8 bit registers with=
 16 bit addresses with these commands. So we need to export the GPIO pins,=
 so that they exist in a file structure which we can access from basic with=
 the OPEN command.(ref 2)
</p><p>We need to do this in Linux root.
We need to run BASIC in the root too. First we go to the root, then we load=
 bwbasic into root.
</p>
<pre>sudo -1
sudo bwbasic
</pre>
<p>REM Now to export the no4 GPIO pin for example, using a Shell command.
</p>
<pre>echo =E2=80=9C4=E2=80=9D &gt;  /sys/class/gpio/export</pre>
<p>Whilst bwbasic can accommodate shell commands, and we can store a set of=
 these commands (eg. to export a number of GPIO pins at the outset) as numb=
ered statements in a file that can be loaded with the basic command LOAD =
=E2=80=9Cfilename=E2=80=9D and RUN (ref 2), the shell commands have to run=
 as a separate file, as they cannot be run from within, as part of a basic=
 programme.
</p><p><b>Now we can access the file containing the pin direction setting=
 from BASIC</b>
</p><p>We can set GPIO pin 4 to input or to output by OPENing its pin direc=
tion file for output and writing =E2=80=9Cin=E2=80=9D or =E2=80=9Cout=E2=80=
=9D with a PRINT# command. (ref 2 )
</p>
<div dir=3D"ltr" class=3D"mw-geshi mw-code mw-content-ltr"><div class=3D"ba=
sic4gl source-basic4gl"><pre class=3D"de1"><span class=3D"nu0">10</span> OP=
EN =E2=80=9DO=E2=80=9D,#<span class=3D"nu0">1</span>, =E2=80=9C<span class=
=3D"sy0">/</span>sys<span class=3D"sy0">/</span>devices<span class=3D"sy0">=
/</span>virtual<span class=3D"sy0">/</span>gpio<span class=3D"sy0">/</span>=
gpio4<span class=3D"sy0">/</span>direction=E2=80=9D,<span class=3D"nu0">2</=
span>
<span class=3D"nu0">20</span> <span class=3D"kw2">PRINT</span> #<span class=
=3D"nu0">1</span>,=E2=80=9Dout=E2=80=9D
<span class=3D"nu0">30</span> CLOSE #<span class=3D"nu0">1</span></pre></di=
v></div>
<p>REM closes the open direction file, whereupon the system performs the ac=
tion of setting the direction to =E2=80=9Cout=E2=80=9D. NB the system only=
 carries out the action as the file is closed.(ref 3)
</p><p><b>We are now able to control the output of the gpio 4 pin from BASI=
C</b>
</p><p>We can set the GPIO 4 pin to 1 or to 0 by OPENing its pin value file=
 for output and writing =E2=80=9C1=E2=80=9D or =E2=80=9C0=E2=80=9D with a=
 PRINT# command.
</p>
<div dir=3D"ltr" class=3D"mw-geshi mw-code mw-content-ltr"><div class=3D"ba=
sic4gl source-basic4gl"><pre class=3D"de1"><span class=3D"nu0">40</span> OP=
EN =E2=80=9DO=E2=80=9D,#<span class=3D"nu0">4</span>, =E2=80=9C<span class=
=3D"sy0">/</span>sys<span class=3D"sy0">/</span>devices<span class=3D"sy0">=
/</span>virtual<span class=3D"sy0">/</span>gpio<span class=3D"sy0">/</span>=
gpio4<span class=3D"sy0">/</span>value=E2=80=9D,<span class=3D"nu0">1</span>
<span class=3D"nu0">50</span> <span class=3D"kw2">PRINT</span> #<span class=
=3D"nu0">4</span>,=E2=80=9D<span class=3D"nu0">1</span>=E2=80=9D
<span class=3D"nu0">60</span> CLOSE #<span class=3D"nu0">4</span></pre></di=
v></div>
<p>REM turns on the output of GPIO pin 4.
</p><p>REM similarly we can turn off the output of GPIO pin 4.
OPEN =E2=80=9DO=E2=80=9D,#4, =E2=80=9C/sys/devices/virtual/gpio/gpio4/value=
=E2=80=9D,1
PRINT #4,=E2=80=9D0=E2=80=9D
CLOSE #4.
</p><p><b>Example of an (unstructured) BASIC programme</b>=20
</p><p>To read the state of a switch and control the power to two LEDs conn=
ected to GPIO pins 8,7 and 4 respectively.
</p><p>Programme to set 2 pins as outputs and 1 pin as input and to read th=
e input turning on two different combinations of the two outputs (ie output=
 0,1 or 1,0) depending on the state of the input (1 or 0).
</p>
<div dir=3D"ltr" class=3D"mw-geshi mw-code mw-content-ltr"><div class=3D"ba=
sic4gl source-basic4gl"><pre class=3D"de1">sudo =E2=80=93i
sudo bwbasic
LOAD =E2=80=9Cexport.bas=E2=80=9D
LIST
REM a set of Shell statements <span class=3D"kw3">to</span> export the thre=
e GPIO pins.
<span class=3D"nu0">10</span> echo =E2=80=9C<span class=3D"nu0">4</span>=E2=
=80=9D <span class=3D"sy0">&gt;</span> <span class=3D"sy0">/</span>sys<span=
 class=3D"sy0">/</span>class<span class=3D"sy0">/</span>gpio<span class=3D"=
sy0">/</span>export
<span class=3D"nu0">20</span> echo =E2=80=9C<span class=3D"nu0">7</span>=E2=
=80=9D <span class=3D"sy0">&gt;</span> <span class=3D"sy0">/</span>sys<span=
 class=3D"sy0">/</span>class<span class=3D"sy0">/</span>gpio<span class=3D"=
sy0">/</span>export
<span class=3D"nu0">30</span> echo =E2=80=9C<span class=3D"nu0">8</span>=E2=
=80=9D <span class=3D"sy0">&gt;</span> <span class=3D"sy0">/</span>sys<span=
 class=3D"sy0">/</span>class<span class=3D"sy0">/</span>gpio<span class=3D"=
sy0">/</span>export
<span class=3D"kw3">RUN</span></pre></div></div>
<p>NEW REM clears the export.bas programme from memory
</p>
<div dir=3D"ltr" class=3D"mw-geshi mw-code mw-content-ltr"><div class=3D"ba=
sic4gl source-basic4gl"><pre class=3D"de1">.
LOAD =E2=80=9Cdemo1.bas=E2=80=9D
LIST
<span class=3D"nu0">10</span> OPEN =E2=80=9DO=E2=80=9D,#<span class=3D"nu0"=
>1</span>, =E2=80=9C<span class=3D"sy0">/</span>sys<span class=3D"sy0">/</s=
pan>devices<span class=3D"sy0">/</span>virtual<span class=3D"sy0">/</span>g=
pio<span class=3D"sy0">/</span>gpio4<span class=3D"sy0">/</span>direction=
=E2=80=9D,<span class=3D"nu0">2</span>=20
<span class=3D"nu0">20</span> OPEN =E2=80=9DO=E2=80=9D,#<span class=3D"nu0"=
>2</span>, =E2=80=9C<span class=3D"sy0">/</span>sys<span class=3D"sy0">/</s=
pan>devices<span class=3D"sy0">/</span>virtual<span class=3D"sy0">/</span>g=
pio<span class=3D"sy0">/</span>gpio7<span class=3D"sy0">/</span>direction=
=E2=80=9D,<span class=3D"nu0">2</span>=20
<span class=3D"nu0">30</span> OPEN =E2=80=9DO=E2=80=9D,#<span class=3D"nu0"=
>3</span>, =E2=80=9C<span class=3D"sy0">/</span>sys<span class=3D"sy0">/</s=
pan>devices<span class=3D"sy0">/</span>virtual<span class=3D"sy0">/</span>g=
pio<span class=3D"sy0">/</span>gpio8<span class=3D"sy0">/</span>direction=
=E2=80=9D,<span class=3D"nu0">2</span>
REM opens the three pin direction files
<span class=3D"nu0">40</span> <span class=3D"kw2">PRINT</span> #<span class=
=3D"nu0">1</span>, =E2=80=9Cout=E2=80=9D
<span class=3D"nu0">50</span> <span class=3D"kw2">PRINT</span> #<span class=
=3D"nu0">2</span>, =E2=80=9Cout=E2=80=9D
<span class=3D"nu0">60</span> <span class=3D"kw2">PRINT</span> #<span class=
=3D"nu0">3</span>, =E2=80=9Cin=E2=80=9D
REM sets GPIO pins <span class=3D"nu0">4</span> <span class=3D"kw3">and</sp=
an> <span class=3D"nu0">7</span> <span class=3D"kw3">as</span> outputs <spa=
n class=3D"kw3">and</span> GPIO pin <span class=3D"nu0">8</span> <span clas=
s=3D"kw3">as</span> <span class=3D"kw3">input</span>.
<span class=3D"nu0">70</span> CLOSE #<span class=3D"nu0">1</span>
<span class=3D"nu0">80</span> CLOSE #<span class=3D"nu0">2</span>
<span class=3D"nu0">90</span> CLOSE #<span class=3D"nu0">3</span>
REM closes all open files, allowing the system <span class=3D"kw3">to</span=
> perform the direction settings.
<span class=3D"nu0">100</span> OPEN =E2=80=9DI=E2=80=9D,#<span class=3D"nu0=
">8</span>, =E2=80=9C<span class=3D"sy0">/</span>sys<span class=3D"sy0">/</=
span>devices<span class=3D"sy0">/</span>virtual<span class=3D"sy0">/</span>=
gpio<span class=3D"sy0">/</span>gpio8<span class=3D"sy0">/</span>value=E2=
=80=9D,<span class=3D"nu0">1</span>
REM opens the GPIO pin <span class=3D"nu0">8</span> value file
<span class=3D"nu0">110</span> <span class=3D"kw3">INPUT</span> #<span clas=
s=3D"nu0">8</span>,x
REM reads the value of the <span class=3D"kw3">input</span> pin <span class=
=3D"kw3">and</span> stores the value in numerical variable x
<span class=3D"nu0">120</span> CLOSE #<span class=3D"nu0">8</span>
REM closes the open file, allowing the system <span class=3D"kw3">to</span>=
 <span class=3D"kw3">read</span> the value of the <span class=3D"kw3">input=
</span> pin <span class=3D"kw3">and</span> store the value in numerical var=
iable x.
<span class=3D"nu0">130</span> OPEN =E2=80=9CO=E2=80=9D,#<span class=3D"nu0=
">1</span>, =E2=80=9C<span class=3D"sy0">/</span>sys<span class=3D"sy0">/</=
span>devices<span class=3D"sy0">/</span>virtual<span class=3D"sy0">/</span>=
gpio<span class=3D"sy0">/</span>gpio4<span class=3D"sy0">/</span>value=E2=
=80=9D,<span class=3D"nu0">1</span>
<span class=3D"nu0">140</span> OPEN =E2=80=9CO=E2=80=9D,#<span class=3D"nu0=
">2</span>, =E2=80=9C<span class=3D"sy0">/</span>sys<span class=3D"sy0">/</=
span>devices<span class=3D"sy0">/</span>virtual<span class=3D"sy0">/</span>=
gpio<span class=3D"sy0">/</span>gpio7<span class=3D"sy0">/</span>value=E2=
=80=9D,<span class=3D"nu0">1</span>
REM opens the GPIO pins <span class=3D"nu0">4</span> <span class=3D"kw3">an=
d</span> value files ready <span class=3D"kw3">for</span> outputting 1s <sp=
an class=3D"kw3">and</span> 0s.
<span class=3D"nu0">150</span> <span class=3D"kw3">IF</span> x<span class=
=3D"sy0">&lt;</span><span class=3D"nu0">1</span> <span class=3D"kw3">THEN</=
span> <span class=3D"kw3">GOTO</span> <span class=3D"nu0">160</span> <span=
 class=3D"kw3">ELSE</span> <span class=3D"kw3">GOTO</span> <span class=3D"n=
u0">190</span>
REM tests the state of the switch <span class=3D"br0">(</span><span class=
=3D"nu0">1</span> or0<span class=3D"br0">)</span> <span class=3D"kw3">and</=
span> directs the program <span class=3D"kw3">to</span> generate the approp=
riate outputs
<span class=3D"nu0">160</span> <span class=3D"kw2">PRINT</span> #<span clas=
s=3D"nu0">1</span>,=E2=80=9D<span class=3D"nu0">1</span>=E2=80=9D
<span class=3D"nu0">170</span> <span class=3D"kw2">PRINT</span> #<span clas=
s=3D"nu0">2</span>,=E2=80=9D<span class=3D"nu0">0</span>=E2=80=9D
<span class=3D"nu0">180</span> <span class=3D"kw3">GOTO</span> <span class=
=3D"nu0">210</span>
<span class=3D"nu0">190</span>  <span class=3D"kw2">PRINT</span>#<span clas=
s=3D"nu0">1</span>,<span class=3D"st0">"0"</span>
<span class=3D"nu0">200</span> <span class=3D"kw2">PRINT</span> #<span clas=
s=3D"nu0">2</span>,<span class=3D"st0">"1"</span>
<span class=3D"nu0">210</span> CLOSE #<span class=3D"nu0">1</span>
<span class=3D"nu0">220</span> CLOSE #<span class=3D"nu0">2</span>
REM Closes the files <span class=3D"kw3">and</span> allows the outputs <spa=
n class=3D"kw3">to</span> light the LED
<span class=3D"nu0">230</span> <span class=3D"kw3">END</span>.</pre></div><=
/div>
<p>When all is done, we should unexport the GPIO pins, to leave the R-Pi as=
 we found it.(Ref 1.)
</p>
<div dir=3D"ltr" class=3D"mw-geshi mw-code mw-content-ltr"><div class=3D"ba=
sic4gl source-basic4gl"><pre class=3D"de1">NEW
LOAD =E2=80=9Cunexport.bas=E2=80=9D
LIST
REM a set of Shell statements <span class=3D"kw3">to</span> unexport the th=
ree GPIO pins.
<span class=3D"nu0">10</span> echo =E2=80=9C<span class=3D"nu0">4</span>=E2=
=80=9D <span class=3D"sy0">&gt;</span> <span class=3D"sy0">/</span>sys<span=
 class=3D"sy0">/</span>class<span class=3D"sy0">/</span>gpio<span class=3D"=
sy0">/</span>unexport
<span class=3D"nu0">20</span> echo =E2=80=9C<span class=3D"nu0">7</span>=E2=
=80=9D <span class=3D"sy0">&gt;</span> <span class=3D"sy0">/</span>sys<span=
 class=3D"sy0">/</span>class<span class=3D"sy0">/</span>gpio<span class=3D"=
sy0">/</span>unexport
<span class=3D"nu0">30</span> echo =E2=80=9C<span class=3D"nu0">8</span>=E2=
=80=9D <span class=3D"sy0">&gt;</span> <span class=3D"sy0">/</span>sys<span=
 class=3D"sy0">/</span>class<span class=3D"sy0">/</span>gpio<span class=3D"=
sy0">/</span>unexport
<span class=3D"kw3">RUN</span></pre></div></div>
<p>A simple circuit to provide the switched input and the two LED outputs.
</p><p>Ancient Mariner. Dec. 2012
</p><p>References.
</p><p>1. This paper RPi Low-level peripherals.
</p><p>2. Ed Beynon.  <a rel=3D"nofollow" class=3D"external free" href=3D"h=
ttp://www.ybw.com/forums/showthread.php?t=3D331320&amp;page=3D5">http://www=
.ybw.com/forums/showthread.php?t=3D331320&amp;page=3D5</a>
</p><p>3. Arthur Kaletzky. Private communication. 25/10/2012
</p><p>4. bwbasic manual.<br>
</p><p>For the two original documents this example has been copied from see=
:<br>
<a href=3D"http://elinux.org/images/d/df/GPIO_Driving_Example_%28BASIC%29_.=
doc" class=3D"internal" title=3D"GPIO Driving Example (BASIC) .doc"> GPIO_D=
riving_Example_(BASIC)_.doc</a>
</p><p><a href=3D"http://elinux.org/images/6/64/Raspberry_Pi_I-O_viii.doc"=
 class=3D"internal" title=3D"Raspberry Pi I-O viii.doc"> Raspberry_Pi_I-O_v=
iii.doc</a>
</p>
<h2><span class=3D"mw-headline" id=3D"SPI">SPI</span></h2>
<p>There is one SPI bus brought out to the header: <a href=3D"http://elinux=
.org/RPi_SPI" title=3D"RPi SPI">RPi_SPI</a>
</p>
<h2><span class=3D"mw-headline" id=3D"MIPI_CSI-2">MIPI CSI-2</span></h2>
<p>On the production board<sup id=3D"cite_ref-23" class=3D"reference"><a hr=
ef=3D"#cite_note-23">[23]</a></sup>, the Raspberry Pi Foundation design bri=
ngs out the MIPI CSI-2 (Camera Serial Interface<sup id=3D"cite_ref-24" clas=
s=3D"reference"><a href=3D"#cite_note-24">[24]</a></sup>) to a 15-way flat=
 flex connector S5, between the Ethernet and HDMI connectors. A compatible=
 camera<sup id=3D"cite_ref-25" class=3D"reference"><a href=3D"#cite_note-25=
">[25]</a></sup> with 5 Megapixels and 1080p video resolution was released=
 in May 2013.
</p>
<h2><span class=3D"mw-headline" id=3D"DSI">DSI</span></h2>
<p>On the production board, the Raspberry Pi Foundation design brings out=
 the DSI (Display Serial Interface<sup id=3D"cite_ref-26" class=3D"referenc=
e"><a href=3D"#cite_note-26">[26]</a></sup>) to a 15-way flat flex connecto=
r labelled S2, next to Raspberry Pi logo. It has two data lanes and a clock=
 lane, to drive a possible future LCD screen device. Some smart phone scree=
ns use DSI<sup id=3D"cite_ref-27" class=3D"reference"><a href=3D"#cite_note=
-27">[27]</a></sup>.
</p>
<h2><span class=3D"mw-headline" id=3D"CEC">CEC</span></h2>
<p><a href=3D"http://elinux.org/CEC_%28Consumer_Electronics_Control%29_over=
_HDMI" title=3D"CEC (Consumer Electronics Control) over HDMI">HDMI-CEC (Con=
sumer Electronics Control for HDMI)</a> is supported by hardware but some=
 driver work will be needed and currently isn't exposed into Linux userland.
Eben notes that he has seen CEC demos on the Broadcom SoC they are using.=20
</p><p>libCEC with Raspberry Pi support has been included in OpenELEC and=
 will be included in Raspbmc RC4.<sup id=3D"cite_ref-28" class=3D"reference=
"><a href=3D"#cite_note-28">[28]</a></sup>
</p><p>For more information about HDMI-CEC and what you could do with it on=
 the Raspberry Pi please see the <a href=3D"http://elinux.org/CEC_%28Consum=
er_Electronics_Control%29_over_HDMI" title=3D"CEC (Consumer Electronics Con=
trol) over HDMI">CEC (Consumer Electronics Control) over HDMI</a> article.
</p>
<h2><span class=3D"mw-headline" id=3D"References">References</span></h2>
<ol class=3D"references">
<li id=3D"cite_note-1"><span class=3D"mw-cite-backlink"><a href=3D"#cite_re=
f-1">=E2=86=91</a></span> <span class=3D"reference-text"><a rel=3D"nofollow=
" class=3D"external free" href=3D"http://www.raspberrypi.org/forum/features=
-and-requests/easy-gpio-hardware-software/page-3/#p31907">http://www.raspbe=
rrypi.org/forum/features-and-requests/easy-gpio-hardware-software/page-3/#p=
31907</a></span>
</li>
<li id=3D"cite_note-2"><span class=3D"mw-cite-backlink"><a href=3D"#cite_re=
f-2">=E2=86=91</a></span> <span class=3D"reference-text"><a rel=3D"nofollow=
" class=3D"external free" href=3D"http://www.raspberrypi.org/archives/384">=
http://www.raspberrypi.org/archives/384</a></span>
</li>
<li id=3D"cite_note-3"><span class=3D"mw-cite-backlink"><a href=3D"#cite_re=
f-3">=E2=86=91</a></span> <span class=3D"reference-text"><a rel=3D"nofollow=
" class=3D"external free" href=3D"http://www.raspberrypi.org/archives/384">=
http://www.raspberrypi.org/archives/384</a></span>
</li>
<li id=3D"cite_note-4"><span class=3D"mw-cite-backlink"><a href=3D"#cite_re=
f-4">=E2=86=91</a></span> <span class=3D"reference-text"><a rel=3D"nofollow=
" class=3D"external free" href=3D"http://www.raspberrypi.org/wp-content/upl=
oads/2012/02/BCM2835-ARM-Peripherals.pdf">http://www.raspberrypi.org/wp-con=
tent/uploads/2012/02/BCM2835-ARM-Peripherals.pdf</a></span>
</li>
<li id=3D"cite_note-5"><span class=3D"mw-cite-backlink"><a href=3D"#cite_re=
f-5">=E2=86=91</a></span> <span class=3D"reference-text"><a rel=3D"nofollow=
" class=3D"external free" href=3D"http://www.raspberrypi.org/archives/384#c=
omment-5217">http://www.raspberrypi.org/archives/384#comment-5217</a></span>
</li>
<li id=3D"cite_note-6"><span class=3D"mw-cite-backlink"><a href=3D"#cite_re=
f-6">=E2=86=91</a></span> <span class=3D"reference-text"><a rel=3D"nofollow=
" class=3D"external free" href=3D"http://www.raspberrypi.org/wp-content/upl=
oads/2012/02/BCM2835-ARM-Peripherals.pdf">http://www.raspberrypi.org/wp-con=
tent/uploads/2012/02/BCM2835-ARM-Peripherals.pdf</a></span>
</li>
<li id=3D"cite_note-7"><span class=3D"mw-cite-backlink"><a href=3D"#cite_re=
f-7">=E2=86=91</a></span> <span class=3D"reference-text"><a rel=3D"nofollow=
" class=3D"external free" href=3D"http://www.raspberrypi.org/phpBB3/viewtop=
ic.php?f=3D44&amp;t=3D7509">http://www.raspberrypi.org/phpBB3/viewtopic.php=
?f=3D44&amp;t=3D7509</a></span>
</li>
<li id=3D"cite_note-8"><span class=3D"mw-cite-backlink"><a href=3D"#cite_re=
f-8">=E2=86=91</a></span> <span class=3D"reference-text"><a rel=3D"nofollow=
" class=3D"external free" href=3D"http://www.raspberrypi.org/downloads">htt=
p://www.raspberrypi.org/downloads</a></span>
</li>
<li id=3D"cite_note-9"><span class=3D"mw-cite-backlink"><a href=3D"#cite_re=
f-9">=E2=86=91</a></span> <span class=3D"reference-text"><a rel=3D"nofollow=
" class=3D"external free" href=3D"http://www.raspberrypi.org/forum/projects=
-and-collaboration-general/gpio-header-pinout-clarification/page-2">http://=
www.raspberrypi.org/forum/projects-and-collaboration-general/gpio-header-pi=
nout-clarification/page-2</a></span>
</li>
<li id=3D"cite_note-10"><span class=3D"mw-cite-backlink"><a href=3D"#cite_r=
ef-10">=E2=86=91</a></span> <span class=3D"reference-text"><a rel=3D"nofoll=
ow" class=3D"external free" href=3D"http://www.raspberrypi.org/forum/featur=
es-and-requests/easy-gpio-hardware-software/page-6/#p56480">http://www.rasp=
berrypi.org/forum/features-and-requests/easy-gpio-hardware-software/page-6/=
#p56480</a></span>
</li>
<li id=3D"cite_note-11"><span class=3D"mw-cite-backlink"><a href=3D"#cite_r=
ef-11">=E2=86=91</a></span> <span class=3D"reference-text"><a rel=3D"nofoll=
ow" class=3D"external free" href=3D"http://www.raspberrypi.org/forum?mingle=
forumaction=3Dviewtopic&amp;t=3D1288.1">http://www.raspberrypi.org/forum?mi=
ngleforumaction=3Dviewtopic&amp;t=3D1288.1</a></span>
</li>
<li id=3D"cite_note-I2S-12"><span class=3D"mw-cite-backlink"><a href=3D"#ci=
te_ref-I2S_12-0">=E2=86=91</a></span> <span class=3D"reference-text"><a rel=
=3D"nofollow" class=3D"external text" href=3D"http://www.raspberrypi.org/fo=
rum/features-and-requests/sad-about-removal-of-i2s-why-was-this-change-made=
">Forum:Sad about removal of I2S. Why was this change made?</a></span>
</li>
<li id=3D"cite_note-13"><span class=3D"mw-cite-backlink"><a href=3D"#cite_r=
ef-13">=E2=86=91</a></span> <span class=3D"reference-text"><a rel=3D"nofoll=
ow" class=3D"external free" href=3D"http://www.raspberrypi.org/forum?mingle=
forumaction=3Dviewtopic&amp;t=3D1288.2">http://www.raspberrypi.org/forum?mi=
ngleforumaction=3Dviewtopic&amp;t=3D1288.2</a></span>
</li>
<li id=3D"cite_note-14"><span class=3D"mw-cite-backlink"><a href=3D"#cite_r=
ef-14">=E2=86=91</a></span> <span class=3D"reference-text"><a rel=3D"nofoll=
ow" class=3D"external free" href=3D"http://www.raspberrypi.org/forum?mingle=
forumaction=3Dviewtopic&amp;t=3D1536#postid-21841">http://www.raspberrypi.o=
rg/forum?mingleforumaction=3Dviewtopic&amp;t=3D1536#postid-21841</a></span>
</li>
<li id=3D"cite_note-15"><span class=3D"mw-cite-backlink"><a href=3D"#cite_r=
ef-15">=E2=86=91</a></span> <span class=3D"reference-text"><a rel=3D"nofoll=
ow" class=3D"external free" href=3D"http://www.raspberrypi.org/phpBB3/viewt=
opic.php?f=3D24&amp;t=3D5894">http://www.raspberrypi.org/phpBB3/viewtopic.p=
hp?f=3D24&amp;t=3D5894</a></span>
</li>
<li id=3D"cite_note-16"><span class=3D"mw-cite-backlink"><a href=3D"#cite_r=
ef-16">=E2=86=91</a></span> <span class=3D"reference-text"><a rel=3D"nofoll=
ow" class=3D"external free" href=3D"http://www.raspberrypi.org/phpBB3/viewt=
opic.php?f=3D24&amp;t=3D5894">http://www.raspberrypi.org/phpBB3/viewtopic.p=
hp?f=3D24&amp;t=3D5894</a></span>
</li>
<li id=3D"cite_note-17"><span class=3D"mw-cite-backlink"><a href=3D"#cite_r=
ef-17">=E2=86=91</a></span> <span class=3D"reference-text"><a rel=3D"nofoll=
ow" class=3D"external free" href=3D"http://www.raspberrypi.org/forum?mingle=
forumaction=3Dviewtopic&amp;t=3D1278.0">http://www.raspberrypi.org/forum?mi=
ngleforumaction=3Dviewtopic&amp;t=3D1278.0</a></span>
</li>
<li id=3D"cite_note-18"><span class=3D"mw-cite-backlink"><a href=3D"#cite_r=
ef-18">=E2=86=91</a></span> <span class=3D"reference-text"><a rel=3D"nofoll=
ow" class=3D"external free" href=3D"http://www.bootc.net/projects/raspberry=
-pi-kernel/">http://www.bootc.net/projects/raspberry-pi-kernel/</a></span>
</li>
<li id=3D"cite_note-19"><span class=3D"mw-cite-backlink"><a href=3D"#cite_r=
ef-19">=E2=86=91</a></span> <span class=3D"reference-text"><a rel=3D"nofoll=
ow" class=3D"external free" href=3D"http://www.raspberrypi.org/phpBB3/viewt=
opic.php?p=3D86172#p86172">http://www.raspberrypi.org/phpBB3/viewtopic.php?=
p=3D86172#p86172</a></span>
</li>
<li id=3D"cite_note-20"><span class=3D"mw-cite-backlink"><a href=3D"#cite_r=
ef-20">=E2=86=91</a></span> <span class=3D"reference-text"><a rel=3D"nofoll=
ow" class=3D"external free" href=3D"http://www.raspberrypi.org/forum/genera=
l-discussion/wiring-for-the-raspberry-pis-gpio">http://www.raspberrypi.org/=
forum/general-discussion/wiring-for-the-raspberry-pis-gpio</a></span>
</li>
<li id=3D"cite_note-21"><span class=3D"mw-cite-backlink"><a href=3D"#cite_r=
ef-21">=E2=86=91</a></span> <span class=3D"reference-text"><a rel=3D"nofoll=
ow" class=3D"external free" href=3D"http://pi4j.com/usage.html#Pin_Numberin=
g">http://pi4j.com/usage.html#Pin_Numbering</a></span>
</li>
<li id=3D"cite_note-22"><span class=3D"mw-cite-backlink"><a href=3D"#cite_r=
ef-22">=E2=86=91</a></span> <span class=3D"reference-text"><a rel=3D"nofoll=
ow" class=3D"external free" href=3D"https://projects.drogon.net/raspberry-p=
i/wiringpi/pins/">https://projects.drogon.net/raspberry-pi/wiringpi/pins/</=
a></span>
</li>
<li id=3D"cite_note-23"><span class=3D"mw-cite-backlink"><a href=3D"#cite_r=
ef-23">=E2=86=91</a></span> <span class=3D"reference-text"><a rel=3D"nofoll=
ow" class=3D"external free" href=3D"http://www.raspberrypi.org/wp-content/u=
ploads/2012/04/Raspberry-Pi-Schematics-R1.0.pdf">http://www.raspberrypi.org=
/wp-content/uploads/2012/04/Raspberry-Pi-Schematics-R1.0.pdf</a></span>
</li>
<li id=3D"cite_note-24"><span class=3D"mw-cite-backlink"><a href=3D"#cite_r=
ef-24">=E2=86=91</a></span> <span class=3D"reference-text"><a rel=3D"nofoll=
ow" class=3D"external free" href=3D"http://www.mipi.org/specifications/came=
ra-interface">http://www.mipi.org/specifications/camera-interface</a></span>
</li>
<li id=3D"cite_note-25"><span class=3D"mw-cite-backlink"><a href=3D"#cite_r=
ef-25">=E2=86=91</a></span> <span class=3D"reference-text"><a rel=3D"nofoll=
ow" class=3D"external free" href=3D"http://elinux.org/Rpi_Camera_Module">ht=
tp://elinux.org/Rpi_Camera_Module</a></span>
</li>
<li id=3D"cite_note-26"><span class=3D"mw-cite-backlink"><a href=3D"#cite_r=
ef-26">=E2=86=91</a></span> <span class=3D"reference-text"><a rel=3D"nofoll=
ow" class=3D"external free" href=3D"http://www.mipi.org/specifications/disp=
lay-interface">http://www.mipi.org/specifications/display-interface</a></sp=
an>
</li>
<li id=3D"cite_note-27"><span class=3D"mw-cite-backlink"><a href=3D"#cite_r=
ef-27">=E2=86=91</a></span> <span class=3D"reference-text"><a rel=3D"nofoll=
ow" class=3D"external free" href=3D"http://en.wikipedia.org/wiki/Display_Se=
rial_Interface">http://en.wikipedia.org/wiki/Display_Serial_Interface</a></=
span>
</li>
<li id=3D"cite_note-28"><span class=3D"mw-cite-backlink"><a href=3D"#cite_r=
ef-28">=E2=86=91</a></span> <span class=3D"reference-text"><a rel=3D"nofoll=
ow" class=3D"external free" href=3D"http://blog.pulse-eight.com/2012/08/01/=
libcec-1-8-0-a-firmware-upgrade-and-raspberry-pi-support/">http://blog.puls=
e-eight.com/2012/08/01/libcec-1-8-0-a-firmware-upgrade-and-raspberry-pi-sup=
port/</a></span>
</li>
</ol>
<p><br>

</p>
<table class=3D"navbox" style=3D";width:100%" cellspacing=3D"0">

<tbody><tr>
<td style=3D"padding:2px;">
<table class=3D"nowraplinks" style=3D"width:100%;background:transparent;col=
or:inherit;;" cellspacing=3D"0">

<tbody><tr>
<th style=3D"background:#00CC00;;" colspan=3D"3" class=3D"navbox-title"> <d=
iv style=3D"float:left; width:6em;text-align:left;"> <span class=3D"noprint=
 plainlinks navbar" style=3D""><span style=3D"white-space:nowrap;word-spaci=
ng:-.12em;"><a href=3D"http://elinux.org/Template:Raspberry_Pi" title=3D"Te=
mplate:Raspberry Pi"><span style=3D"background:#00CC00;;;border:none;" titl=
e=3D"View this template">v</span></a><span style=3D"background:#00CC00;;;bo=
rder:none;"> <b>=C2=B7</b> </span><a href=3D"http://elinux.org/Template_tal=
k:Raspberry_Pi" title=3D"Template talk:Raspberry Pi"><span style=3D"backgro=
und:#00CC00;;;border:none;" title=3D"Discuss this template">d</span></a><sp=
an style=3D"background:#00CC00;;;border:none;"> <b>=C2=B7</b> </span><a rel=
=3D"nofollow" class=3D"external text" href=3D"http://elinux.org/index.php?t=
itle=3DTemplate:Raspberry_Pi&amp;action=3Dedit"><span style=3D"background:#=
00CC00;;;border:none;" title=3D"Edit this template">e</span></a></span></sp=
an>
 </div><div style=3D"float:right;width:6em;">=C2=A0</div> <span style=3D"fo=
nt-size:110%;"> <a href=3D"http://elinux.org/R-Pi_Hub" title=3D"R-Pi Hub"=
 class=3D"mw-redirect"><span style=3D"color:#FFFFFF">Raspberry Pi</span></a=
></span>
</th></tr>
<tr style=3D"height:2px;">
<td>
</td></tr>
<tr>
<td class=3D"navbox-group" style=3D"background:#00CC00;;background:#AA0033;=
"> <b><span style=3D"color:#FFFFFF">Startup</span></b>
</td>
<td style=3D"text-align:left;border-left:2px solid #fdfdfd; width:100%;padd=
ing:0px;background:#FFE0FF;;;" class=3D"navbox-list navbox-odd"> <div style=
=3D"padding:0em 0.25em"><a href=3D"http://elinux.org/RPi_Buying_Guide" titl=
e=3D"RPi Buying Guide">Buying Guide</a> - <a href=3D"http://elinux.org/RPi_=
Easy_SD_Card_Setup" title=3D"RPi Easy SD Card Setup">SD Card Setup</a> - <a=
 href=3D"http://elinux.org/RPi_Hardware_Basic_Setup" title=3D"RPi Hardware=
 Basic Setup">Basic Setup</a> - <a href=3D"http://elinux.org/RPi_Advanced_S=
etup" title=3D"RPi Advanced Setup">Advanced Setup</a> - <a href=3D"http://e=
linux.org/RPi_Beginners" title=3D"RPi Beginners">Beginners Guide</a> - <a=
 href=3D"http://elinux.org/R-Pi_Troubleshooting" title=3D"R-Pi Troubleshoot=
ing">Troubleshooting</a></div>
</td>
<td style=3D"width:0%;padding:0px 0px 0px 2px;" rowspan=3D"9"> <a href=3D"h=
ttp://elinux.org/File:RpiFront.jpg" class=3D"image"><img alt=3D"RpiFront.jp=
g" src=3D"file:///C:/Users/DaLuz/AppData/Local/Temp/maftemp-3cd13269/138602=
9278824_854/1372981044953_969/index_files/167px-RpiFront.jpg" srcset=3D"/im=
ages/thumb/9/96/RpiFront.jpg/251px-RpiFront.jpg 1.5x, /images/thumb/9/96/Rp=
iFront.jpg/334px-RpiFront.jpg 2x" height=3D"119" width=3D"167"></a>
</td></tr>
<tr style=3D"height:2px">
<td>
</td></tr>
<tr>
<td class=3D"navbox-group" style=3D"background:#00CC00;;background:#AA0033;=
"> <b><span style=3D"color:#FFFFFF">Hardware</span></b>
</td>
<td style=3D"text-align:left;border-left:2px solid #fdfdfd; width:100%;padd=
ing:0px;background:#FFE0FF;;;" class=3D"navbox-list navbox-even"> <div styl=
e=3D"padding:0em 0.25em"><a href=3D"http://elinux.org/RPi_Hardware" title=
=3D"RPi Hardware">Hardware</a> - <a href=3D"http://elinux.org/RPi_HardwareH=
istory" title=3D"RPi HardwareHistory">Hardware History</a> - <strong class=
=3D"selflink">Low-level peripherals</strong> - <a href=3D"http://elinux.org=
/RPi_Expansion_Boards" title=3D"RPi Expansion Boards">Expansion Boards</a><=
/div>
</td></tr>
<tr style=3D"height:2px">
<td>
</td></tr>
<tr>
<td class=3D"navbox-group" style=3D"background:#00CC00;;background:#AA0033;=
"> <b><span style=3D"color:#FFFFFF">Peripherals</span></b>
</td>
<td style=3D"text-align:left;border-left:2px solid #fdfdfd; width:100%;padd=
ing:0px;background:#FFE0FF;;;" class=3D"navbox-list navbox-odd"> <div style=
=3D"padding:0em 0.25em"><a href=3D"http://elinux.org/RPi_Screens" title=3D"=
RPi Screens">Screens</a> - <a href=3D"http://elinux.org/RPi_Cases" title=3D=
"RPi Cases">Cases</a> - <a href=3D"http://elinux.org/RPi_VerifiedPeripheral=
s" title=3D"RPi VerifiedPeripherals">Other Peripherals</a></div>
</td></tr>
<tr style=3D"height:2px">
<td>
</td></tr>
<tr>
<td class=3D"navbox-group" style=3D"background:#00CC00;;background:#AA0033;=
"> <b><span style=3D"color:#FFFFFF">Software</span></b>
</td>
<td style=3D"text-align:left;border-left:2px solid #fdfdfd; width:100%;padd=
ing:0px;background:#FFE0FF;;;" class=3D"navbox-list navbox-even"> <div styl=
e=3D"padding:0em 0.25em"><a href=3D"http://elinux.org/RPi_Software" title=
=3D"RPi Software">Software</a> - <a href=3D"http://elinux.org/RPi_Distribut=
ions" title=3D"RPi Distributions">Distributions</a> - <a href=3D"http://eli=
nux.org/RPi_Kernel_Compilation" title=3D"RPi Kernel Compilation">Kernel</a>=
 - <a href=3D"http://elinux.org/RPi_Performance" title=3D"RPi Performance">=
Performance</a> -  <a href=3D"http://elinux.org/RPi_Programming" title=3D"R=
Pi Programming">Programming</a> - <a href=3D"http://elinux.org/RPi_VideoCor=
e_APIs" title=3D"RPi VideoCore APIs">VideoCore APIs</a> - <a href=3D"http:/=
/elinux.org/RPi_Utilities" title=3D"RPi Utilities">Utilities</a></div>
</td></tr>
<tr style=3D"height:2px">
<td>
</td></tr>
<tr>
<td class=3D"navbox-group" style=3D"background:#00CC00;;background:#AA0033;=
"> <b><span style=3D"color:#FFFFFF">Projects</span></b>
</td>
<td style=3D"text-align:left;border-left:2px solid #fdfdfd; width:100%;padd=
ing:0px;background:#FFE0FF;;;" class=3D"navbox-list navbox-odd"> <div style=
=3D"padding:0em 0.25em"><a href=3D"http://elinux.org/RPi_Tutorials" title=
=3D"RPi Tutorials">Tutorials</a> - <a href=3D"http://elinux.org/RPi_Guides"=
 title=3D"RPi Guides">Guides</a> - <a href=3D"http://elinux.org/RPi_Project=
s" title=3D"RPi Projects">Projects</a> - <a href=3D"http://elinux.org/RPi_T=
asks" title=3D"RPi Tasks">Tasks</a> - <a href=3D"http://elinux.org/RPi_Data=
sheetCategories" title=3D"RPi DatasheetCategories">DataSheets</a> - <a href=
=3D"http://elinux.org/RPi_Education" title=3D"RPi Education">Education</a>=
 - <a href=3D"http://elinux.org/RPi_Community" title=3D"RPi Community">Comm=
unities</a></div>
</td></tr></tbody></table>
</td></tr></tbody></table>

<!--=20
NewPP limit report
Preprocessor visited node count: 1522/1000000
Preprocessor generated node count: 10311/1000000
Post=E2=80=90expand include size: 17480/2097152 bytes
Template argument size: 4936/2097152 bytes
Highest expansion depth: 8/40
Expensive parser function count: 0/100
-->

<!-- Saved in parser cache with key elinux:pcache:idhash:15890-0!*!0!!en!2!=
* and timestamp 20130704215916 -->
</div>								<div class=3D"printfooter">
				Retrieved from "<a href=3D"http://elinux.org/index.php?title=3DRPi_Low-=
level_peripherals&amp;oldid=3D268400">http://elinux.org/index.php?title=3DR=
Pi_Low-level_peripherals&amp;oldid=3D268400</a>"				</div>
												<div id=3D"catlinks" class=3D"catlinks"><div id=3D"mw-normal-ca=
tlinks" class=3D"mw-normal-catlinks"><a href=3D"http://elinux.org/Special:C=
ategories" title=3D"Special:Categories">Category</a>: <ul><li><a href=3D"ht=
tp://elinux.org/Category:RaspberryPi" title=3D"Category:RaspberryPi">Raspbe=
rryPi</a></li></ul></div></div>												<div class=3D"visualClear"></div>
							</div>
		</div>
		<div id=3D"mw-navigation">
			<h2>Navigation menu</h2>
			<div id=3D"mw-head">
				<div id=3D"p-personal" role=3D"navigation" class=3D"">
	<h3>Personal tools</h3>
	<ul>
<li id=3D"pt-login"><a href=3D"http://elinux.org/index.php?title=3DSpecial:=
UserLogin&amp;returnto=3DRPi+Low-level+peripherals" title=3D"You are encour=
aged to log in; however, it is not mandatory [alt-shift-o]" accesskey=3D"o"=
>Log in / create account</a></li>	</ul>
</div>
				<div id=3D"left-navigation">
					<div id=3D"p-namespaces" role=3D"navigation" class=3D"vectorTabs">
	<h3>Namespaces</h3>
	<ul>
					<li id=3D"ca-nstab-main" class=3D"selected"><span><a href=3D"#" title=
=3D"View the content page [alt-shift-c]" accesskey=3D"c">Page</a></span></l=
i>
					<li id=3D"ca-talk"><span><a href=3D"http://elinux.org/Talk:RPi_Low-lev=
el_peripherals" title=3D"Discussion about the content page [alt-shift-t]"=
 accesskey=3D"t">Discussion</a></span></li>
			</ul>
</div>
<div id=3D"p-variants" role=3D"navigation" class=3D"vectorMenu emptyPortlet=
">
	<h3 id=3D"mw-vector-current-variant">
		</h3>
	<h3><span>Variants</span><a href=3D"#"></a></h3>
	<div class=3D"menu">
		<ul>
					</ul>
	</div>
</div>
				</div>
				<div id=3D"right-navigation">
					<div id=3D"p-views" role=3D"navigation" class=3D"vectorTabs">
	<h3>Views</h3>
	<ul>
					<li id=3D"ca-view" class=3D"selected"><span><a href=3D"#">Read</a></sp=
an></li>
					<li id=3D"ca-viewsource"><span><a href=3D"http://elinux.org/index.php?=
title=3DRPi_Low-level_peripherals&amp;action=3Dedit" title=3D"This page is=
 protected.
You can view its source [alt-shift-e]" accesskey=3D"e">View source</a></spa=
n></li>
					<li id=3D"ca-history" class=3D"collapsible"><span><a href=3D"http://el=
inux.org/index.php?title=3DRPi_Low-level_peripherals&amp;action=3Dhistory"=
 title=3D"Past revisions of this page [alt-shift-h]" accesskey=3D"h">View=
 history</a></span></li>
			</ul>
</div>
<div id=3D"p-cactions" role=3D"navigation" class=3D"vectorMenu emptyPortlet=
">
	<h3><span>Actions</span><a href=3D"#"></a></h3>
	<div class=3D"menu">
		<ul>
					</ul>
	</div>
</div>
<div id=3D"p-search" role=3D"search">
	<h3><label for=3D"searchInput">Search</label></h3>
	<form action=3D"http://elinux.org/index.php" id=3D"searchform">
				<div>
			<input autocomplete=3D"off" name=3D"search" placeholder=3D"Search" title=
=3D"Search eLinux.org [alt-shift-f]" accesskey=3D"f" id=3D"searchInput" typ=
e=3D"search">			<input name=3D"go" value=3D"Go" title=3D"Go to a page with=
 this exact name if exists" id=3D"searchGoButton" class=3D"searchButton" ty=
pe=3D"submit">			<input name=3D"fulltext" value=3D"Search" title=3D"Search=
 the pages for this text" id=3D"mw-searchButton" class=3D"searchButton" typ=
e=3D"submit">					<input name=3D"title" value=3D"Special:Search" type=3D"hi=
dden">
		</div>
	</form>
</div>
				</div>
			</div>
			<div id=3D"mw-panel">
					<div id=3D"p-logo" role=3D"banner"><a style=3D"background-image: url(f=
ile:///C:/Users/DaLuz/AppData/Local/Temp/maftemp-3cd13269/1386029278824_854=
/1372981044953_969/index_files/Logo_clear.png);" href=3D"http://elinux.org/=
Main_Page" title=3D"Visit the main page"></a></div>
				<div class=3D"portal" role=3D"navigation" id=3D"p-Navigation">
	<h3>Navigation</h3>
	<div class=3D"body">
		<ul>
			<li id=3D"n-mainpage"><a href=3D"http://elinux.org/Main_Page" title=3D"V=
isit the main page [alt-shift-z]" accesskey=3D"z">Main Page</a></li>
			<li id=3D"n-portal"><a href=3D"http://elinux.org/eLinux.org:Community_po=
rtal" title=3D"About the project, what you can do, where to find things">Co=
mmunity portal</a></li>
			<li id=3D"n-currentevents"><a href=3D"http://elinux.org/eLinux.org:Curre=
nt_events" title=3D"Find background information on current events">Current=
 events</a></li>
			<li id=3D"n-recentchanges"><a href=3D"http://elinux.org/Special:RecentCh=
anges" title=3D"A list of recent changes in the wiki [alt-shift-r]" accessk=
ey=3D"r">Recent changes</a></li>
			<li id=3D"n-help"><a href=3D"http://elinux.org/Help:Contents" title=3D"T=
he place to find out">Help</a></li>
			<li id=3D"n-Volunteering"><a href=3D"http://elinux.org/Sitesupport-url">=
Volunteering</a></li>
			<li id=3D"n-Popular-Pages"><a href=3D"http://elinux.org/Special:PopularP=
ages">Popular Pages</a></li>
			<li id=3D"n-Who.27s-Online"><a href=3D"http://elinux.org/Special:WhosOnl=
ine">Who's Online</a></li>
		</ul>
	</div>
</div>
<div class=3D"portal" role=3D"navigation" id=3D"p-tb">
	<h3>Toolbox</h3>
	<div class=3D"body">
		<ul>
			<li id=3D"t-whatlinkshere"><a href=3D"http://elinux.org/Special:WhatLink=
sHere/RPi_Low-level_peripherals" title=3D"A list of all wiki pages that lin=
k here [alt-shift-j]" accesskey=3D"j">What links here</a></li>
			<li id=3D"t-recentchangeslinked"><a href=3D"http://elinux.org/Special:Re=
centChangesLinked/RPi_Low-level_peripherals" title=3D"Recent changes in pag=
es linked from this page [alt-shift-k]" accesskey=3D"k">Related changes</a>=
</li>
			<li id=3D"t-specialpages"><a href=3D"http://elinux.org/Special:SpecialPa=
ges" title=3D"A list of all special pages [alt-shift-q]" accesskey=3D"q">Sp=
ecial pages</a></li>
			<li id=3D"t-print"><a href=3D"http://elinux.org/index.php?title=3DRPi_Lo=
w-level_peripherals&amp;printable=3Dyes" rel=3D"alternate" title=3D"Printab=
le version of this page [alt-shift-p]" accesskey=3D"p">Printable version</a=
></li>
			<li id=3D"t-permalink"><a href=3D"http://elinux.org/index.php?title=3DRP=
i_Low-level_peripherals&amp;oldid=3D268400" title=3D"Permanent link to this=
 revision of the page">Permanent link</a></li>
			<li id=3D"t-info"><a href=3D"http://elinux.org/index.php?title=3DRPi_Low=
-level_peripherals&amp;action=3Dinfo">Page information</a></li>
		</ul>
	</div>
</div>
			</div>
		</div>
		<div id=3D"footer" role=3D"contentinfo">
							<ul id=3D"footer-info">
											<li id=3D"footer-info-lastmod"> This page was last modified on=
 4 July 2013, at 21:59.</li>
											<li id=3D"footer-info-viewcount">This page has been accessed 1,0=
36,664 times.</li>
											<li id=3D"footer-info-copyright">Content is available under <a=
 class=3D"external" rel=3D"nofollow" href=3D"http://creativecommons.org/lic=
enses/by-sa/3.0/">a Creative Commons Attribution-ShareAlike 3.0 Unported Li=
cense</a>.</li>
									</ul>
							<ul id=3D"footer-places">
											<li id=3D"footer-places-privacy"><a href=3D"http://elinux.org/eL=
inux.org:Privacy_policy" title=3D"eLinux.org:Privacy policy">Privacy policy=
</a></li>
											<li id=3D"footer-places-about"><a href=3D"http://elinux.org/eLin=
ux.org:About" title=3D"eLinux.org:About">About eLinux.org</a></li>
											<li id=3D"footer-places-disclaimer"><a href=3D"http://elinux.org=
/eLinux.org:General_disclaimer" title=3D"eLinux.org:General disclaimer">Dis=
claimers</a></li>
									</ul>
										<ul id=3D"footer-icons" class=3D"noprint">
					<li id=3D"footer-copyrightico">
						<a href=3D"http://creativecommons.org/licenses/by-sa/3.0/"><img src=
=3D"file:///C:/Users/DaLuz/AppData/Local/Temp/maftemp-3cd13269/138602927882=
4_854/1372981044953_969/index_files/88x31.png" alt=3D"a Creative Commons At=
tribution-ShareAlike 3.0 Unported License" height=3D"31" width=3D"88"></a>
					</li>
					<li id=3D"footer-poweredbyico">
						<a href=3D"http://www.mediawiki.org/"><img src=3D"file:///C:/Users/Da=
Luz/AppData/Local/Temp/maftemp-3cd13269/1386029278824_854/1372981044953_969=
/index_files/poweredby_mediawiki_88x31.png" alt=3D"Powered by MediaWiki" he=
ight=3D"31" width=3D"88"></a>
					</li>
				</ul>
						<div style=3D"clear:both"></div>
		</div>
		<script><!--

/* Script removed by snapshot save */

--></script><script><!--

/* Script removed by snapshot save */

--></script>
<script><!--

/* Script removed by snapshot save */

--></script>
<script><!--

/* Script removed by snapshot save */

--></script>
<script type=3D"text/javascript"><!--

/* Script removed by snapshot save */

--></script><script src=3D"urn:snapshot-A5B74C0D:file:///C:/Users/DaLuz/App=
Data/Local/Temp/maftemp-3cd13269/1386029278824_854/1372981044953_969/index_=
files/ga.js" type=3D"text/javascript"></script>
<script type=3D"text/javascript"><!--

/* Script removed by snapshot save */

--></script><!-- Served in 0.212 secs. -->
	<script type=3D"text/javascript"><!--

/* Script removed by snapshot save */

--></script>


<script src=3D"urn:snapshot-86793C09:file:///C:/Users/DaLuz/AppData/Local/T=
emp/maftemp-3cd13269/1386029278824_854/1372981044953_969/index_files/rum.js=
" type=3D"text/javascript"></script><div class=3D"suggestions" style=3D"dis=
play: none; font-size: 13.3333px;"><div class=3D"suggestions-results"></div=
><div class=3D"suggestions-special"></div></div><script src=3D"urn:snapshot=
-FCC638C6:file:///C:/Users/DaLuz/AppData/Local/Temp/maftemp-3cd13269/138602=
9278824_854/1372981044953_969/index_files/d0863ed20c.js" type=3D"text/javas=
cript"></script></body></html>
------=_NextPart_000_0000_B1EEFC57.91762831
Content-Type: image/png
Content-Transfer-Encoding: base64
Content-Location: file:///C:/Users/DaLuz/AppData/Local/Temp/maftemp-3cd13269/1386029278824_854/1372981044953_969/index_files/GPIOs.png

[encoded data, 51752 characters]
------=_NextPart_000_0000_B1EEFC57.91762831
Content-Type: image/png
Content-Transfer-Encoding: base64
Content-Location: file:///C:/Users/DaLuz/AppData/Local/Temp/maftemp-3cd13269/1386029278824_854/1372981044953_969/index_files/magnify-clip.png

iVBORw0KGgoAAAANSUhEUgAAAA8AAAALCAAAAACFLIiAAAAAAnRSTlMA/1uRIrUAAAACYktHRAD/
h4/MvwAAAAlwSFlzAAAK8AAACvABQqw0mAAAAAd0SU1FB9UEAhIREfdlPYsAAABPSURBVAjXY/j/
//+5vXDwjAHIr26ZAgXZe8H8a/+hoIcw/9nevdVL9+79DuPvzQYZFPUezu8BMZLXgkExnD8HAu6h
qv//n+HZVjD4DuUDAKlChD3fj6aPAAAAAElFTkSuQmCC
------=_NextPart_000_0000_B1EEFC57.91762831
Content-Type: image/png
Content-Transfer-Encoding: base64
Content-Location: file:///C:/Users/DaLuz/AppData/Local/Temp/maftemp-3cd13269/1386029278824_854/1372981044953_969/index_files/RPi_P1_header.png

[encoded data, 160512 characters]
TkSuQmCC
------=_NextPart_000_0000_B1EEFC57.91762831
Content-Type: image/png
Content-Transfer-Encoding: base64
Content-Location: file:///C:/Users/DaLuz/AppData/Local/Temp/maftemp-3cd13269/1386029278824_854/1372981044953_969/index_files/RPi_P2_header.png

[encoded data, 89376 characters]
znkGHv4fmmWZhHAOagIAAAAASUVORK5CYII=
------=_NextPart_000_0000_B1EEFC57.91762831
Content-Type: image/png
Content-Transfer-Encoding: base64
Content-Location: file:///C:/Users/DaLuz/AppData/Local/Temp/maftemp-3cd13269/1386029278824_854/1372981044953_969/index_files/RPi_P3_header.png

[encoded data, 78128 characters]
SNjahBPPdxc4WYD8P9CYS91AIL2HAAAAAElFTkSuQmCC
------=_NextPart_000_0000_B1EEFC57.91762831
Content-Type: image/png
Content-Transfer-Encoding: base64
Content-Location: file:///C:/Users/DaLuz/AppData/Local/Temp/maftemp-3cd13269/1386029278824_854/1372981044953_969/index_files/RPi_P5_header.png

[encoded data, 86336 characters]
AElFTkSuQmCC
------=_NextPart_000_0000_B1EEFC57.91762831
Content-Type: image/jpeg
Content-Transfer-Encoding: base64
Content-Location: file:///C:/Users/DaLuz/AppData/Local/Temp/maftemp-3cd13269/1386029278824_854/1372981044953_969/index_files/150px-Male-slanted2small.jpg

[encoded data, 13604 characters]
FaH/2Q==
------=_NextPart_000_0000_B1EEFC57.91762831
Content-Type: image/png
Content-Transfer-Encoding: base64
Content-Location: file:///C:/Users/DaLuz/AppData/Local/Temp/maftemp-3cd13269/1386029278824_854/1372981044953_969/index_files/RPi_P6_header.png

[encoded data, 37240 characters]
4U3TaGbm5h6Z10EO+s//H2W85L+EvU4/AAAAAElFTkSuQmCC
------=_NextPart_000_0000_B1EEFC57.91762831
Content-Type: image/png
Content-Transfer-Encoding: base64
Content-Location: file:///C:/Users/DaLuz/AppData/Local/Temp/maftemp-3cd13269/1386029278824_854/1372981044953_969/index_files/254px-RPI_GPIO_testprogram_with_lazarus.png

[encoded data, 62920 characters]
------=_NextPart_000_0000_B1EEFC57.91762831
Content-Type: image/jpeg
Content-Transfer-Encoding: base64
Content-Location: file:///C:/Users/DaLuz/AppData/Local/Temp/maftemp-3cd13269/1386029278824_854/1372981044953_969/index_files/167px-RpiFront.jpg

[encoded data, 16720 characters]
RRRzsOVCHU7LoZ//ABw0UUVLqyDlR//Z
------=_NextPart_000_0000_B1EEFC57.91762831
Content-Type: image/png
Content-Transfer-Encoding: base64
Content-Location: file:///C:/Users/DaLuz/AppData/Local/Temp/maftemp-3cd13269/1386029278824_854/1372981044953_969/index_files/88x31.png

[encoded data, 6764 characters]
AABJRU5ErkJggg==
------=_NextPart_000_0000_B1EEFC57.91762831
Content-Type: image/png
Content-Transfer-Encoding: base64
Content-Location: file:///C:/Users/DaLuz/AppData/Local/Temp/maftemp-3cd13269/1386029278824_854/1372981044953_969/index_files/poweredby_mediawiki_88x31.png

[encoded data, 4700 characters]
------=_NextPart_000_0000_B1EEFC57.91762831
Content-Type: text/css
Content-Transfer-Encoding: quoted-printable
Content-Location: urn:snapshot-FF8594AC:file:///C:/Users/DaLuz/AppData/Local/Temp/maftemp-3cd13269/1386029278824_854/1372981044953_969/index_files/load.php.css

/* Effective stylesheet produced by snapshot save */
sup.reference { unicode-bidi: -moz-isolate; }
@media print {
  #toc { border: 1px solid rgb(170, 170, 170); background-color: rgb(249,=
 249, 249); padding: 5px; }
  div.thumb { border: medium none; width: auto; margin-top: 0.5em; margin-b=
ottom: 0.8em; background-color: transparent; }
  div.thumbinner { border: 1px solid rgb(204, 204, 204); padding: 3px ! imp=
ortant; background-color: White; font-size: 94%; text-align: center; overfl=
ow: hidden; }
  html .thumbimage { border: 1px solid rgb(204, 204, 204); }
  html .thumbcaption { border: medium none; text-align: left; line-height:=
 1.4em; padding: 3px ! important; font-size: 94%; }
  div.magnify { display: none; }
  div.tright { float: right; clear: right; margin: 0.5em 0px 0.8em 1.4em;=
 }
  div.tleft { float: left; clear: left; margin: 0.5em 1.4em 0.8em 0px; }
  body { background: none repeat scroll 0% 0% white; color: black; margin:=
 0px; padding: 0px; }
  .noprint, div#jump-to-nav, .mw-jump, div.top, div#column-one, #colophon,=
 .mw-editsection, .editsection, .toctoggle, .tochidden, div#f-poweredbyico,=
 div#f-copyrightico, li#viewcount, li#about, li#disclaimer, li#mobileview,=
 li#privacy, #footer-places, .mw-hidden-catlinks, tr.mw-metadata-show-hide-=
extended, span.mw-filepage-other-resolutions, #filetoc, .usermessage, #mw-n=
avigation { display: none; }
  ul { list-style-type: square; }
  #content { background: none repeat scroll 0% 0% transparent; border: medi=
um none ! important; padding: 0px ! important; margin: 0px ! important; dir=
ection: ltr; }
  #footer { background: none repeat scroll 0% 0% white; color: black; margi=
n-top: 1em; border-top: 1px solid rgb(170, 170, 170); direction: ltr; }
  h1, h2, h3, h4, h5, h6 { font-weight: bold; }
  p { margin: 1em 0px; line-height: 1.2em; }
  pre, .mw-code { border: 1pt dashed black; white-space: pre; font-size: 8p=
t; overflow: auto; padding: 1em 0px; background: none repeat scroll 0% 0%=
 white; color: black; }
  a { color: black ! important; background: none repeat scroll 0% 0% transp=
arent ! important; padding: 0px ! important; }
  a:link, a:visited { color: rgb(85, 34, 0); background: none repeat scroll=
 0% 0% transparent; text-decoration: underline; }
  #content a.external.text:after, #content a.external.autonumber:after { co=
ntent: " (" attr(href) ")"; }
  #content { background: none repeat scroll 0% 0% white; color: black; }
  a, a.external, a.new, a.stub { color: black ! important; text-decoration:=
 none ! important; }
  a, a.external, a.new, a.stub { color: inherit ! important; text-decoratio=
n: inherit ! important; }
  img { border: medium none; vertical-align: middle; }
  #siteNotice { display: none; }
  .wikitable, .thumb, img { page-break-inside: avoid; }
  h2, h3, h4, h5, h6 { page-break-after: avoid; }
  p { widows: 3; orphans: 3; }
  .catlinks ul { display: inline; margin: 0px; padding: 0px; list-style: no=
ne outside none; }
  .catlinks li { display: inline-block; line-height: 1.15em; padding: 0px=
 0.4em; border-left: 1px solid rgb(170, 170, 170); margin: 0.1em 0px; }
  .catlinks li:first-child { padding-left: 0.2em; border-left: medium none;=
 }
}
@media screen {
  .mw-content-ltr { direction: ltr; }
  .sitedir-ltr textarea, .sitedir-ltr input { direction: ltr; }
  input[type=3D"submit"], input[type=3D"button"], input[type=3D"reset"], in=
put[type=3D"file"] { direction: ltr; }
  .mw-content-ltr .thumbcaption { text-align: left; }
  .mw-content-ltr .magnify { float: right; }
  #catlinks { text-align: left; }
  .catlinks ul { display: inline; margin: 0px; padding: 0px; list-style: no=
ne outside none; }
  .catlinks li { display: inline-block; line-height: 1.25em; border-left:=
 1px solid rgb(170, 170, 170); margin: 0.125em 0px; padding: 0px 0.5em; }
  .catlinks li:first-child { padding-left: 0.25em; border-left: medium none=
; }
  .plainlinks a { background: none repeat scroll 0% 0% transparent ! import=
ant; padding: 0px ! important; }
  .visualClear { clear: both; }
  .mw-content-ltr ul, .mw-content-rtl .mw-content-ltr ul { margin: 0.3em 0p=
x 0px 1.6em; padding: 0px; }
  .mw-content-ltr ol, .mw-content-rtl .mw-content-ltr ol { margin: 0.3em 0p=
x 0px 3.2em; padding: 0px; }
  h1:lang(anp), h1:lang(as), h1:lang(bh), h1:lang(bho), h1:lang(bn), h1:lan=
g(gu), h1:lang(hi), h1:lang(kn), h1:lang(ks), h1:lang(ml), h1:lang(mr), h1:=
lang(my), h1:lang(mai), h1:lang(ne), h1:lang(new), h1:lang(or), h1:lang(pa)=
, h1:lang(pi), h1:lang(sa), h1:lang(ta), h1:lang(te) { line-height: 1.6em=
 ! important; }
  h2:lang(anp), h3:lang(anp), h4:lang(anp), h5:lang(anp), h6:lang(anp), h2:=
lang(as), h3:lang(as), h4:lang(as), h5:lang(as), h6:lang(as), h2:lang(bho),=
 h3:lang(bho), h4:lang(bho), h5:lang(bho), h6:lang(bho), h2:lang(bh), h3:la=
ng(bh), h4:lang(bh), h5:lang(bh), h6:lang(bh), h2:lang(bn), h3:lang(bn), h4=
:lang(bn), h5:lang(bn), h6:lang(bn), h2:lang(gu), h3:lang(gu), h4:lang(gu),=
 h5:lang(gu), h6:lang(gu), h2:lang(hi), h3:lang(hi), h4:lang(hi), h5:lang(h=
i), h6:lang(hi), h2:lang(kn), h3:lang(kn), h4:lang(kn), h5:lang(kn), h6:lan=
g(kn), h2:lang(ks), h3:lang(ks), h4:lang(ks), h5:lang(ks), h6:lang(ks), h2:=
lang(ml), h3:lang(ml), h4:lang(ml), h5:lang(ml), h6:lang(ml), h2:lang(mr),=
 h3:lang(mr), h4:lang(mr), h5:lang(mr), h6:lang(mr), h2:lang(my), h3:lang(m=
y), h4:lang(my), h5:lang(my), h6:lang(my), h2:lang(mai), h3:lang(mai), h4:l=
ang(mai), h5:lang(mai), h6:lang(mai), h2:lang(ne), h3:lang(ne), h4:lang(ne)=
, h5:lang(ne), h6:lang(ne), h2:lang(new), h3:lang(new), h4:lang(new), h5:la=
ng(new), h6:lang(new), h2:lang(or), h3:lang(or), h4:lang(or), h5:lang(or),=
 h6:lang(or), h2:lang(pa), h3:lang(pa), h4:lang(pa), h5:lang(pa), h6:lang(p=
a), h2:lang(pi), h3:lang(pi), h4:lang(pi), h5:lang(pi), h6:lang(pi), h2:lan=
g(sa), h3:lang(sa), h4:lang(sa), h5:lang(sa), h6:lang(sa), h2:lang(ta), h3:=
lang(ta), h4:lang(ta), h5:lang(ta), h6:lang(ta), h2:lang(te), h3:lang(te),=
 h4:lang(te), h5:lang(te), h6:lang(te) { line-height: 1.2em; }
  ol:lang(bcc) li, ol:lang(bqi) li, ol:lang(fa) li, ol:lang(glk) li, ol:lan=
g(kk-arab) li, ol:lang(mzn) li { list-style-type: -moz-persian; }
  ol:lang(ckb) li { list-style-type: -moz-arabic-indic; }
  ol:lang(hi) li, ol:lang(mr) li { list-style-type: -moz-devanagari; }
  ol:lang(as) li, ol:lang(bn) li { list-style-type: -moz-bengali; }
  ol:lang(or) li { list-style-type: -moz-oriya; }
  #toc ul, .toc ul { margin: 0.3em 0px; }
  .mw-content-ltr .toc ul, .mw-content-ltr #toc ul, .mw-content-rtl .mw-con=
tent-ltr .toc ul, .mw-content-rtl .mw-content-ltr #toc ul { text-align: lef=
t; }
  .mw-content-ltr .toc ul ul, .mw-content-ltr #toc ul ul, .mw-content-rtl=
 .mw-content-ltr .toc ul ul, .mw-content-rtl .mw-content-ltr #toc ul ul {=
 margin: 0px 0px 0px 2em; }
  #toc #toctitle, .toc #toctitle, #toc .toctitle, .toc .toctitle { directio=
n: ltr; }
  div.tright, div.floatright, table.floatright { clear: right; float: right=
; }
  div.tleft, div.floatleft, table.floatleft { float: left; clear: left; }
  .mw-jump, #jump-to-nav { overflow: hidden; height: 0px; }
  .printfooter { display: none; }
  .mw-editsection, .editsection, .toctoggle { -moz-user-select: none; }
}
@media screen {
  a { text-decoration: none; color: rgb(6, 69, 173); background: none repea=
t scroll 0% 0% transparent; }
  a:visited { color: rgb(11, 0, 128); }
  a:active { color: rgb(250, 167, 0); }
  a:hover, a:focus { text-decoration: underline; }
  .mw-body a.external { color: rgb(51, 102, 187); }
  .mw-body a.external:visited { color: rgb(102, 51, 102); }
  .mw-body a.external:active { color: rgb(187, 102, 51); }
  img { border: medium none; vertical-align: middle; }
  h1, h2, h3, h4, h5, h6 { color: black; background: none repeat scroll 0%=
 0% transparent; font-weight: normal; margin: 0px; overflow: hidden; paddin=
g-top: 0.5em; padding-bottom: 0.17em; border-bottom: 1px solid rgb(170, 170=
, 170); }
  h1 { font-size: 188%; }
  h2 { font-size: 150%; }
  h3, h4, h5, h6 { border-bottom: medium none; font-weight: bold; }
  h3 { font-size: 132%; }
  h4 { font-size: 116%; }
  h5 { font-size: 105%; }
  h1, h2 { margin-bottom: 0.6em; }
  h3, h4, h5 { margin-bottom: 0.3em; }
  p { margin: 0.4em 0px 0.5em; line-height: 1.5em; }
  p img { margin: 0px; }
  ul { line-height: 1.5em; list-style-type: square; margin: 0.3em 0px 0px=
 1.6em; padding: 0px; }
  ol { line-height: 1.5em; margin: 0.3em 0px 0px 3.2em; padding: 0px; list-=
style-image: none; }
  li { margin-bottom: 0.1em; }
  pre, code, tt, kbd, samp, .mw-code { font-family: monospace,Courier; }
  pre, .mw-code { padding: 1em; border: 1px dashed rgb(47, 111, 171); color=
: black; background-color: rgb(249, 249, 249); }
  table { font-size: 100%; }
  form { border: medium none; margin: 0px; }
  #toc, .toc, .mw-warning { border: 1px solid rgb(170, 170, 170); backgroun=
d-color: rgb(249, 249, 249); padding: 5px; font-size: 95%; }
  #toc h2, .toc h2 { display: inline; border: medium none; padding: 0px; fo=
nt-size: 100%; font-weight: bold; }
  #toc #toctitle, .toc #toctitle, #toc .toctitle, .toc .toctitle { text-ali=
gn: center; }
  #toc ul, .toc ul { list-style-type: none; list-style-image: none; margin-=
left: 0px; padding: 0px; text-align: left; }
  #toc ul ul, .toc ul ul { margin: 0px 0px 0px 2em; }
  #toc .toctoggle, .toc .toctoggle { font-size: 94%; }
  div.thumb { margin-bottom: 0.5em; width: auto; background-color: transpar=
ent; }
  div.thumbinner { border: 1px solid rgb(204, 204, 204); padding: 3px ! imp=
ortant; background-color: rgb(249, 249, 249); font-size: 94%; text-align:=
 center; overflow: hidden; }
  html .thumbimage { border: 1px solid rgb(204, 204, 204); }
  html .thumbcaption { border: medium none; line-height: 1.4em; padding: 3p=
x ! important; font-size: 94%; }
  div.magnify { border: medium none ! important; background: none repeat sc=
roll 0% 0% transparent ! important; }
  div.magnify a, div.magnify img { display: block; border: medium none ! im=
portant; background: none repeat scroll 0% 0% transparent ! important; }
  div.tright { margin: 0.5em 0px 1.3em 1.4em; }
  div.tleft { margin: 0.5em 1.4em 1.3em 0px; }
  .catlinks { border: 1px solid rgb(170, 170, 170); background-color: rgb(2=
49, 249, 249); padding: 5px; margin-top: 1em; clear: both; }
  #siteNotice { position: relative; text-align: center; margin: 0px; }
  #localNotice { margin-bottom: 0.9em; }
  .firstHeading, #firstHeading { margin-bottom: 0.1em; line-height: 1.2em;=
 padding-bottom: 0px; }
  #siteSub { display: none; }
  #jump-to-nav { margin-top: -1.4em; margin-bottom: 1.4em; }
  #contentSub, #contentSub2 { font-size: 84%; line-height: 1.2em; margin:=
 0px 0px 1.4em 1em; color: rgb(125, 125, 125); width: auto; }
  html, body { height: 100%; margin: 0px; padding: 0px; font-family: sans-s=
erif; font-size: 1em; }
  body { background-color: rgb(246, 246, 246); }
  div#content { margin-left: 10em; padding: 1em; border-width: 1px 0px 1px=
 1px; border-style: solid; border-color: rgb(167, 215, 249); -moz-border-to=
p-colors: none; -moz-border-right-colors: none; -moz-border-bottom-colors:=
 none; -moz-border-left-colors: none; border-image: none; margin-top: -1px;=
 background-color: white; color: black; direction: ltr; }
  #mw-navigation h2 { position: absolute; top: -9999px; }
  #mw-page-base { height: 5em; background-color: white; background-image:=
 url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAsCAIAAAArRUU2AAA=
AOklEQVQIHQXBAQEAAAjDIFz/zhdsCyE0y4SQya2RCSGWaYQ2Hc3ahFiINTIh1ly3NRohEwuh0V=
mmER5oBCM5OFSTKwAAAABJRU5ErkJggg=3D=3D"); background-position: left bottom;=
 background-repeat: repeat-x; }
  #mw-head-base { margin-top: -5em; margin-left: 10em; height: 5em; }
  div#mw-head { position: absolute; top: 0px; right: 0px; width: 100%; }
  div#mw-head h3, div#mw-head h5 { margin: 0px; padding: 0px; }
  div.emptyPortlet { display: none; }
  #p-personal { position: absolute; top: 0.33em; right: 0.75em; z-index: 10=
0; }
  #p-personal h3, #p-personal h5 { display: none; }
  #p-personal ul { list-style-type: none; list-style-image: none; margin:=
 0px; padding-left: 10em; }
  #p-personal li { line-height: 1.125em; float: left; }
  #p-personal li { margin-left: 0.75em; margin-top: 0.5em; font-size: 0.75e=
m; white-space: nowrap; }
  #left-navigation { position: absolute; left: 10em; top: 2.5em; }
  #right-navigation { float: right; margin-top: 2.5em; }
  div.vectorTabs h3, div.vectorTabs h5, div.vectorMenu h3 span, div.vectorM=
enu h5 span { display: none; }
  div.vectorTabs { float: left; height: 2.5em; }
  div.vectorTabs { background-image: url("data:image/png;base64,iVBORw0KGgo=
AAAANSUhEUgAAAAEAAAAuCAIAAABmjeQ9AAAARElEQVR4XmVO0QqAQAwy//+P87QjGUf0IDo3ZZ=
READ84eXkZ5YDBRQcFwpXv3kW1N4/GmZXe326/xnf9ya8zzy/NtusBX91B1f55qzcAAAAASUVOR=
K5CYII=3D"); background-position: left bottom; background-repeat: no-repeat=
; padding-left: 1px; }
  div.vectorTabs ul { float: left; }
  div.vectorTabs ul { height: 100%; list-style-type: none; list-style-image=
: none; margin: 0px; padding: 0px; }
  div.vectorTabs ul li { float: left; }
  div.vectorTabs ul li { line-height: 1.125em; display: inline-block; heigh=
t: 100%; margin: 0px; padding: 0px; background-color: rgb(243, 243, 243);=
 background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAA=
ABkCAIAAADITs03AAAAPElEQVR4XuWK2xEAIAzCsPvv5DSu0ahX3yv4wQVyGGCSvg2dnJvduT8s=
z/IwKOIfjCi2z/76FhHeJcslVZQFLUC06LZ/AAAAAElFTkSuQmCC"); background-position=
: left bottom; background-repeat: repeat-x; white-space: nowrap; }
  div.vectorTabs ul > li { display: block; }
  div.vectorTabs li.selected { background-image: url("data:image/png;base64=
,iVBORw0KGgoAAAANSUhEUgAAAAEAAABkAQAAAABvV2fNAAAADUlEQVQIHWNoYBgWEACJ5TIB0K=
9KcAAAAABJRU5ErkJggg=3D=3D"); }
  div.vectorTabs li a { display: inline-block; height: 1.9em; padding-left:=
 0.5em; padding-right: 0.5em; color: rgb(6, 69, 173); cursor: pointer; font=
-size: 0.8em; }
  div.vectorTabs span a { display: inline-block; padding-top: 1.25em; }
  div.vectorTabs span > a { float: left; display: block; }
  div.vectorTabs span { display: inline-block; background-image: url("data:=
image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAuCAIAAABmjeQ9AAAARElEQVR4Xm=
VO0QqAQAwy//+P87QjGUf0IDo3ZZREAD84eXkZ5YDBRQcFwpXv3kW1N4/GmZXe326/xnf9ya8zz=
y/NtusBX91B1f55qzcAAAAASUVORK5CYII=3D"); background-position: right bottom;=
 background-repeat: no-repeat; }
  div.vectorTabs li.selected a, div.vectorTabs li.selected a:visited { colo=
r: rgb(51, 51, 51); text-decoration: none; }
  div.vectorMenu { direction: ltr; float: left; background-image: url("data=
:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAAQBAMAAADgw5IVAAAAD1BMVEXz+=
fuamprd3d15eXmxsbG+1Cf6AAAAAXRSTlMAQObYZgAAACZJREFUCFtjYKAaYBI2NjYWgnIUjY0N=
FRASMGGgBFwYKOEEZ5ILAABbAqkPJqHJAAAAAElFTkSuQmCC"); background-position: 10=
0% 60%; background-repeat: no-repeat; cursor: pointer; }
  div#mw-head div.vectorMenu h3, div#mw-head div.vectorMenu h5 { float: lef=
t; background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAE=
AAAAuCAIAAABmjeQ9AAAARElEQVR4XmVO0QqAQAwy//+P87QjGUf0IDo3ZZREAD84eXkZ5YDBRQ=
cFwpXv3kW1N4/GmZXe326/xnf9ya8zzy/NtusBX91B1f55qzcAAAAASUVORK5CYII=3D"); bac=
kground-repeat: no-repeat; }
  div#mw-head div.vectorMenu h3, div#mw-head div.vectorMenu h5 { background=
-position: left bottom; margin-left: -1px; }
  div#mw-head div.vectorMenu > h3, div#mw-head div.vectorMenu > h5 { backgr=
ound-image: none; }
  div#mw-head div.vectorMenu h4, div#p-variants.vectorMenu #mw-vector-curre=
nt-variant { display: inline-block; float: left; font-size: 0.8em; padding-=
left: 0.5em; padding-top: 1.375em; font-weight: normal; border: medium none=
; }
  div.vectorMenu h3 a, div.vectorMenu h5 a { display: inline-block; width:=
 24px; height: 1.9em; text-decoration: none; background-image: url("data:im=
age/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAuCAIAAABmjeQ9AAAARElEQVR4XmVO=
0QqAQAwy//+P87QjGUf0IDo3ZZREAD84eXkZ5YDBRQcFwpXv3kW1N4/GmZXe326/xnf9ya8zzy/=
NtusBX91B1f55qzcAAAAASUVORK5CYII=3D"); background-repeat: no-repeat; }
  div.vectorMenu h3 a, div.vectorMenu h5 a { background-position: right bot=
tom; }
  div.vectorMenu h3 > a, div.vectorMenu h5 > a { display: block; }
  div.vectorMenu div.menu { position: relative; display: none; clear: both;=
 text-align: left; }
  div.vectorMenu:hover div.menu, div.vectorMenu div.menuForceShow { display=
: block; }
  div.vectorMenu ul { position: absolute; background-color: white; border-w=
idth: 0px 1px 1px; border-style: solid; border-color: silver; -moz-border-t=
op-colors: none; -moz-border-right-colors: none; -moz-border-bottom-colors:=
 none; -moz-border-left-colors: none; border-image: none; list-style-type:=
 none; list-style-image: none; padding: 0px; margin: 0px 0px 0px -1px; text=
-align: left; }
  div.vectorMenu ul, x:-moz-any-link { min-width: 5em; }
  div.vectorMenu ul, x:-moz-any-link, x:default { min-width: 0px; }
  #p-search h3, #p-search h5 { display: none; }
  #p-search { float: left; }
  #p-search { margin-right: 0.5em; margin-left: 0.5em; }
  #p-search form, #p-search input { margin: 0.4em 0px 0px; }
  div#mw-panel { position: absolute; top: 160px; padding-top: 1em; width:=
 10em; left: 0px; }
  div#mw-panel div.portal { padding-bottom: 1.5em; direction: ltr; }
  div#mw-panel div.portal h3, div#mw-panel div.portal h5 { font-weight: nor=
mal; color: rgb(68, 68, 68); padding: 0px 0.25em 0.25em 1.75em; cursor: def=
ault; border: medium none; font-size: 0.75em; }
  div#mw-panel div.portal div.body { margin: 0px 0px 0px 1.25em; padding-to=
p: 0.5em; background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhE=
UgAAAIwAAAABCAAAAAAphRnkAAAAJ0lEQVQIW7XFsQEAIAyAMPD/b7uLWz8wS5youFW1UREfiIp=
H1Q2VBz7fGPS1dOGeAAAAAElFTkSuQmCC"); background-repeat: no-repeat; backgrou=
nd-position: left top; }
  div#mw-panel div.portal div.body ul { list-style-type: none; list-style-i=
mage: none; padding: 0px; margin: 0px; }
  div#mw-panel div.portal div.body ul li { line-height: 1.125em; padding:=
 0px 0px 0.5em; margin: 0px; font-size: 0.75em; word-wrap: break-word; }
  div#mw-panel div.portal div.body ul li a { color: rgb(6, 69, 173); }
  div#mw-panel div.portal div.body ul li a:visited { color: rgb(11, 0, 128)=
; }
  div#footer { margin-left: 10em; margin-top: 0px; padding: 0.75em; directi=
on: ltr; }
  div#footer ul { list-style-type: none; list-style-image: none; margin: 0p=
x; padding: 0px; }
  div#footer ul li { margin: 0px; padding: 0.5em 0px; color: rgb(51, 51, 51=
); font-size: 0.7em; }
  div#footer #footer-icons { float: right; }
  body.ltr div#footer #footer-places { float: left; }
  div#footer #footer-info li { line-height: 1.4em; }
  div#footer #footer-icons li { float: left; margin-left: 0.5em; line-heigh=
t: 2em; text-align: right; }
  div#footer #footer-places li { float: left; margin-right: 1em; line-heigh=
t: 2em; }
  #p-logo { position: absolute; top: -160px; left: 0px; width: 10em; height=
: 160px; }
  #p-logo a { display: block; width: 10em; height: 160px; background-repeat=
: no-repeat; background-position: center center; text-decoration: none; }
  div#content { line-height: 1.5em; }
  #bodyContent { font-size: 0.8em; }
  ul { list-style-type: disc; list-style-image: url("data:image/png;base64,=
iVBORw0KGgoAAAANSUhEUgAAAAUAAAANAQMAAABb8jbLAAAABlBMVEX///8AUow5QSOjAAAAAXR=
STlMAQObYZgAAABNJREFUCB1jYEABBQw/wLCAgQEAGpIDyT0IVcsAAAAASUVORK5CYII=3D"); }
  pre, .mw-code { line-height: 1.3em; }
  #siteNotice { font-size: 0.8em; }
  #firstHeading { padding-top: 0px; margin-top: 0px; font-size: 1.6em; }
  div#content a.external, div#content a.external[href^=3D"gopher://"] { bac=
kground: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAAC=
NMs+9AAAAVklEQVR4Xn3PgQkAMQhDUXfqTu7kTtkpd5RA8AInfArtQ2iRXFWT2QedAfttj2FsPI=
OE1eCOlEuoWWjgzYaB/IkeGOrxXhqB+uA9Bfcm0lAZuh+YIeAD+cAqSz4kCMUAAAAASUVORK5CY=
II=3D") no-repeat scroll right center transparent; padding-right: 13px; }
  div#content a.external[href^=3D"https://"], .link-https { background: url=
("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAdUl=
EQVQYV2P4//8/Awxv3LThf0dXKxyD+DA5DEUg+tWrV2AaWTFcIboJyJrhCtGtRMcgebhpL2/4/v=
//Lvn//x+7IRjIfn8v+P/t055gxZgKPzaC8Y/nMYQVLpnM8f/zo3AqKfzyOOL/h/sh/59c9sBUS=
IyvAeRdJWjk4E//AAAAAElFTkSuQmCC") no-repeat scroll right center transparent=
; padding-right: 13px; }
  div#content a.external[href$=3D".pdf"], div#content a.external[href$=3D".=
PDF"], div#content a.external[href*=3D".pdf#"], div#content a.external[href=
*=3D".PDF#"], div#content a.external[href*=3D".pdf?"], div#content a.extern=
al[href*=3D".PDF?"], .link-document { background: url("data:image/png;base6=
4,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAQAAAAnOwc2AAAATklEQVR4XmXKQQqAMAwF0X/7X=
sSz9CSKiyIIFRFcjMmihmiGbB5fqDCaQJ4j46pzYLUWe+cXZ6OVBhTS0srY2Njp/+XxXXZOLu6E=
UWAOPX1vnwTBe6qQAAAAAElFTkSuQmCC") no-repeat scroll right center transparen=
t; padding-right: 13px; }
  #pt-userpage, #pt-anonuserpage, #pt-login { background-color: transparent=
; background-repeat: no-repeat; background-attachment: scroll; background-p=
osition: left top; background-clip: border-box; background-origin: padding-=
box; background-size: auto auto; background-image: linear-gradient(transpar=
ent, transparent), url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wI=
[encoded data, 21584 characters]
GluZTtvdmVyZmxvdzp2aXNpYmxlIiAvPgogICAgPC9nPgogIDwvZz4KPC9zdmc+Cg=3D=3D");=
 padding-left: 15px ! important; }
  #bodyContent { position: relative; width: 100%; }
  div#bodyContent { line-height: 1.5em; }
  div.vectorTabs ul { background-image: url("data:image/png;base64,iVBORw0K=
GgoAAAANSUhEUgAAAAEAAAAuCAIAAABmjeQ9AAAARElEQVR4XmVO0QqAQAwy//+P87QjGUf0IDo=
3ZZREAD84eXkZ5YDBRQcFwpXv3kW1N4/GmZXe326/xnf9ya8zzy/NtusBX91B1f55qzcAAAAASU=
VORK5CYII=3D"); background-position: right bottom; background-repeat: no-re=
peat; }
  body.vector-animateLayout div#content, body.vector-animateLayout div#foot=
er { transition: margin-left 250ms ease 0s, padding 250ms ease 0s; }
  body.vector-animateLayout #p-logo, body.vector-animateLayout #left-naviga=
tion { transition: left 250ms ease 0s; }
  body.vector-animateLayout #mw-panel { transition: padding-left 250ms ease=
 0s; }
  body.vector-animateLayout #p-search { transition: margin-right 250ms ease=
 0s; }
  body.vector-animateLayout #p-personal { transition: right 250ms ease 0s; }
  body.vector-animateLayout #mw-head-base { transition: margin-left 250ms=
 ease 0s; }
}
@media screen and (min-width: 982px) {
  div#content { margin-left: 11em; padding: 1.25em 1.5em 1.5em; }
  #p-logo { left: 0.5em; }
  div#footer { margin-left: 11em; padding: 1.25em; }
  #mw-panel { padding-left: 0.5em; }
  #p-search { margin-right: 1em; }
  #left-navigation { left: 11em; }
  #p-personal { right: 1em; }
  #mw-head-base { margin-left: 11em; }
}

------=_NextPart_000_0000_B1EEFC57.91762831
Content-Type: image/png
Content-Transfer-Encoding: base64
Content-Location: file:///C:/Users/DaLuz/AppData/Local/Temp/maftemp-3cd13269/1386029278824_854/1372981044953_969/index_files/Logo_clear.png

[encoded data, 26752 characters]
c8ba3Wlp6XVB7gKbWc/3yvOD/786PSj8O6/AYQAAAABJRU5ErkJggg==
------=_NextPart_000_0000_B1EEFC57.91762831
Content-Type: application/x-javascript
Content-Transfer-Encoding: quoted-printable
Content-Location: urn:snapshot-84EC9971:file:///C:/Users/DaLuz/AppData/Local/Temp/maftemp-3cd13269/1386029278824_854/1372981044953_969/index_files/load.php.js

/* Script removed by snapshot save */

------=_NextPart_000_0000_B1EEFC57.91762831
Content-Type: application/x-javascript
Content-Transfer-Encoding: quoted-printable
Content-Location: urn:snapshot-E492C916:file:///C:/Users/DaLuz/AppData/Local/Temp/maftemp-3cd13269/1386029278824_854/1372981044953_969/index_files/load.php-1.js

/* Script removed by snapshot save */

------=_NextPart_000_0000_B1EEFC57.91762831
Content-Type: application/x-javascript
Content-Transfer-Encoding: quoted-printable
Content-Location: urn:snapshot-DEC93D6D:file:///C:/Users/DaLuz/AppData/Local/Temp/maftemp-3cd13269/1386029278824_854/1372981044953_969/index_files/load.php-2.js

/* Script removed by snapshot save */

------=_NextPart_000_0000_B1EEFC57.91762831
Content-Type: application/x-javascript
Content-Transfer-Encoding: quoted-printable
Content-Location: urn:snapshot-82327080:file:///C:/Users/DaLuz/AppData/Local/Temp/maftemp-3cd13269/1386029278824_854/1372981044953_969/index_files/load.php-3.js

/* Script removed by snapshot save */

------=_NextPart_000_0000_B1EEFC57.91762831
Content-Type: text/javascript
Content-Transfer-Encoding: quoted-printable
Content-Location: urn:snapshot-A5B74C0D:file:///C:/Users/DaLuz/AppData/Local/Temp/maftemp-3cd13269/1386029278824_854/1372981044953_969/index_files/ga.js

/* Script removed by snapshot save */

------=_NextPart_000_0000_B1EEFC57.91762831
Content-Type: text/javascript
Content-Transfer-Encoding: quoted-printable
Content-Location: urn:snapshot-86793C09:file:///C:/Users/DaLuz/AppData/Local/Temp/maftemp-3cd13269/1386029278824_854/1372981044953_969/index_files/rum.js

/* Script removed by snapshot save */

------=_NextPart_000_0000_B1EEFC57.91762831
Content-Type: text/javascript
Content-Transfer-Encoding: quoted-printable
Content-Location: urn:snapshot-FCC638C6:file:///C:/Users/DaLuz/AppData/Local/Temp/maftemp-3cd13269/1386029278824_854/1372981044953_969/index_files/d0863ed20c.js

/* Script removed by snapshot save */

------=_NextPart_000_0000_B1EEFC57.91762831--
