Updated docs

This commit is contained in:
Phil Howard 2015-03-21 19:04:22 +00:00
parent 3f57de7ffd
commit 5f6433e47b
6 changed files with 50 additions and 47 deletions

View File

@ -6,7 +6,7 @@ import re
import os
resource_url = '/pinout2/resources/'
resource_url = '/resources/'
#resource_url = '/resources/'
overlays = ['pibrella','explorer-hat-pro','explorer-hat']

View File

@ -12,30 +12,27 @@ The JSON overlay file must include a name, manufacturer name, URL, description
The pin array must list each pin by its *physical* location, and include at least a "name" describing the function
of that pin.
Optionally each pin definition can include an "exclusive" flag, which marks this pin as being unavailable for other
use when it's occupied by this add-on.
Optionally each pin definition can include a "mode" flag, which defines the pin as an "input" or an "output".
Things like i2c/SPI wont normally be flagged as exclusive, but most general purpose GPIO pins would, for example.
A pin can also have an "active" value, which defines it as "high" or active "low".
I2C and SPI pins should be included if your board uses them, however they will generally be intepreted as being
shared and usable with muliple boards unless you explicitly define them as being an "input" or "output".
Example:
```json
{
"name": "Pibrella",
"name": "Explorer HAT",
"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, input and output add-on board.",
"pin": {
"7": {
"name": "Green LED",
"exclusive": "true"
"name": "Green LED"
},
"11": {
"name": "Yellow LED",
"exclusive": "true"
"name": "Yellow LED"
}
}
}

View File

@ -10,82 +10,82 @@
"pin": {
"7": {
"name": "LED 1",
"direction": "output",
"mode": "output",
"active": "high"
},
"11": {
"name": "LED 2",
"direction": "output",
"mode": "output",
"active": "high"
},
"13": {
"name": "LED 3",
"direction": "output",
"mode": "output",
"active": "high"
},
"29": {
"name": "LED 4",
"direction": "output",
"mode": "output",
"active": "high"
},
"31": {
"name": "Output 1",
"direction": "output",
"mode": "output",
"active": "high"
},
"32": {
"name": "Output 2",
"direction": "output",
"mode": "output",
"active": "high"
},
"33": {
"name": "Output 3",
"direction": "output",
"mode": "output",
"active": "high"
},
"36": {
"name": "Output 4",
"direction": "output",
"mode": "output",
"active": "high"
},
"16": {
"name": "Input 1",
"direction": "input",
"mode": "input",
"active": "high"
},
"15": {
"name": "Input 2",
"direction": "input",
"mode": "input",
"active": "high"
},
"18": {
"name": "Input 3",
"direction": "input",
"mode": "input",
"active": "high"
},
"22": {
"name": "Input 4",
"direction": "input",
"mode": "input",
"active": "high"
},
"40": {
"name": "Motor 2 +",
"direction": "output",
"mode": "output",
"active": "high"
},
"37": {
"name": "Motor 2 -",
"direction": "output",
"mode": "output",
"active": "high"
},
"35": {
"name": "Motor 1 +",
"direction": "output",
"mode": "output",
"active": "high"
},
"38": {
"name": "Motor 1 -",
"direction": "output",
"mode": "output",
"active": "high"
}
}

View File

@ -7,62 +7,62 @@
"pin": {
"7": {
"name": "LED 1",
"direction": "output",
"mode": "output",
"active": "high"
},
"11": {
"name": "LED 2",
"direction": "output",
"mode": "output",
"active": "high"
},
"13": {
"name": "LED 3",
"direction": "output",
"mode": "output",
"active": "high"
},
"29": {
"name": "LED 4",
"direction": "output",
"mode": "output",
"active": "high"
},
"31": {
"name": "Output 1",
"direction": "output",
"mode": "output",
"active": "high"
},
"32": {
"name": "Output 2",
"direction": "output",
"mode": "output",
"active": "high"
},
"33": {
"name": "Output 3",
"direction": "output",
"mode": "output",
"active": "high"
},
"36": {
"name": "Output 4",
"direction": "output",
"mode": "output",
"active": "high"
},
"16": {
"name": "Input 1",
"direction": "input",
"mode": "input",
"active": "high"
},
"15": {
"name": "Input 2",
"direction": "input",
"mode": "input",
"active": "high"
},
"18": {
"name": "Input 3",
"direction": "input",
"mode": "input",
"active": "high"
},
"22": {
"name": "Input 4",
"direction": "input",
"mode": "input",
"active": "high"
}
}

View File

@ -214,9 +214,9 @@ p.intro {
color:#268BD2;
}
p,pre {
margin-top:10px;
font-size: 15px;
line-height: 150%;
margin-top:10px;
font-size: 15px;
line-height: 150%;
}
h3 {
color:#D33682;
@ -227,6 +227,12 @@ h3 {
width:1000px;
margin:0 auto;
margin-top:10px;
position:relative;
}
.overlay-container {
position: absolute;
right: 0px;
top: 65px;
}
article a {color:#859900;text-decoration:underline;}
article ul {margin-left:20px;margin-top:10px;margin-bottom:10px;}

View File

@ -5,7 +5,7 @@
<link href='http://fonts.googleapis.com/css?family=Sanchez|Ubuntu+Mono' rel='stylesheet' type='text/css' />
<link href='{{resource_url}}prettify/prettify.css' rel='stylesheet' />
<link href="//netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.css" rel="stylesheet">
<link href="{{resource_url}}pinout.css?v=0011" rel="stylesheet">
<link href="{{resource_url}}pinout.css?v=0100" rel="stylesheet">
<!--script type='text/javascript'>
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-32070014-1']);
@ -23,7 +23,7 @@
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 class="logo"><a href="index.html"><img src="{{resource_url}}pinout-logo.png" style="top:8px;" /></a><span>Pi</span>n<span class="out">out</span></h1>
<div class="overlay">
<div class="overlay-container">
<span>Learn more about:</span>
<select class="overlay">
<option value="">&hellip;</option>
@ -48,7 +48,7 @@
<script src='{{resource_url}}prettify/lang-bash.js'></script>
<script src='http://cdn.jsdelivr.net/history.js/1.7.1/history.js'></script>
<script src='http://cdn.jsdelivr.net/history.js/1.7.1/history.adapter.jquery.js'></script>
<script src='{{resource_url}}pinout.js?v=0.8'></script>
<script src='{{resource_url}}pinout.js?v=00000001'></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");