diff --git a/generate-html.py b/generate-html.py index 502937e..1a18606 100755 --- a/generate-html.py +++ b/generate-html.py @@ -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'] diff --git a/overlay/README.md b/overlay/README.md index d890c53..b48b713 100644 --- a/overlay/README.md +++ b/overlay/README.md @@ -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" } } } diff --git a/overlay/explorer-hat-pro.json b/overlay/explorer-hat-pro.json index e3bbe46..6c61183 100644 --- a/overlay/explorer-hat-pro.json +++ b/overlay/explorer-hat-pro.json @@ -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" } } diff --git a/overlay/explorer-hat.json b/overlay/explorer-hat.json index 968f0f8..a9d66cf 100644 --- a/overlay/explorer-hat.json +++ b/overlay/explorer-hat.json @@ -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" } } diff --git a/resources/pinout.css b/resources/pinout.css index b9a7ec1..705b48b 100644 --- a/resources/pinout.css +++ b/resources/pinout.css @@ -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;} diff --git a/template/layout.html b/template/layout.html index 11fd412..0c0574a 100644 --- a/template/layout.html +++ b/template/layout.html @@ -5,7 +5,7 @@ - +