This commit is contained in:
Phil Howard 2015-02-24 17:28:00 +00:00
parent 59f8b3f316
commit 572cb41b54
21 changed files with 620 additions and 9 deletions

5
Makefile Normal file
View File

@ -0,0 +1,5 @@
all:
./generate-html.py > output/test.html
serve:
cd output && python -m SimpleHTTPServer

View File

@ -0,0 +1,3 @@
#Explorer HAT Pro
5V inputs and outputs, touch pads, LEDs, analog inputs and an H-Bridge motor driver make up the Explorer HAT Pro- a jack of all trades prototyping side-kick for your Raspberry Pi.

View File

@ -0,0 +1,17 @@
#Pibrella
The all-in-one light, sound, input and output add-on board from Pimoroni vs Cyntech uses lots of IO on the Pi but leaves both Serial and I2C free leaving plenty of room for expansion if you get creative.
Pibrella is easy to use, first you should install the module using LXTerminal/Command Line:
```bash
sudo apt-get install python-pip
sudo pip install pibrella
```
Then import it into your Python script and start tinkering:
```bash
import pibrella
pibrella.light.red.on()
```

View File

@ -0,0 +1,5 @@
#3v3 Power
###The 3v3, 3.3 volt, supply pin on the Pi has a max available current of about 50 mA. Enough to power a couple of LEDs or a microprocessor, but not much more.
You should generally use the 5v supply, coupled with a 3v3 regulator for 3.3v projects.

View File

@ -0,0 +1,7 @@
#5v Power
###The 5v power pins are connected directly to the Pi's power input and will capably provide the full current of your mains adaptor, less that used by the Pi itself.
With a decent power supply, such as the official Pi adaptor, you can expect to pull about 1.5A.
Don't be disuaded by what sounds like a measly low voltage. You can do a lot with 5v. Power Arduinos, and even run a small Electroluminescent wire inverter right off the 5v pin!

View File

@ -0,0 +1 @@

0
description/type/3v3.md Normal file
View File

0
description/type/5v.md Normal file
View File

0
description/type/gpio.md Normal file
View File

0
description/type/i2c.md Normal file
View File

0
description/type/pwm.md Normal file
View File

0
description/type/spi.md Normal file
View File

0
description/type/uart.md Normal file
View File

View File

@ -1,9 +1,12 @@
#!/usr/bin/env python
import json
import markdown, gfm
import unicodedata
import re
overlays = ['pibrella','break']
overlays = ['pibrella','explorerhat']
template = open('template/layout.html').read()
def slugify(value):
"""
@ -17,10 +20,24 @@ def slugify(value):
def load_overlay(overlay):
try:
return json.load(open('overlay/{}.json'.format(overlay)))
loaded = json.load(open('overlay/{}.json'.format(overlay)))
except IOError:
return None
loaded['long_description'] = load_text(overlay)
return loaded
def load_text(overlay):
try:
return markdown.markdown(open('description/overlay/{}.md'.format(overlay)).read(), extensions=[gfm.HiddenHiliteExtension([]),'fenced_code'])
except IOError:
return None
def render_overlay_page(overlay):
if overlay == None:
return ''
return '<article id="{}">{}</article>'.format(slugify(overlay['name']),overlay['long_description'])
db = json.load(open('pi-pinout.json'))
pins = db['pins']
@ -28,6 +45,7 @@ pins = db['pins']
html_odd = ''
html_even = ''
overlay_text = map(load_text,overlays)
overlays = map(load_overlay,overlays)
def render_alternate(handle, name):
@ -75,6 +93,13 @@ for odd in range(1,len(pins),2):
html_odd += render_pin(odd)
html_even += render_pin(odd+1)
html = '<nav class="gpio" id="gpio">\n<ul class="bottom">\n{}</ul>\n<ul class="top">\n{}</ul>\n</nav>'.format(html_odd, html_even)
pages = map(render_overlay_page,overlays)
html = '''<ul class="bottom">
{}</ul>
<ul class="top">
{}</ul>'''.format(html_odd, html_even)
html = template.replace('{{nav}}',html).replace('{{content}}','\n'.join(pages))
print(html)

BIN
output/pinout-logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 280 B

249
output/pinout.css Normal file
View File

@ -0,0 +1,249 @@
* {margin:0;padding:0;text-decoration:none;}
body {font-family:'Sanchez', sans-serif;}
pre {font-family:'Ubuntu Mono', sans-serif;font-size:13px;}
ul.bottom a {color:#E9E5D2;}
ul.top a {color:#063541;}
table {margin:20px 0;border-collapse:collapse;}
table td, table th {border:1px solid #073642;padding:5px;}
table th {background:#073642;color:#EBE6D3;}
table * {text-align:left;font-size:13px;}
nav#gpio {
position:relative;
width:244px;
background:#5F8645;
height:680px;
float:left;
margin-right:136px;
}
.phys {font-size:90%;opacity:0.8;color:#D33682;}
.bottom .phys {color:#002B36;}
.bottom .active .phys, .bottom :hover .phys,
.bottom .legend .phys {color:#FFF;}
#content {
float:left;
background:#EBE6D3;
width:500px;
min-height:600px;
padding-bottom:60px;
}
#content article {
background:#EBE6D3;
padding:20px;
width:560px;
min-height:680px;
}
nav#gpio ul.top {
position:absolute;
left:200px;
top:17px;
list-style:none;
}
nav#gpio ul.bottom {
position:absolute;
left:16px;
top:17px;
list-style:none;
}
nav#gpio ul.top li {text-indent:52px;}
nav#gpio li a {
display:block;
width:180px;
position:relative;
font-size:12px;
line-height:29px;
height:27px;
margin-bottom:2px;
}
nav#gpio li a:hover,
nav#gpio li.active a {
background:#EBE6D3;
border-top-left-radius:13px;
border-bottom-left-radius:13px;
}
nav#gpio ul.bottom li a:hover,
nav#gpio ul.bottom li.active a {
background:#063541;
border-top-right-radius:13px;
border-bottom-right-radius:13px;
border-top-left-radius:0px;
border-bottom-left-radius:0px;
}
nav#gpio ul.bottom a {
text-indent:10px;
}
nav#gpio span.pin {
display:block;
border:1px solid #FFFFFF;
border-radius:50%;
width:19px;
height:19px;
background:#002B36;
position:absolute;
right:3px;
top:3px;
}
nav#gpio li.legend a {
background:#EBE6D3;
}
nav#gpio li.legend a {}
nav#gpio ul.bottom li.legend a {
background:#063541;
}
nav#gpio ul.top li.legend {
width:177px;
position:relative;
padding-left:5px;
left:-5px;
}
nav#gpio ul.top span.pin {
left:3px;
top:3px;
}
nav#gpio span.pin:after {
content:'';
display:block;
border-radius:100%;
background:#FDF6E3;
position:absolute;
left:6px;
top:6px;
width:7px;
height:7px;
font-size:7px;
box-shadow: 0 0 5px rgba(10,41,51,0.5);
}
nav#gpio li.pin2 span.pin,
nav#gpio li.pin4 span.pin {
background:#DC322F;
}
nav#gpio li.pin3 span.pin,
nav#gpio li.pin5 span.pin,
nav#gpio li.pin27 span.pin,
nav#gpio li.pin28 span.pin {
background:#268BD2;
}
nav#gpio li.pin8 span.pin,
nav#gpio li.pin10 span.pin,
nav#gpio li.pin17 span.pin {
background:#B58900;
}
nav#gpio li.pin7 span.pin,
nav#gpio li.pin11 span.pin,
nav#gpio li.pin13 span.pin,
nav#gpio li.pin15 span.pin,
nav#gpio li.pin12 span.pin,
nav#gpio li.pin16 span.pin,
nav#gpio li.pin18 span.pin,
nav#gpio li.pin22 span.pin,
nav#gpio li.pin29 span.pin,
nav#gpio li.pin31 span.pin,
nav#gpio li.pin33 span.pin,
nav#gpio li.pin32 span.pin,
nav#gpio li.pin35 span.pin,
nav#gpio li.pin36 span.pin,
nav#gpio li.pin37 span.pin,
nav#gpio li.pin38 span.pin,
nav#gpio li.pin40 span.pin {
background:#859900;
}
nav#gpio li.pin19 span.pin,
nav#gpio li.pin21 span.pin,
nav#gpio li.pin23 span.pin,
nav#gpio li.pin24 span.pin,
nav#gpio li.pin26 span.pin {
background:#D33682;
}
nav#gpio li.pin1 span.pin {
border-radius:0;
background:#B58900;
}
div#pinbase {
width:72px;
height:389px;
background:#073642;
position:absolute;
left:162px;
top:10px;
}
div#pinbasebplus {
width:72px;
height:215px;
background:#184753;
position:absolute;
left:162px;
top:401px;
}
h1 {
width:250px;
font-size:34px;
color:#888888;
margin-bottom:5px;
cursor:pointer;
}
h1 img {float:left;position:relative;top:0px;margin:0 13px;
-moz-transform:rotate(-45deg);
-webkit-transform:rotate(-45deg);
transform:rotate(-45deg);
width:30px;
}
h1 span {
color:#D6264E;
}
h1 span.out {
color:#5FB12D;
}
.pin27, .pin28 {margin-top:16px;}
p.intro {
color:#268BD2;
}
p,pre {
margin-top:10px;
font-size: 15px;
line-height: 150%;
}
h3 {
color:#D33682;
font-size:16px;
font-weight:bold;
}
#container {
width:980px;
margin:0 auto;
margin-top:10px;
}
article a {color:#859900;text-decoration:underline;}
article ul {margin-left:20px;margin-top:10px;}
ul.legend {
float:right;
list-style:none;
margin-top:-26px;
}
ul.legend.expansion {
margin-top:-52px;
}
ul.legend li {
float:left;
line-height:20px;
font-size:12px;
padding:3px 7px;
height:20px;
}
ul.legend li a {
color:#FDF6E3;
}
li.legend_5 {background:#DC322F;}
li.legend_3 {background:#B58900;}
li.legend_ground, li.legend_pwm {background:#002B36;}
li.legend_uart {background:#B58900;}
li.legend_gpio, li.legend_dot3k {background:#859900;}
li.legend_spi {background:#D33682;}
li.legend_i2c, li.legend_atmega, li.legend_pibrella {background:#268BD2;}
li.legend_ladder {background:#5F8645;}
li.legend_wiringpi {background:#EBE6D3;}
ul.legend li.legend_wiringpi a {color:#063541;}
li.legend_ledborg {background:#000000;}
ul.legend li.legend_ledborg a {color:#FFFFFF;}
li.legend_clockatoo {background:#D33682;}
span.alternate {display:none;}
ol.linenums {margin-left:30px;}

83
output/pinout.js Normal file
View File

@ -0,0 +1,83 @@
jQuery(document).ready(function(){
var History = window.History;
var homepage = jQuery('article.homepage').index();
var pincount = 40;
History.Adapter.bind(window,'statechange',function(){
var State = History.getState();
var url = State.url.replace('http://pi.gadgetoid.com','');
if( url == '/pinout' )
{
jQuery('h1').click();
}
else
{
jQuery('a[href="' + url + '"]').click();
}
})
window.prettyPrint&&prettyPrint();
jQuery('#pages').cycle({
timeout:0,
slideExpr:'article',
startingSlide:homepage,
speed:200,
containerResize:0
});
jQuery('.legend li a').on('click',function(e){
e.preventDefault();
jQuery('nav#gpio li').removeClass('legend active');
var title = jQuery(this).attr('title');
var url = jQuery(this).attr('href');
jQuery('span.default').show();
jQuery('span.alternate').hide();
var legend = jQuery(this).parent().attr('class');
var page = jQuery('article.' + legend).index();
var pins = [];
if( jQuery(this).parent().data('pins') ){
pins = jQuery(this).parent().data('pins').split(',');
}
jQuery('span.' + legend).show().parent().parent().addClass('legend').find('span.default').hide();
var x = pins.length;
while(x--){
jQuery('.pin' + pins[x]).addClass('legend');
}
jQuery('#pages').cycle(page);
History.pushState({legend:jQuery(this).attr('class'),url:jQuery(this).attr('href')}, 'Raspberry Pi Pinout - ' + title, url)
});
function showPage(object,offset){
jQuery('span.default').show();
jQuery('span.alternate').hide();
jQuery('nav#gpio li').removeClass('legend active');
jQuery('#pages').cycle(offset+object.parent().index());
object.parent().addClass('active');
title = 'Pin ' + object.find('span.default').text().replace(' ',': ');
History.pushState({pin:offset+object.parent().index(),url:object.attr('href')}, title, object.attr('href'));
}
jQuery('nav#gpio ul.bottom a').on('click',function(e){
e.preventDefault();showPage(jQuery(this),0);});
jQuery('nav#gpio ul.top a').on('click',function(e){
e.preventDefault();showPage(jQuery(this),pincount/2);});
jQuery('h1').on('click',function(){
jQuery('span.default').show();
jQuery('span.alternate').hide();
jQuery('nav#gpio li').removeClass('legend active');
jQuery('#pages').cycle(homepage);
History.pushState({pin:homepage,url:'http://pi.gadgetoid.com/pinout'}, 'Raspberry Pi Pinout', '/pinout');
});
url = window.location.href.replace('http://pi.gadgetoid.com/','/');
jQuery('a[href="' + url + '"]').click();
});

162
output/test.html Normal file
View File

@ -0,0 +1,162 @@
<!doctype html>
<html>
<head><script type="text/javascript">var NREUMQ=NREUMQ||[];NREUMQ.push(["mark","firstbyte",new Date().getTime()]);</script>
<title>Raspberry Pi Pinout - Rev 2 Board</title>
<link href='http://fonts.googleapis.com/css?family=Sanchez|Ubuntu+Mono' rel='stylesheet' type='text/css' />
<link href='/prettify/prettify.css' rel='stylesheet' />
<link href="//netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.css" rel="stylesheet">
<link href="/pinout.css?v=0010" rel="stylesheet">
<script type='text/javascript'>
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-32070014-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</head>
<body>
<div id="container">
<div class="latest" style="padding:10px;font-size:14px;margin-bottom:10px;text-align:right;">
Latest at Gadgetoid: <a href="http://pi.gadgetoid.com/article/parallax-propeller-p8x32a-first-impressions">Propeller ASC+, the Arduino-compatible multi-core micro: read my first impressions</a>
</div>
<h1><img src="/pinout-logo.png" style="top:8px;" /><span>Pi</span>n<span class="out">out</span></h1>
<nav id="gpio">
<div id="pinbase"></div>
<div id="pinbaseplus"></div>
<ul class="bottom">
<li class="pin1 3v3"><a href="/pindb/pin1_3v3_power"><span class="default"><span class="phys">1</span> 3v3 Power</span><span class="pin"></span>
</a></li>
<li class="pin3 gpio i2c"><a href="/pindb/pin3_gpio2"><span class="default"><span class="phys">3</span> GPIO 2 <small>(SDA)</small></span><span class="pin"></span>
<span class="alternate legend_wiringpi">Wiring Pi pin 8</span></a></li>
<li class="pin5 gpio i2c"><a href="/pindb/pin5_gpio3"><span class="default"><span class="phys">5</span> GPIO 3 <small>(SCL)</small></span><span class="pin"></span>
<span class="alternate legend_wiringpi">Wiring Pi pin 9</span></a></li>
<li class="pin7 gpio"><a href="/pindb/pin7_gpio4"><span class="default"><span class="phys">7</span> GPIO 4 <small>(GPCLK0)</small></span><span class="pin"></span>
<span class="alternate legend_pibrella">Green LED</span>
<span class="alternate legend_wiringpi">Wiring Pi pin 7</span></a></li>
<li class="pin9 gnd"><a href="/pindb/pin9_ground"><span class="default"><span class="phys">9</span> Ground</span><span class="pin"></span>
</a></li>
<li class="pin11 gpio"><a href="/pindb/pin11_gpio17"><span class="default"><span class="phys">11</span> GPIO 17 </span><span class="pin"></span>
<span class="alternate legend_pibrella">Yellow LED</span>
<span class="alternate legend_wiringpi">Wiring Pi pin 0</span></a></li>
<li class="pin13 gpio"><a href="/pindb/pin13_gpio27"><span class="default"><span class="phys">13</span> GPIO 27 <small>(PCM_D)</small></span><span class="pin"></span>
<span class="alternate legend_pibrella">Red LED</span>
<span class="alternate legend_wiringpi">Wiring Pi pin 2</span></a></li>
<li class="pin15 gpio"><a href="/pindb/pin15_gpio22"><span class="default"><span class="phys">15</span> GPIO 22 </span><span class="pin"></span>
<span class="alternate legend_pibrella">Output A</span>
<span class="alternate legend_wiringpi">Wiring Pi pin 3</span></a></li>
<li class="pin17 3v3"><a href="/pindb/pin17_3v3_power"><span class="default"><span class="phys">17</span> 3v3 Power</span><span class="pin"></span>
</a></li>
<li class="pin19 gpio spi"><a href="/pindb/pin19_gpio10"><span class="default"><span class="phys">19</span> GPIO 10 <small>(MOSI)</small></span><span class="pin"></span>
<span class="alternate legend_pibrella">Input D</span>
<span class="alternate legend_wiringpi">Wiring Pi pin 12</span></a></li>
<li class="pin21 gpio spi"><a href="/pindb/pin21_gpio9"><span class="default"><span class="phys">21</span> GPIO 9 <small>(MISO)</small></span><span class="pin"></span>
<span class="alternate legend_pibrella">Input A</span>
<span class="alternate legend_wiringpi">Wiring Pi pin 13</span></a></li>
<li class="pin23 gpio spi"><a href="/pindb/pin23_gpio11"><span class="default"><span class="phys">23</span> GPIO 11 <small>(SCKL)</small></span><span class="pin"></span>
<span class="alternate legend_pibrella">Button</span>
<span class="alternate legend_wiringpi">Wiring Pi pin 14</span></a></li>
<li class="pin25 gnd"><a href="/pindb/pin25_ground"><span class="default"><span class="phys">25</span> Ground</span><span class="pin"></span>
</a></li>
<li class="pin27 gpio i2c"><a href="/pindb/pin27_id_sd"><span class="default"><span class="phys">27</span> ID_SD</span><span class="pin"></span>
</a></li>
<li class="pin29 gpio"><a href="/pindb/pin29_gpio5"><span class="default"><span class="phys">29</span> GPIO 5 </span><span class="pin"></span>
<span class="alternate legend_wiringpi">Wiring Pi pin 0</span></a></li>
<li class="pin31 gpio"><a href="/pindb/pin31_gpio6"><span class="default"><span class="phys">31</span> GPIO 6 </span><span class="pin"></span>
<span class="alternate legend_wiringpi">Wiring Pi pin 0</span></a></li>
<li class="pin33 gpio"><a href="/pindb/pin33_gpio13"><span class="default"><span class="phys">33</span> GPIO 13 </span><span class="pin"></span>
<span class="alternate legend_wiringpi">Wiring Pi pin 0</span></a></li>
<li class="pin35 gpio spi"><a href="/pindb/pin35_gpio19"><span class="default"><span class="phys">35</span> GPIO 19 <small>(MISO)</small></span><span class="pin"></span>
<span class="alternate legend_wiringpi">Wiring Pi pin 0</span></a></li>
<li class="pin37 gpio"><a href="/pindb/pin37_gpio26"><span class="default"><span class="phys">37</span> GPIO 26 </span><span class="pin"></span>
<span class="alternate legend_wiringpi">Wiring Pi pin 0</span></a></li>
<li class="pin39 gnd"><a href="/pindb/pin39_ground"><span class="default"><span class="phys">39</span> Ground</span><span class="pin"></span>
</a></li>
</ul>
<ul class="top">
<li class="pin2 5v"><a href="/pindb/pin2_5v_power"><span class="default"><span class="phys">2</span> 5v Power</span><span class="pin"></span>
</a></li>
<li class="pin4 5v"><a href="/pindb/pin4_5v_power"><span class="default"><span class="phys">4</span> 5v Power</span><span class="pin"></span>
</a></li>
<li class="pin6 gnd"><a href="/pindb/pin6_ground"><span class="default"><span class="phys">6</span> Ground</span><span class="pin"></span>
</a></li>
<li class="pin8 gpio uart"><a href="/pindb/pin8_gpio14"><span class="default"><span class="phys">8</span> GPIO 14 <small>(TXD)</small></span><span class="pin"></span>
<span class="alternate legend_wiringpi">Wiring Pi pin 15</span></a></li>
<li class="pin10 gpio uart"><a href="/pindb/pin10_gpio15"><span class="default"><span class="phys">10</span> GPIO 15 <small>(RXD)</small></span><span class="pin"></span>
<span class="alternate legend_wiringpi">Wiring Pi pin 16</span></a></li>
<li class="pin12 gpio"><a href="/pindb/pin12_gpio18"><span class="default"><span class="phys">12</span> GPIO 18 <small>(PCM_C)</small></span><span class="pin"></span>
<span class="alternate legend_pibrella">Buzzer</span>
<span class="alternate legend_wiringpi">Wiring Pi pin 1</span></a></li>
<li class="pin14 gnd"><a href="/pindb/pin14_ground"><span class="default"><span class="phys">14</span> Ground</span><span class="pin"></span>
</a></li>
<li class="pin16 gpio"><a href="/pindb/pin16_gpio23"><span class="default"><span class="phys">16</span> GPIO 23 </span><span class="pin"></span>
<span class="alternate legend_pibrella">Output B</span>
<span class="alternate legend_wiringpi">Wiring Pi pin 4</span></a></li>
<li class="pin18 gpio"><a href="/pindb/pin18_gpio24"><span class="default"><span class="phys">18</span> GPIO 24 </span><span class="pin"></span>
<span class="alternate legend_pibrella">Output C</span>
<span class="alternate legend_wiringpi">Wiring Pi pin 5</span></a></li>
<li class="pin20 gnd"><a href="/pindb/pin20_ground"><span class="default"><span class="phys">20</span> Ground</span><span class="pin"></span>
</a></li>
<li class="pin22 gpio"><a href="/pindb/pin22_gpio25"><span class="default"><span class="phys">22</span> GPIO 25 </span><span class="pin"></span>
<span class="alternate legend_pibrella">Output D</span>
<span class="alternate legend_wiringpi">Wiring Pi pin 6</span></a></li>
<li class="pin24 gpio spi"><a href="/pindb/pin24_gpio8"><span class="default"><span class="phys">24</span> GPIO 8 <small>(CE0)</small></span><span class="pin"></span>
<span class="alternate legend_pibrella">Input C</span>
<span class="alternate legend_wiringpi">Wiring Pi pin 10</span></a></li>
<li class="pin26 gpio spi"><a href="/pindb/pin26_gpio7"><span class="default"><span class="phys">26</span> GPIO 7 <small>(CE1)</small></span><span class="pin"></span>
<span class="alternate legend_pibrella">Input B</span>
<span class="alternate legend_wiringpi">Wiring Pi pin 11</span></a></li>
<li class="pin28 gpio"><a href="/pindb/pin28_id_sc"><span class="default"><span class="phys">28</span> ID_SC</span><span class="pin"></span>
</a></li>
<li class="pin30 gnd"><a href="/pindb/pin30_ground"><span class="default"><span class="phys">30</span> Ground</span><span class="pin"></span>
</a></li>
<li class="pin32 gpio"><a href="/pindb/pin32_gpio12"><span class="default"><span class="phys">32</span> GPIO 12 </span><span class="pin"></span>
<span class="alternate legend_wiringpi">Wiring Pi pin 0</span></a></li>
<li class="pin34 gnd"><a href="/pindb/pin34_ground"><span class="default"><span class="phys">34</span> Ground</span><span class="pin"></span>
</a></li>
<li class="pin36 gpio"><a href="/pindb/pin36_gpio16"><span class="default"><span class="phys">36</span> GPIO 16 </span><span class="pin"></span>
<span class="alternate legend_wiringpi">Wiring Pi pin 0</span></a></li>
<li class="pin38 gpio spi"><a href="/pindb/pin38_gpio20"><span class="default"><span class="phys">38</span> GPIO 20 <small>(MOSI)</small></span><span class="pin"></span>
<span class="alternate legend_wiringpi">Wiring Pi pin 0</span></a></li>
<li class="pin40 gpio spi"><a href="/pindb/pin40_gpio21"><span class="default"><span class="phys">40</span> GPIO 21 <small>(SCLK)</small></span><span class="pin"></span>
<span class="alternate legend_wiringpi">Wiring Pi pin 0</span></a></li>
</ul>
</nav>
<div id="content">
<article id="pibrella"><h1>Pibrella</h1>
<p>The all-in-one light, sound, input and output add-on board from Pimoroni vs Cyntech uses lots of IO on the Pi but leaves both Serial and I2C free leaving plenty of room for expansion if you get creative.</p>
<p>Pibrella is easy to use, first you should install the module using LXTerminal/Command Line:</p>
<pre class="codehilite"><code class="language-bash">sudo apt-get install python-pip
sudo pip install pibrella</code></pre>
<p>Then import it into your Python script and start tinkering:</p>
<pre class="codehilite"><code class="language-bash">import pibrella
pibrella.light.red.on()</code></pre></article>
</div>
<script type="text/javascript" src="//cdn.jsdelivr.net/jquery/1.9.1/jquery-1.9.1.min.js"></script>
<script type="text/javascript" src="//cdn.jsdelivr.net/cycle/2.9999.81/jquery.cycle.all.js"></script>
<script type="text/javascript" src="//cdn.jsdelivr.net/prettify/0.1/prettify.js"></script>
<script src='/prettify/lang-ruby.js'></script>
<script src='/prettify/lang-bash.js'></script>
<script src='//cdn.jsdelivr.net/history.js/1.7.1/history.js'></script>
<script src='//cdn.jsdelivr.net/history.js/1.7.1/history.adapter.jquery.js'></script>
<script src='/pinout.js?v=0.8'></script>
<script type="text/javascript">if (typeof NREUMQ !== "undefined") { if (!NREUMQ.f) { NREUMQ.f=function() {
NREUMQ.push(["load",new Date().getTime()]);
var e=document.createElement("script");
e.type="text/javascript";
e.src=(("http:"===document.location.protocol)?"http:":"https:") + "//" +
"js-agent.newrelic.com/nr-100.js";
document.body.appendChild(e);
if(NREUMQ.a)NREUMQ.a();
};
NREUMQ.a=window.onload;window.onload=NREUMQ.f;
};
NREUMQ.push(["nrfj","bam.nr-data.net","3cd5994c2d","2368869","Jl1cQ0MODVRUSho1DAtTRkVQTiBIQRdyIzFFQltZXhQVFxlja0laRm8ZHg==",0,1,new Date().getTime(),"","","","",""]);}</script></body>
</html>

View File

@ -6,6 +6,7 @@
"short": "An all-in-one light, input, motor, touch and output add-on board.",
"long": "pibrella.md"
},
"pincount": 40,
"pin": {
"7": {
"name": "LED 1",
@ -24,4 +25,4 @@
"exclusive": "true"
},
}
}
}

View File

@ -2,10 +2,8 @@
"name": "Pibrella",
"manufacturer": "Pimoroni",
"url": "https://github.com/pimoroni/pibrella",
"description": {
"short": "An all-in-one light, sound, input and output add-on board.",
"long": "pibrella.md"
},
"description": "An all-in-one light, sound, input and output add-on board.",
"pincount": 26,
"pin": {
"7": {
"name": "Green LED",
@ -60,4 +58,4 @@
"exclusive": "true"
}
}
}
}

55
template/layout.html Normal file
View File

@ -0,0 +1,55 @@
<!doctype html>
<html>
<head><script type="text/javascript">var NREUMQ=NREUMQ||[];NREUMQ.push(["mark","firstbyte",new Date().getTime()]);</script>
<title>Raspberry Pi Pinout - Rev 2 Board</title>
<link href='http://fonts.googleapis.com/css?family=Sanchez|Ubuntu+Mono' rel='stylesheet' type='text/css' />
<link href='/prettify/prettify.css' rel='stylesheet' />
<link href="//netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.css" rel="stylesheet">
<link href="/pinout.css?v=0010" rel="stylesheet">
<script type='text/javascript'>
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-32070014-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</head>
<body>
<div id="container">
<div class="latest" style="padding:10px;font-size:14px;margin-bottom:10px;text-align:right;">
Latest at Gadgetoid: <a href="http://pi.gadgetoid.com/article/parallax-propeller-p8x32a-first-impressions">Propeller ASC+, the Arduino-compatible multi-core micro: read my first impressions</a>
</div>
<h1><img src="/pinout-logo.png" style="top:8px;" /><span>Pi</span>n<span class="out">out</span></h1>
<nav id="gpio">
<div id="pinbase"></div>
<div id="pinbasebplus"></div>
{{nav}}
</nav>
<div id="content">
{{content}}
</div>
<script type="text/javascript" src="//cdn.jsdelivr.net/jquery/1.9.1/jquery-1.9.1.min.js"></script>
<script type="text/javascript" src="//cdn.jsdelivr.net/cycle/2.9999.81/jquery.cycle.all.js"></script>
<script type="text/javascript" src="//cdn.jsdelivr.net/prettify/0.1/prettify.js"></script>
<script src='/prettify/lang-ruby.js'></script>
<script src='/prettify/lang-bash.js'></script>
<script src='//cdn.jsdelivr.net/history.js/1.7.1/history.js'></script>
<script src='//cdn.jsdelivr.net/history.js/1.7.1/history.adapter.jquery.js'></script>
<script src='/pinout.js?v=0.8'></script>
<script type="text/javascript">if (typeof NREUMQ !== "undefined") { if (!NREUMQ.f) { NREUMQ.f=function() {
NREUMQ.push(["load",new Date().getTime()]);
var e=document.createElement("script");
e.type="text/javascript";
e.src=(("http:"===document.location.protocol)?"http:":"https:") + "//" +
"js-agent.newrelic.com/nr-100.js";
document.body.appendChild(e);
if(NREUMQ.a)NREUMQ.a();
};
NREUMQ.a=window.onload;window.onload=NREUMQ.f;
};
NREUMQ.push(["nrfj","bam.nr-data.net","3cd5994c2d","2368869","Jl1cQ0MODVRUSho1DAtTRkVQTiBIQRdyIzFFQltZXhQVFxlja0laRm8ZHg==",0,1,new Date().getTime(),"","","","",""]);}</script></body>
</html>