Merge remote-tracking branch 'Gadgetoid/master'

This commit is contained in:
Shawn 2016-11-23 08:53:35 +01:00
commit 91af6de6b6
644 changed files with 23180 additions and 4728 deletions

4
.gitignore vendored
View File

@ -1,2 +1,6 @@
output/
*.py[cod]
env/
.DS_store
.sass-cache/

View File

@ -4,10 +4,22 @@ LANG := $(subst -, ,$(LANG))
LANG := $(subst _, ,$(LANG))
LANG := $(firstword $(LANG))
all:
.PHONY: resources
all: html resources
css:
scss resources/pinout.scss > resources/pinout.scss.css
html:
./generate-html.py $(LANG)
resources:
cp -r resources output/$(LANG)/
devel: css all resources
./serve.py ${LANG}
clean:
rm -rf output/$(LANG)/*

View File

@ -1,42 +1,44 @@
#Pinout 2
#Pinout.xyz
Pinout 2 is the successor to the popular Pi pinout website http://pi.gadgetoid.com/pinout
<a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by-nc-sa/4.0/88x31.png" /></a>
To support translation efforts, and allow people to build tools with the data in this repository, Pinout 2 is
provided under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
[Pinout.xyz](http://pinout.xyz/) is the successor to the popular Pi pinout website originally hosted on [http://pi.gadgetoid.com/pinout](http://pi.gadgetoid.com/pinout).
This project aims to build a consistent workflow behind the Pinout front-end, and invite board manufacturers
to produce their own "overlay" files which describe which pins their Pi add-ons use.
To support translation efforts, and allow people to build tools with the data in this repository, Pinout.xyz is licensed under a [Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License](http://creativecommons.org/licenses/by-nc-sa/4.0/).
I hope that by making this project open and extensible I will invite not only contributions of board pinouts,
but translations too.
This license excludes the 'pinout-graphic-horizontal' files located in the `graphics` directory, which are provided under a [Creative Commons Attribution-ShareAlike 4.0 International License](http://creativecommons.org/licenses/by-sa/4.0/) to permit commercial use; specifically publication in books and magazines with appropriate attribution.
I'm also looking for feedback about the structure of the JSON files, what information needs to be contained in
them, how they can better support translation and any other suggestions you might have.
#Contributing
If you have a board you'd like to contribute, raise an issue and we'll consider it!
#Translating
#About this project
The contents of this GitHub repository are used to build http://pinout.xyz and its translated subdomains.
Current known contributors are:
This project aims to build a consistent workflow behind the Pinout.xyz front-end, gather useful information about the Raspberry Pi GPIO interface and add-on boards, and invite board manufacturers to produce their own "overlay" files which describe which pins their Pi add-ons use.
* de - @rdmueller and @KojoePi
* es - @ResonantWave
* fr - @RogueM
* it - @LizardM4
* pt - @Maslor
* tr - @Ardakilic
We hope that by making this project open and extensible we will invite not only contributions of board pinouts, but translations too.
If you would like to provide support for a language not yet in the repository you should start by duplicating the `src/en` directory to the
appropriate culture. For example if you want to create a German translation you would create the folder `src/de`.
#Reporting
There are no plans to support cultures, so you can't have `src/fr-CA` ( sorry! ).
If you've spotted an error, ommission or have a suggestion, raise an [issue](https://github.com/Gadgetoid/Pinout.xyz/issues). Feedback on every aspect of the site or this repository is welcome!
Once you've made your translation, build and preview it with, for example:
#Contributing
If you have a board you'd like to contribute, the preferred method for submission is to create a modified version of the overlay [template](https://github.com/Gadgetoid/Pinout.xyz/blob/master/draft/overlay/template.md) and create a pull request. Please ensure the files you submit are being pushed to the `/draft` folder, where it will be reviewed before publication.
Note that as part of the submission, a top-down view of the board in the form of a [png](https://github.com/Gadgetoid/Pinout.xyz/blob/master/draft/boards/template.png) is expected, although optional. If you can't produce the png file yourself, just duplicate and rename `template.png` but make sure to include a url somewhere in the overlay where we can fetch a suitable graphic.
If you feel that the requirements for submissions is beyond your current possibilities, you may raise an [issue](https://github.com/Gadgetoid/Pinout.xyz/issues) requesting the addition of a specific board instead and we'll consider it!
#Translating
If you would like to provide support for a language not yet in the repository you should start by duplicating the `src/en` directory to the appropriate [language-code](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes). For example, if you want to create a Czech translation you would create the folder `src/cs`. Note that there are no plans to support cultures (it would just get out of hand), so you can't have `src/fr-CA` (sorry!).
The first resources we recommend you translate are the language-specific strings found in the `settings.yaml` file, `pi-pinout.md`, `index.md`, `404.md` and the `footer.html` template, as well as the content of the `/pin` folder, preferably.
Once that's done, rename the `/overlay` folder to `/translate` and start translating the boards markdown files (pick any you fancy translating, it does not have to be the first board in alphabetical order). Leave those translations in the `/translate` folder when finished.
Please do not attempt to translate the `/resources` folder, or anything not specifically mentioned in this section of the README - all files outside your *&lt;languagecode&gt;* directory are shared between the subdomains and are meant to be generic. Feel free to modify the template with links relevant to your country, and / or your Twitter handle however, but don't fiddle with the structure!
Once you've made your translation, you can build and preview it with, for example:
```bash
make serve LANG=de
@ -44,17 +46,36 @@ make serve LANG=de
And then open: http://127.0.0.1:5000 in your browser.
Please do not attempt to translate the `/resources` folder, this is shared between sites on the server and should be generic.
*note 1: you will need several python modules installed on your system to render and serve a local version of the site, run*
*`pip install -r requirements.txt` from the top of the repository tree to install the required modules.*
Feel free to modify the template with links relevent to your country, and your Twitter handle but don't fiddle with the structure!
*note 2: if you are facing issues with your preview (board not showing, text update not appearing, etc.), you can fix it by erasing your browser's cache (image and cache file only).*
Submit your finished translation as a pull request and I'll get it live on pinout.xyz.
The last step will be to submit your finished translation as a [pull request](https://github.com/Gadgetoid/Pinout.xyz/pulls) (this can include any number of boards, it does not have to be the entire line-up) and we'll get it live on its own *&lt;languagecode&gt;*.pinout.xyz subdomain.
#Roadmap
If you wish to provide a translation for an existing subdomain, or correct a typo in an existing markdown file, just edit the file in place (leaving the files in the `translate` folder for review, if you are pushing a translation).
* Redesign UI to support browsing a wider variety of boards and viewing their pinouts ( partially done with drop down )
* Replace top tabs with some sort of search functionality or easy categorised UI for finding boards
* Allow for slightly longer descriptions of Pin functions ( baloons? ), current width is very restrictive
* Does X board work with Y board
* What extra functions does this pin have ( mostly done with ALT functions tables, but needs descriptions )
If you have a question about translations, raise an [issue](https://github.com/Gadgetoid/Pinout.xyz/issues) and we'll be happy to help you get past whatever hurdle you may face!
#Roadmap &amp; wishlist
* Redesign HTML generation and unify HTML templates into a single, translatable file
* Add functionality to compare two or more boards, to visualise pin compatibility
* Tool to convert WiringPi to GPIO to BCM and back
* Add as many [boards](http://pinout.xyz/boards) as possible!
#Acknowledgement
Maintainers: [@Gadgetoid](https://github.com/Gadgetoid) and [@RogueM](https://github.com/RogueM)
GPIO Zero code examples by: [@bennuttall](https://github.com/bennuttall)
Notable contributions:
* [en](http://pinout.xyz/) - [@lurch](https://github.com/lurch) and [@abelectronicsuk](https://github.com/abelectronicsuk)
* [de](http://de.pinout.xyz/) - [@rdmueller](https://github.com/rdmueller) and [@KojoePi](https://github.com/KojoePi)
* [es](http://es.pinout.xyz/) - [@ResonantWave](https://github.com/ResonantWave) and [@IkerGarcia](https://github.com/IkerGarcia)
* [fr](http://fr.pinout.xyz/) - [@RogueM](https://github.com/RogueM) and [@smileyn64](https://github.com/smileyn64)
* [it](http://it.pinout.xyz/) - [@LizardM4](https://github.com/LizardM4)
* [tr](http://tr.pinout.xyz/) - [@Ardakilic](https://github.com/Ardakilic)

View File

@ -2,8 +2,28 @@
This document only logs the changes to the overlay files that are relevant for purposes of translations. See files history for further details!
July 27, 2016
- added iface-1wire.md
July 24, 2016
- added microdot-phat.md
- added wifi-pants.md
- added uugear-witty-pi-2.md
July 12, 2016
- added adafruit-servo-hat.md
July 10, 2016
- added raspio-duino.md
- added pi-liter.md
- added zero-lipo.md
July 9, 2016
- added analog-zero.md
- added carberry.md
June 25, 2016
adafruit-cap-mpr121.md
- adafruit-cap-mpr121.md
June 24, 2016
- added unicorn-phat.md

27
common/boards.html Normal file
View File

@ -0,0 +1,27 @@
<div id="leftcolumn">
<nav id="boardsnav">
<div class="facets"></div>
</nav>
</div>
<div id="content">
<div id="interfaces">
<ul>
{{interfaces}}
</ul>
</div>
<div id="crumbtrail">
<p>
<a class="more" href="/">&laquo; {{strings:return_home}}</a>
</p>
</div>
<div id="boards_header">
<article>
<h1>{{strings:boards_title}}</h1>
<p>{{strings:boards_subtitle}}</p>
</article>
</div>
<div id="boards"><ul>{{content}}</ul></div>
<div id="lang">
{{lang_links}}
</div>
</div>

39
common/layout.html Normal file
View File

@ -0,0 +1,39 @@
<!doctype html>
<html lang="{{langcode}}">
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
<title>{{title}}</title>
<meta name="description" content="{{description}}" />
<link href='{{resource_url}}prettify/prettify.css' rel='stylesheet' />
<link href="{{resource_url}}pinout.scss.css?v={{v}}" rel="stylesheet">
<link href="{{resource_url}}print.css?v={{v}}" rel="stylesheet" media="print">
{{hreflang}}
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', '{{settings:analytics_id}}', 'auto');
ga('send', 'pageview');
</script>
</head>
<body class="{{body_class}}">
<div id="container">
<h1 class="logo"><a title="Raspberry Pi GPIO Pinout home" href="/"><img src="{{resource_url}}pinout-logo.png" />Raspberry Pi Pinout</a></h1>
{{main_content}}
<div class="footer">
{{footer}}
</div>
</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/prettify/0.1/prettify.js"></script>
<script src='{{resource_url}}prettify/lang-bash.js'></script>
<script src='{{resource_url}}pinout.js?v={{v}}'></script>
<script src='{{resource_url}}boards.js?v={{v}}'></script>
</body>
</html>

23
common/page.html Normal file
View File

@ -0,0 +1,23 @@
<div id="leftcolumn">
<nav id="gpio">
<div id="pinbase"></div>
{{nav}}
</nav>
</div>
<div id="content">
<div id="interfaces">
<ul>
{{interfaces}}
</ul>
</div>
{{crumbtrail}}
<div id="featured">
<ul>
{{featured_boards}}
</ul>
</div>
{{content}}
<div id="lang">
{{lang_links}}
</div>
</div>

View File

@ -1,4 +1,6 @@
import json, sys
import json
import sys
db = json.load(open('pi-pinout.db'))
@ -27,4 +29,3 @@ if len(sys.argv) > 2:
mode = sys.argv[2]
print("Pin {} is {}: {}".format(pin, mode.upper(), from_phys(pin, mode)))

BIN
draft/boards/pi-cap.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 121 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

View File

@ -0,0 +1,32 @@
<!--
---
name: Pi Zero Motor Shim
class: board
type: motor
formfactor: Custom
manufacturer: 4tronix
description: LiPMotor driver shim for Raspberry Pi
url: http://4tronix.co.uk/store/index.php?rt=product/product&product_id=543
buy: http://4tronix.co.uk/store/index.php?rt=product/product&product_id=543
image: 'pzm-shim.png'
pincount: 6
eeprom: no
ground:
'39':
pin:
'35':
name: MotorB_0
mode: output
'36':
name: MotorB_1
mode: output
'37':
name: MotorA_0
mode: output
'38':
name: MotorA_1
mode: output
-->
#Pi Zero Motor Shim
The PZM shim gives you the simplest possible motor driver that can be fitted directly to the header of a Pi Zero (or other 40-pin model of Pi). Headers are included to use if required so that it is a plug-in device rather than soldered directly if preferred.

79
draft/overlay/pi-cap.md Normal file
View File

@ -0,0 +1,79 @@
<!--
---
name: Pi Cap
class: board
type: touch, capacitive, audio
formfactor: Custom
manufacturer: Bare Conductive
description: Add capacitive touch, distance sensing and high quality audio to the Raspberry Pi
url: https://www.bareconductive.com/shop/pi-cap/
buy: https://www.bareconductive.com/shop/pi-cap/
image: 'pi-cap.png'
pincount: 40
eeprom: no
power:
'1':
ground:
'6':
'9':
'14':
'20':
'25':
'30':
'34':
'39':
pin:
'3':
mode: i2c
'5':
mode: i2c
'7':
name: Button
mode: input
active: low
'11'
name: IRQ
mode: input
active: low
'29'
name: Green LED
mode: output
active: low
'31'
name: Red LED
mode: output
active: low
'32'
name: PWM0
mode: output
active: high
'33'
name: PWM1
mode: output
active: high
'37'
name: Blue LED
mode: output
active:low
i2c:
'0x5C':
name: MPR121
device: MPR121
-->
# Pi-Cap
The Pi Cap adds precise capacitive touch, distance sensing and high quality audio to any Raspberry Pi with a 40 pin GPIO connector. The 12 electrodes can be connected to anything conductive to create a touch or proximity interface. Additionally the Pi Cap includes a user-programmable RGB LED and a multi-function button.
The Pi Cap software is in the official Raspbian repository, so to install the software simply enter:
```bash
sudo apt-get update
sudo apt-get dist-upgrade
```
Reboot the Raspberry Pi and enter:
```bash
sudo apt-get install picap
picap-setup
```
The Pi Cap provides 7 digital I/O pins, brought out from the 40-way Raspberry Pi GPIO connector pins 12, 13, 15, 16, 18, 22, 36. The Pi Cap package contains plenty of code examples written in C++, Python and Node.js that are supported by the Pi Cap library.

View File

@ -0,0 +1,94 @@
<!--
---
name: Picade HAT
class: board
type: input
formfactor: HAT
manufacturer: Pimoroni
description: Arcade control inputs plus mono I2S digital audio
buy: https://shop.pimoroni.com/
image: 'picade-hat.png'
pincount: 40
eeprom: yes
power:
'1':
'2':
'4':
'17':
ground:
'6':
'9':
'14':
'20':
'25':
'30':
'34':
'39':
pin:
'7':
name: Shutdown
mode: output
'11':
name: Power
mode: output
'12':
name: I2S Clock
'13':
name: Enter
mode: input
'15':
name: Escape
mode: input
'16':
name: Coin
mode: input
'18':
name: Start
mode: input
'19':
name: 'Button 6'
mode: input
'21':
name: 'Button 5'
mode: input
'22':
name: 'Button 4'
mode: input
'23':
name: 'Button 2'
mode: input
'24':
name: 'Button 3'
mode: input
'29':
name: 'Button 1'
mode: input
'31':
name: Down
mode: input
'32':
name: Up
mode: input
'35':
name: I2S WS
'36':
name: Right
mode: input
'38':
name: Left
mode: input
'40':
name: I2S Data
install:
'devices':
- 'i2s'
-->
#Picade HAT
Picade HAT provides screw terminals for 10 arcade buttons and a joystick. It also includes a digital to analog audio converter and amplifier which outputs to a single speaker terminal.
All button inputs should be configured with their corresponding internal pull-ups. Buttons should be wired between an input and ground.
* 14 button terminals
* Stereo audio combined for a single speaker
* Support for an external power button and safe power shutdown

View File

@ -0,0 +1,44 @@
<!--
---
name: Slice of Radio
class: board
type: RF
formfactor: Custom
manufacturer: Ciseco
description: A two way RF transceiver for the Raspberry Pi
url: https://www.wirelessthings.net/slice-of-radio-wireless-rf-transciever-for-the-raspberry-pi
buy: https://www.wirelessthings.net/slice-of-radio-wireless-rf-transciever-for-the-raspberry-pi
image: 'slice-of-radio.png'
pincount: 26
eeprom: no
power:
'1':
ground:
'6':
'9':
'14':
'20':
'25':
'30':
'34':
'39':
pin:
'8':
name: Send
direction: output
'10':
name: Receive
direction: input
'15':
name: Program
mode: output
-->
#Slice of Radio
The Slice of Radio is a two way secure wireless RF transceiver for the Raspberry Pi. Sending and recieving via the standard on board Raspberry Pi serial port, it is very easy to use and means you do not need any drivers or special software.
It supports 128bit AES encryption and Over The Air Micro Programming from the Arduino IDE (OTAMP).
The on board "chip" antenna gives good performance for such a small package and can be extended in range by soldering on an 8.2cm wire whip. For even greater range it is possible to fit an antenna using an SMA to u.fl pigtail lead.
Expected range would be around 200m in line of sight with chip antenna, and up to 1000m with an external antenna. It is able to communicate with a wide range of radio nodes such as XRF, SRF, URF, ERF.

View File

@ -1,23 +1,39 @@
<!--
---
name: board name
class: category
type: application
name: My Add-on Board
class: board
type: other
formfactor: Custom
image: board image
manufacturer: made by
description: what it is
url: https://myaddon.com
github: https://github.com/myaddonrepo.com
buy: http://shopformyaddon.com
pincount: 26
manufacturer: Company
description: An add-on board for the Raspberry Pi
url: https://my-addon-board.com
github: https://github.com/my-addon-board-repo.com
schematic: https://my-addon-board-schematic.com
buy: http://buy-my-addon-board.com
image: 'image.png'
pincount: 40
eeprom: no
power: 3v3,5v
power:
'1':
'2':
ground:
'6':
'9':
'14':
'20':
'25':
'30':
'34':
'39':
pin:
'3':
mode: i2c
'5':
mode: i2c
'7':
name: Enable
mode: output
active: high
i2c:
'0x00':
name: device display name
@ -29,23 +45,23 @@ Use this section to provide additional information such as features, technical p
The overlay itself uses the following fields, some of which are mandatory, as noted below:
MANDATORY
* name: the board name as it will appear at pinout.xyz
* class: the class the overlay falls in, 'board' is the most common (use that if in doubt).
MANDATORY
* name: the board name as it will appear at pinout.xyz
* class: the class the overlay falls in, 'board' is the most common (use that if in doubt).
* type: the typical applications of the board, i.e 'lcd' (use 'other' if in doubt). If multiple types apply, use a comma separated list (for example, 'adc,motor'). The keywords submitted will be used to filter boards on the site so don't include anything but tags that are relevant to the key functionality of the board.
* formfactor: the board's form factor. Valid values are Custom, HAT and pHAT. Note that an EEPROM is required for HAT specs, use Custom if that is not the case.
* manufacturer: the manufacturer's name.
* description: a description of what the add-on board provides.
* url: the main URL for the product providing detailed technical information about the board.
* pin: an array of the pins used. Do not specify power or EEPROM pins as part of the array!
* manufacturer: the manufacturer's name.
* description: a description of what the add-on board provides.
* url: the main URL for the product providing detailed technical information about the board.
* pin: an array of the pins used. Do not specify power or EEPROM pins as part of the array!
DESIRABLE
* pincount: the header pin count, typically 26 or 40 but shims/custom boards are acceptable.
* eeprom: whether the board includes an eeprom (required by 'HAT' specs!).
* power: the supply logic required by the board. Valid values are 3v3, 5v and 3v3,5v.
* i2c: if the board uses i2c, a list of the bus address(es) and device(s) identification.
DESIRABLE
* pincount: the header pin count, typically 26 or 40 but shims/custom boards are acceptable.
* eeprom: whether the board includes an eeprom (required by 'HAT' specs!).
* power: the supply logic required by the board. Valid values are 'external', '3v3', '5v' and '3v3,5v'.
* i2c: if the board uses i2c, a list of the bus address(es) and device(s) identification.
OPTIONAL
* image: a top-down image of the board as png with transparency or appropriate placeholder (see image template in board directory).
* github: github repository address.
* buy: URL where the board can be purchased.
OPTIONAL
* image: a top-down image of the board as png with transparency or appropriate placeholder (see image template in board directory).
* github: github repository address.
* buy: URL where the board can be purchased.

50
draft/publish.sh Executable file
View File

@ -0,0 +1,50 @@
#!/bin/bash
draftpng="../draft/boards"
dirpng="../resources/boards"
draftmd="../draft/overlay"
mdlist=$(ls "$draftmd")
srcdir="../src"
langlist=$(ls "$srcdir")
yamlfile="settings.yaml"
FORCE=$1
confirm() {
if [ "$FORCE" == '-y' ]; then
true
else
read -r -p "$1 [y/N] " response < /dev/tty
if [[ $response =~ ^(yes|y|Y)$ ]]; then
true
else
false
fi
fi
}
for overlay in $mdlist; do
if [ $overlay != "template.md" ]; then
board=$(echo "$overlay" | rev | cut -c 4- | rev)
if confirm "Would you like to publish $board?"; then
for dirmd in ${langlist[@]}; do
if [ $dirmd != "en" ]; then
if ! [ -f $srcdir/$dirmd/overlay/$overlay ]; then
cp $draftmd/$overlay $srcdir/$dirmd/translate/
fi
else
cp $draftmd/$overlay $srcdir/$dirmd/overlay/
fi
if ! grep -e $board ../src/$dirmd/$yamlfile &> /dev/null; then
echo "- $board" | tee -a ../src/$dirmd/$yamlfile &> /dev/null
fi
done
rm $draftmd/$overlay
if [ -f $draftpng/$board.png ];then
mv $draftpng/$board.png $dirpng
fi
fi
fi
done
exit 0

66
draft/sync.sh Executable file
View File

@ -0,0 +1,66 @@
#!/bin/bash
masterdir="../src/en/overlay"
mdlist=$(ls "$masterdir")
srcdir="../src"
langlist=$(ls "$srcdir")
yamlfile="settings.yaml"
urllist=( "url" "github" "buy" "schematic" )
filesync=false
urlfix=false
confirm() {
if [ "$FORCE" == '-y' ]; then
true
else
read -r -p "$1 [y/N] " response < /dev/tty
if [[ $response =~ ^(yes|y|Y)$ ]]; then
true
else
false
fi
fi
}
echo "syncing lang directories..."
for overlay in $mdlist; do
board=$(echo "$overlay" | rev | cut -c 4- | rev)
for dirmd in ${langlist[@]}; do
if [ -f $srcdir/$dirmd/translate/$overlay ]; then
if [ -n "$(diff "$masterdir/$overlay" "$srcdir/$dirmd/translate/$overlay" 2> /dev/null)" ]; then
echo "overwriting $dirmd/translate/$overlay"
cp $masterdir/$overlay $srcdir/$dirmd/translate/
filesync=true
fi
elif ! [ -f $srcdir/$dirmd/overlay/$overlay ]; then
echo "copying $overlay to $dirmd/translate/"
cp $masterdir/$overlay $srcdir/$dirmd/translate/
filesync=true
fi
if ! grep -e $board ../src/$dirmd/$yamlfile &> /dev/null; then
echo "adding $board to $dirmd/$yamlfile"
echo "- $board" | tee -a ../src/$dirmd/$yamlfile &> /dev/null
fi
if [ -f "$srcdir/$dirmd/overlay/$overlay" ]; then
for urltype in ${urllist[@]}; do
besturl=$(grep "^$urltype" "$masterdir/$overlay")
langurl=$(grep "^$urltype" "$srcdir/$dirmd/overlay/$overlay")
if [ "$besturl" != "$langurl" ]; then
echo "$urltype in en $overlay is $besturl"
echo "$urltype in $dirmd $overlay is $langurl"
if confirm "would you like to fix this discrepancy?"; then
sed -i "s|^$urltype.*$|$besturl|" "$srcdir/$dirmd/overlay/$overlay"
echo "external link was fixed" && urlfix=true
fi
fi
done
fi
done
done
if ! $filesync && ! $urlfix;then
echo "all translations are up-to-date"
fi
exit 0

View File

@ -1,50 +1,60 @@
#!/usr/bin/env python
import markdown
import unicodedata
import re
import os
import re
import sys
import pinout
import unicodedata
try:
import markdown
except ImportError:
exit("This script requires the psutil module\nInstall with: sudo pip install Markdown")
import markjaml
import pinout
import urlmapper
reload(sys)
sys.setdefaultencoding('utf8')
GROUND_PINS = [6,9,14,20,25,30,34,39]
lang = "en"
default_strings = {
'made_by': 'Made by {manufacturer}',
'type_hat': 'HAT form-factor',
'type_classic': 'Classic form-factor',
'home': 'Home',
'boards': 'Boards',
'details': 'Details',
'pin_header': '{} pin header',
'form_undefined': 'Undefined',
'group_other': 'other',
'type_hat': 'HAT form-factor',
'type_phat': 'pHAT form-factor',
'type_classic': 'Classic form-factor',
'eeprom_detect': 'Uses VID/PID',
'eeprom_setup': 'Uses EEPROM',
'uses_5v_and_3v3': 'Needs 5v and 3v3 power',
'uses_5v': 'Needs 5v power',
'uses_3v3': 'Needs 3v3 power',
'uses_i2c': 'Uses I2C',
'wiring_pi_pin': 'Wiring Pi pin {}',
'uses_spi': 'Uses SPI',
'uses_n_gpio_pins': 'Uses {} GPIO pins',
'bcm_pin_rev1_pi': 'BCM pin {} on Rev 1 ( very early ) Pi',
'physical_pin_n': 'Physical pin {}',
'wiring_pi_pin': 'Wiring Pi pin {}',
'made_by': 'Made by {manufacturer}',
'more_information': 'More Information',
'github_repository': 'GitHub Repository',
'board_schematic': 'Schematic',
'buy_now': 'Buy Now',
'group_multi': 'Multi',
'group_led': 'LED',
'group_iot': 'IOT',
'group_instrument': 'Instrument',
'group_lcd': 'LCD',
'group_other': 'Other',
'group_motor': 'Motor',
'group_adc': 'ADC',
'group_audio': 'Audio',
'group_gesture': 'Gesture',
'group_touch': 'Touch',
'group_pinout': 'Pinout',
'group_info': 'Info',
'group_featured': 'Featured'
'translate_msg': '<a href="https://github.com/gadgetoid/Pinout.xyz">This page needs translating, can you help?</a><br><br>',
'browse_addons': 'Browse more HATs, pHATs and add-ons',
'return_home': 'Return to the Raspberry Pi GPIO Pinout',
'boards_title': 'Raspberry Pi HATs, pHATs &amp; Add-ons',
'boards_subtitle': 'Click on a HAT, pHAT or add-on for more details and to see which pins it uses!'
}
def cssify(value):
value = slugify(value);
if value[0] == '3' or value[0] == '5':
@ -68,10 +78,27 @@ def load_overlay(overlay):
try:
data = markjaml.load('src/{}/overlay/{}.md'.format(lang, overlay))
loaded = data['data']
loaded['source'] = "src/{}/translate/{}.md".format(lang, overlay)
loaded['long_description'] = data['html']
except IOError:
return None
try:
data = markjaml.load('src/{}/translate/{}.md'.format(lang, overlay))
loaded = data['data']
loaded['source'] = "src/{}/translate/{}.md".format(lang, overlay)
loaded['long_description'] = strings['translate_msg'] + data['html']
loaded['type'] = strings['group_other']
if 'formfactor' in loaded:
if str(loaded['formfactor']) == 'Custom':
loaded['formfactor'] = strings['form_undefined']
except IOError:
print 'overlay {} missing in lang {}'.format(overlay, lang)
return None
print('>> Rendering: {src}'.format(src=loaded['source']))
'''
If this is not an info page, then build a collection of details and append them to long_description
@ -80,10 +107,11 @@ def load_overlay(overlay):
details = []
if 'type' not in loaded:
loaded['type'] = 'addon'
loaded['type'] = strings['group_other']
if 'manufacturer' in loaded:
details.append(strings['made_by'].format(manufacturer=loaded['manufacturer']))
manu_link = '<a href="/boards#manufacturer={manufacturer}">{manufacturer}</a>'.format(manufacturer=loaded['manufacturer'])
details.append(strings['made_by'].format(manufacturer=manu_link))
if 'pincount' in loaded:
'''
@ -108,13 +136,46 @@ def load_overlay(overlay):
else:
details.append(strings['pin_header'].format(pincount))
if 'eeprom' in loaded:
eeprom = str(loaded['eeprom'])
if eeprom == 'detect' or eeprom == 'True':
details.append(strings['eeprom_detect'])
if eeprom == 'setup':
details.append(strings['eeprom_setup'])
if 'power' in loaded:
uses_5v = False
uses_3v3 = False
for pin in loaded['power']:
pin = str(pin)
if pin.startswith('bcm'):
pin = pinout.bcm_to_physical(pin[3:])
if pin in ['2','4']:
uses_5v = True
if pin in ['1','17']:
uses_3v3 = True
if uses_5v and uses_3v3:
details.append(strings['uses_5v_and_3v3'])
elif uses_5v:
details.append(strings['uses_5v'])
elif uses_3v3:
details.append(strings['uses_3v3'])
'''
If the overlay includes a collection of pins then
loop through them and count how many non-power pins are used
'''
if 'pin' in loaded:
uses_i2c = False
uses_spi = False
uses = 0
for pin in loaded['pin']:
data = loaded['pin'][pin]
pin = str(pin)
if pin.startswith('bcm'):
pin = pinout.bcm_to_physical(pin[3:])
@ -128,20 +189,21 @@ def load_overlay(overlay):
else:
uses += 1
if data is not None and 'mode' in data:
if pin in ['3','5'] and data['mode'] == 'i2c':
uses_i2c = True
if pin in ['19','21','23'] and data['mode'] == 'spi':
uses_spi = True
if uses_i2c:
details.append(strings['uses_i2c'])
if uses_spi:
details.append(strings['uses_spi'])
if uses > 0:
details.append(strings['uses_n_gpio_pins'].format(uses))
'''
If the collection of pins includes pins 3 and 5 in i2c mode, then
assume the board uses i2c communication
'''
if '3' in loaded['pin'] and '5' in loaded['pin']:
pin_3 = loaded['pin']['3']
pin_5 = loaded['pin']['5']
if 'mode' in pin_3 and 'mode' in pin_5:
if pin_3['mode'] == 'i2c' and pin_5['mode'] == 'i2c':
details.append(strings['uses_i2c'])
# A URL to more information about the add-on board, could be a GitHub readme or an about page
if 'url' in loaded:
details.append('[{text}]({url})'.format(text=strings['more_information'], url=loaded['url']))
@ -150,12 +212,24 @@ def load_overlay(overlay):
if 'github' in loaded:
details.append('[{text}]({url})'.format(text=strings['github_repository'], url=loaded['github']))
# A URL referencing the add-on board schematic
if 'schematic' in loaded:
details.append('[{text}]({url})'.format(text=strings['board_schematic'], url=loaded['schematic']))
# A URL to a preferred place to buy the add-on board
if 'buy' in loaded:
details.append('[{text}]({url})'.format(text=strings['buy_now'], url=loaded['buy']))
loaded['long_description'] = '{}\n{}'.format(loaded['long_description'],
markdown.markdown('\n'.join(map(lambda d: '* ' + d, details))))
details_html = markdown.markdown('\n'.join(map(lambda d: '* ' + d, details)))
details_image = ''
if 'image' in loaded:
details_image = "<img src=\"/resources/boards/{}\" alt=\"{}\" />".format(loaded['image'],loaded['name'])
details_html = "<table class=\"details\"><tr><td><h2>{}</h2>{}</td><td>{}</td></tr></table>".format(strings['details'],details_html,details_image)
loaded['long_description'] = '{}\n{}'.format(loaded['long_description'],details_html)
# Automatically generate a page slug from the name if none is specified
if 'page_url' not in loaded:
@ -173,38 +247,24 @@ def load_md(filename):
filename = 'src/{}/{}'.format(lang, filename)
try:
html = markdown.markdown(open(filename).read(), extensions=['fenced_code'])
#print(':) Loaded markdown from {}'.format(filename))
return html
except IOError:
print('!! Unable to load markdown from {}'.format(filename))
#print('!! Unable to load markdown from {}'.format(filename))
return ''
def render_pin_text(pin_num, pin_url, pin_name, pin_functions, pin_subtext):
return '<article class="{pin_url}"><h1>{pin_name}</h1>{pin_functions}{pin_subtext}{pin_text}</article>'.format(
pin_url=pin_url,
pin_name=pin_name,
pin_functions=pin_functions,
pin_subtext=pin_subtext,
pin_text=load_md('pin/pin-{}.md'.format(pin_num)))
def render_overlay_page(overlay):
if overlay is None:
return ''
return '<article class="page_{}">{}</article>'.format(slugify(overlay['name']), overlay['long_description'])
def render_alternate(handle, name):
handle = slugify(handle.lower())
return '<span class="alternate legend_{}">{}</span>'.format(handle, name)
def render_pin_page(pin_num):
pin = pinout.pins[str(pin_num)]
pin_url = pin['name']
if pin_url == 'Ground':
# Exclude pages for ground pins
if pin_num in GROUND_PINS:
return None, None, None
pin_text_name = pin['name']
@ -245,27 +305,28 @@ def render_pin_page(pin_num):
fn_functions.append(function)
pin_functions = '''<table class="pin-functions">
<thead>
<tr>
<th>{headings}</th>
</tr>
</thead>
<tbody>
<tr>
<td>{functions}</td>
</tr>
</tbody>
</table>'''.format(headings='</th><th>'.join(fn_headings), functions='</td><td>'.join(fn_functions))
<thead>
<tr>
<th>{headings}</th>
</tr>
</thead>
<tbody>
<tr>
<td>{functions}</td>
</tr>
</tbody>
</table>'''.format(headings='</th><th>'.join(fn_headings), functions='</td><td>'.join(fn_functions))
pin_url = slugify('pin{}_{}'.format(pin_num, pin_url))
pin_text = render_pin_text(
pin_num,
pin_url,
pin_text_name,
pin_functions,
'<ul><li>{}</li></ul>'.format('</li><li>'.join(pin_subtext))
)
pin_text = '<article class="{pin_url}"><h1>{pin_name}</h1>{pin_functions}{pin_subtext}{pin_text}</article>'.format(
pin_url=pin_url,
pin_name=pin_text_name,
pin_functions=pin_functions,
pin_subtext= '<ul><li>{}</li></ul>'.format('</li><li>'.join(pin_subtext)),
pin_text=load_md('pin/pin-{}.md'.format(pin_num)))
# if pin_text != None:
return pin_url, pin_text, pin_text_name # pages[pin_url] = pin_text
@ -276,14 +337,43 @@ def render_pin(pin_num, selected_url, overlay=None):
pin_type = list([x.strip() for x in pin['type'].lower().split('/')])
pin_url = pin['name']
pin_name = pin['name']
pin_used = False
pin_ground = False
pin_power = False
pin_regular = False
pin_link_title = []
bcm_pin = None
if overlay is not None and 'ground' in overlay and (
pin_num in overlay['ground'] or str(pin_num) in overlay['ground']):
if pin_num in overlay['ground']:
overlay_pin = overlay['ground'][pin_num]
else:
overlay_pin = overlay['ground'][str(pin_num)]
if overlay_pin is None:
overlay_pin = {}
pin_ground = True
if overlay is not None and 'power' in overlay and (
pin_num in overlay['power'] or str(pin_num) in overlay['power']):
if pin_num in overlay['power']:
overlay_pin = overlay['power'][pin_num]
else:
overlay_pin = overlay['power'][str(pin_num)]
if overlay_pin is None:
overlay_pin = {}
pin_power = True
if 'scheme' in pin:
if 'bcm' in pin['scheme']:
bcm_pin = 'bcm' + str(pin['scheme']['bcm'])
if overlay is not None and (
if overlay is not None and 'pin' in overlay and (
pin_num in overlay['pin'] or str(pin_num) in overlay['pin'] or bcm_pin in overlay['pin']):
if pin_num in overlay['pin']:
@ -296,7 +386,7 @@ def render_pin(pin_num, selected_url, overlay=None):
if overlay_pin is None:
overlay_pin = {}
pin_used = True
pin_regular = True
if 'name' in overlay_pin:
pin_name = overlay_pin['name']
@ -326,7 +416,11 @@ def render_pin(pin_num, selected_url, overlay=None):
if base_url + selected_url == pin_url:
selected = ' active'
if pin_used:
if pin_ground:
selected += ' overlay-ground'
if pin_power:
selected += ' overlay-power'
if pin_regular:
selected += ' overlay-pin'
pin_url = pin_url + url_suffix
@ -376,7 +470,7 @@ def get_lang_urls(src):
img_css = ' class="grayscale"'
url = alternate_urls[url_lang][src]
urls.append(
'<li><a href="{url}" rel="alternate" hreflang="{lang}"><img{css} src="{resource_url}{lang}.png" /></a>'.format(
'<a href="{url}" rel="alternate" hreflang="{lang}"><img{css} src="{resource_url}{lang}.png" /></a>'.format(
lang=url_lang,
url=url,
resource_url=resource_url,
@ -398,7 +492,7 @@ pinout.load(lang)
overlays = pinout.settings['overlays']
strings = pinout.get_setting('strings', {})
strings = pinout.get_string('strings', {})
if type(strings) == list:
_strings = {}
@ -414,8 +508,10 @@ base_url = pinout.get_setting('base_url', '/pinout/') # '/pinout-tr/pinout/'
resource_url = pinout.get_setting('resource_url', '/resources/') # '/pinout-tr/resources/'
url_suffix = pinout.get_setting('url_suffix', '') # '.html'
template_main = open('src/{}/template/layout.html'.format(lang)).read()
template_boards = open('src/{}/template/boards.html'.format(lang)).read()
template_main = open('common/page.html'.format(lang)).read()
template_boards = open('common/boards.html'.format(lang)).read()
template_footer = open('src/{}/template/footer.html'.format(lang)).read()
template_footer = open('src/{}/template/footer.html'.format(lang)).read()
pages = {}
navs = {}
@ -440,12 +536,14 @@ if not os.path.isdir('output/{}/pinout'.format(lang)):
except OSError:
exit('Failed to create output/{}/pinout dir'.format(lang))
print("\nRendering overlay pages...")
overlays = map(load_overlay, overlays)
overlay_subnav = ['featured']
featured_boards_count = 0
featured_boards_html = ''
boards_page = []
boards_manufacturers = []
'''
Build up the navigation between overlays. This needs to be done before rendering pages
@ -454,7 +552,8 @@ as it's used in every single page.
overlays_html is generated with all types for legacy reasons
'''
for overlay in overlays:
link = (overlay['page_url'], overlay['name'])
overlays_html += [link]
@ -485,18 +584,38 @@ for overlay in overlays:
if 'formfactor' not in overlay:
print('Warning! -> {name} missing formfactor'.format(name=overlay['name']))
'''if overlay['manufacturer'] not in boards_page.keys():
boards_page[overlay['manufacturer']] = []
boards_manufacturers.append(overlay['manufacturer'])'''
boards_page.append({'name': overlay['name'], 'html': '<li class="board" data-type="{type}" data-manufacturer="{manufacturer}" data-form-factor="{formfactor}"><a href="{base_url}{page_url}"><img src="{resource_url}boards/{image}" /><strong>{name}</strong></a></li>'.format(
image=image,
name=overlay['name'],
page_url=overlay['page_url'],
base_url=base_url,
type=overlay['type'] if 'type' in overlay else '',
formfactor=overlay['formfactor'] if 'formfactor' in overlay else '',
type=overlay['type'] if 'type' in overlay else strings['group_other'],
formfactor=overlay['formfactor'] if 'formfactor' in overlay else strings['form_undefined'],
manufacturer=overlay['manufacturer'],
resource_url=resource_url)})
boards_page = [x['html'] for x in sorted(boards_page, key=lambda k: k['name'])]
def interfaces_menu(current):
interfaces = [overlay for overlay in overlays if overlay['class'] == 'interface']
html = ''
for interface in interfaces:
sel = ''
if current is not None and 'name' in current and interface['name'] == current['name']:
sel = ' class="selected"'
html += '<li{}><a href="{}{}">{}</a></li>'.format(sel, base_url, interface['page_url'], interface['name'])
return html
boards_page = [x['html'] for x in sorted(boards_page, key=lambda k: k['name'].lower())]
pages['boards'] = {'rendered_html':''.join(boards_page)}
'''
Manually add the index page as 'pinout', this is due to how the
@ -507,7 +626,7 @@ serve.py will mirror this structure for testing.
'''
pages['index'] = {}
pages['index']['rendered_html'] = render_overlay_page({'name': 'Index', 'long_description': load_md('index.md')})
pages['index']['rendered_html'] = render_overlay_page({'name': 'Index', 'long_description': load_md('/template/index.md')})
default_nav = render_nav('pinout')
@ -516,14 +635,15 @@ navs['index'] = default_nav
'''
Add the 404 page if 404.md is present.
'''
page404 = load_md('404.md')
page404 = load_md('/template/404.md')
if page404 is not None:
pages['404'] = {}
pages['404']['rendered_html'] = render_overlay_page({'name': '404', 'long_description': page404})
navs['404'] = default_nav
pages['boards'] = {'rendered_html': ''.join(boards_page)}
crumbtrail = '<div id="crumbtrail"><p><a class="more" href="/boards">' + strings['browse_addons'] + ' &raquo;</a></p></div>'
navs['boards'] = default_nav
print('\nRendering pin pages...')
@ -538,26 +658,32 @@ for pin in range(1, len(pinout.pins) + 1):
pin_nav = render_nav(pin_url)
pin_html = pinout.render_html(template_main,
template_footer,
strings,
pinout.settings,
lang_links="\n\t\t".join(langlinks),
hreflang="\n\t\t".join(hreflang),
nav=pin_nav,
content=pin_html,
resource_url=resource_url,
overlays=overlays_html,
description=pinout.settings['default_desc'],
title=pin_title + pinout.settings['title_suffix'],
description=strings['default_desc'],
title=pin_title + strings['title_suffix'],
featured_boards=featured_boards_html,
langcode=lang,
nav_html=nav_html
nav_html=nav_html,
interfaces=interfaces_menu(None),
body_class='pin',
crumbtrail=crumbtrail
)
print('>> pinout/{}.html'.format(pin_url))
print('>> Saving: pinout/{}.html'.format(pin_url))
with open(os.path.join('output', lang, 'pinout', '{}.html'.format(pin_url)), 'w') as f:
f.write(pin_html)
print('\nRendering overlay and index pages...')
print('\nSaving overlay and index pages...')
for url in pages:
content = pages[url]['rendered_html']
@ -569,8 +695,9 @@ for url in pages:
template = template_boards if url == 'boards' else template_main
if url == 'index' or url == 'boards':
hreflang = get_hreflang_urls(url)
langlinks = get_lang_urls(url)
src = url
hreflang = get_hreflang_urls(src)
langlinks = get_lang_urls(src)
if 'src' in pages[url]:
src = pages[url]['src']
@ -578,19 +705,36 @@ for url in pages:
langlinks = get_lang_urls(src)
if not 'description' in pages[url]:
pages[url]['description'] = pinout.settings['default_desc']
pages[url]['description'] = strings['default_desc']
name = strings['default_title']
if 'name' in pages[url]:
pages[url]['name'] = pages[url]['name'] + pinout.settings['title_suffix']
else:
pages[url]['name'] = pinout.settings['default_title']
name = pages[url]['name'] + strings['title_suffix']
feat_boards_html = featured_boards_html
body_class = ''
crumbtrail = '<div id="crumbtrail"><p><a class="more" href="/boards">' + strings['browse_addons'] + ' &raquo;</a></p></div>'
if 'class' in pages[url] and pages[url]['class'] == 'board':
feat_boards_html = ''
body_class = 'board'
crumbtrail = '<div id="crumbtrail"><p><a href="/">{home}</a> &raquo; <a href="/boards">{boards}</a> &raquo; <a href="/boards#manufacturer={manufacturer}">{manufacturer}</a></p></div>'.format(
title=pages[url]['name'],
manufacturer=pages[url]['manufacturer'],
home=strings['home'],
boards=strings['boards']
)
if url == 'boards':
body_class = 'boards-page'
html = pinout.render_html(template,
template_footer,
strings,
pinout.settings,
lang_links="\n\t\t".join(langlinks),
hreflang="\n\t\t".join(hreflang),
nav=nav,
@ -598,16 +742,22 @@ for url in pages:
overlays=overlays_html,
resource_url=resource_url,
description=pages[url]['description'],
title=pages[url]['name'],
title=name,
featured_boards=feat_boards_html,
langcode=lang,
nav_html=nav_html
nav_html=nav_html,
interfaces=interfaces_menu(pages[url]),
body_class=body_class,
crumbtrail=crumbtrail
)
key = url
if url not in ['index','404','boards']:
url = os.path.join('pinout', url)
print('>> {}.html'.format(url))
if 'source' in pages[key]:
print('>> Saving: {src} => {url}.html'.format(url=url, src=pages[key]['source']))
with open(os.path.join('output', lang, '{}.html'.format(url)), 'w') as f:
f.write(html)

View File

@ -1,11 +1,18 @@
#!/usr/bin/env python
import json
import markdown
import unicodedata
import re
import sys
import pinout
import unicodedata
try:
import markdown
except ImportError:
exit("This script requires the psutil module\nInstall with: sudo pip install Markdown")
import markjaml
import pinout
reload(sys)
sys.setdefaultencoding('utf8')

Binary file not shown.

After

Width:  |  Height:  |  Size: 352 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

File diff suppressed because one or more lines are too long

Binary file not shown.

View File

@ -1,9 +1,17 @@
import json
import markdown
import yaml
import re
import unicodedata
try:
import markdown
except ImportError:
exit("This script requires the psutil module\nInstall with: sudo pip install Markdown")
try:
import yaml
except ImportError:
exit("This script requires the psutil module\nInstall with: sudo pip install PyYAML")
def slugify(value):
"""

View File

@ -1,29 +1,59 @@
import json
import yaml
import time
DB_FILE = 'pi-pinout.yaml'
try:
import yaml
except ImportError:
exit("This script requires the yaml module\nInstall with: sudo pip install PyYAML")
PINOUT_FILE = 'pinout.yaml'
SETTINGS_FILE = 'settings.yaml'
STRINGS_FILE = 'localised.yaml'
pins = None
settings = None
master_template = open('common/layout.html').read()
def get_setting(setting, default = None):
if setting in settings and settings[setting] != None:
return settings[setting]
return default
def get_string(string, default = None):
if string in strings and strings[string] != None:
return strings[string]
return default
def render_html(*args, **kwargs):
html = args[0]
html = master_template
html = html.replace('{{main_content}}',args[0])
html = html.replace('{{footer}}',args[1])
strings = args[2]
for key in strings:
if type(strings[key]) in [str, unicode]:
html = html.replace('{{strings:' + key + '}}', strings[key])
settings = args[3]
for key in settings:
if type(settings[key]) in [str, unicode]:
html = html.replace('{{settings:' + key + '}}', settings[key])
kwargs['v'] = str(int(time.time()))
for key in kwargs:
if type(kwargs[key]) == dict:
for d_key, d_value in kwargs[key].iteritems():
html = html.replace('{{' + key + '_' + d_key + '}}', d_value)
elif type(kwargs[key]) == str:
elif type(kwargs[key]) in [str, unicode]:
html = html.replace('{{' + key + '}}', kwargs[key])
return html
@ -69,15 +99,17 @@ def physical_to(pin, scheme='bcm'):
def load(lang='en'):
global pins, settings
if DB_FILE.endswith('.yaml'):
db = yaml.load(open('src/{}/{}'.format(lang, DB_FILE)).read())
else:
db = json.load(open('src/{}/{}'.format(lang, DB_FILE)))
global pins, settings, strings
if SETTINGS_FILE.endswith('.yaml'):
settings = yaml.load(open('src/{}/{}'.format(lang, SETTINGS_FILE)).read())
else:
settings = json.load(open('src/{}/{}'.format(lang, SETTINGS_FILE)))
pins = db['pins']
if STRINGS_FILE.endswith('.yaml'):
strings = yaml.load(open('src/{}/template/{}'.format(lang, STRINGS_FILE)).read())
else:
strings = json.load(open('src/{}/template/{}'.format(lang, STRINGS_FILE)))
if PINOUT_FILE.endswith('.yaml'):
pinout = yaml.load(open('src/{}/template/{}'.format(lang, PINOUT_FILE)).read())
else:
pinout = json.load(open('src/{}/template/{}'.format(lang, PINOUT_FILE)))
pins = pinout['pins']

8
requirements.txt Normal file
View File

@ -0,0 +1,8 @@
click
Flask
itsdangerous
Jinja2
Markdown
MarkupSafe
PyYAML
Werkzeug

View File

@ -1,5 +1,7 @@
jQuery(document).ready(function(){
var dom_boards = $('#boards .board');;
var dom_boards = $('#boards .board');
if(dom_boards.length == 0) return;
var facets = {};
var filters = {};
@ -115,7 +117,7 @@ jQuery(document).ready(function(){
for(var key in filters){
var selected = filters[key];
if(selected.length > 0){
hash.push(key + '=' + filters[key]);
hash.push(key + '=' + encodeURIComponent(filters[key]));
}
}
@ -127,7 +129,7 @@ jQuery(document).ready(function(){
for(var idx in hash){
var kv = hash[idx].replace('#','').split('=');
if(kv.length == 2 && typeof(filters[kv[0]]) != 'undefined'){
filters[kv[0]] = kv[1];
filters[kv[0]] = decodeURIComponent(kv[1]);
$('.item').each(function(idx,obj){
obj = $(obj);
if(obj.data('key') == kv[0] && obj.data('val') == kv[1]) obj.addClass('selected');

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 108 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 KiB

View File

Before

Width:  |  Height:  |  Size: 69 KiB

After

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 105 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 81 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 65 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

BIN
resources/boards/pijack.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 KiB

View File

Before

Width:  |  Height:  |  Size: 68 KiB

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 92 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 91 KiB

View File

Before

Width:  |  Height:  |  Size: 39 KiB

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

View File

@ -6,30 +6,34 @@ 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;}
table {text-align:left;font-size:13px;}
table.details {width:100%;}
table.details td, table.details th {border:none;font-size:16px;vertical-align:top;}
table.details img {margin-top:54px;}
table.pin-functions {width:100%;}
table.pin-functions td {width:16.6666%;}
.prettyprint {
word-wrap:break-word;
word-wrap:break-word;
}
.logo {
width:250px;
font-size:24px;
line-height:23px;
cursor:pointer;
position: absolute;
left:0px;
top:28px;
z-index:1;
font-weight:600;
width:250px;
font-size:24px;
line-height:23px;
cursor:pointer;
position: absolute;
left:0px;
top:28px;
z-index:1;
font-weight:600;
}
.logo a {color:#FFFFFF;}
.logo img {float:left;margin:0 13px;}
.logo img {float:left;margin:0 13px;top:8px;}
.logo a:hover span, .logo a:hover, .logo a:hover span.out {
color:#FFFFFF;
color:#FFFFFF;
}
img.grayscale {
@ -40,10 +44,10 @@ img.grayscale {
#container {
width:1000px;
margin:0 auto;
position:relative;
padding-top:4px;
width:1000px;
margin:0 auto;
position:relative;
padding-top:4px;
}
@ -52,43 +56,43 @@ Footer language nav
*/
#lang {
display:block;
overflow:hidden;
background:#C7C2AE;
position:absolute;
bottom:0px;
width:100%;
display:block;
overflow:hidden;
background:#C7C2AE;
position:absolute;
bottom:0px;
width:100%;
}
.lang-nav {
line-height:30px;
display:block;
overflow:hidden;
float:right;
margin:0;
padding:0;
margin-right:10px;
list-style:none;
line-height:30px;
display:block;
overflow:hidden;
float:right;
margin:0;
padding:0;
margin-right:10px;
list-style:none;
}
.lang-nav li {
margin:0;
padding:0;
float:left;
margin:0;
padding:0;
float:left;
}
.lang-nav li:last-child {
border-right:none;
padding-right:0px;
border-right:none;
padding-right:0px;
}
.lang-nav li a {
padding-left:10px;
color:#6D6D6D;
font-size:16px;
padding-left:10px;
color:#6D6D6D;
font-size:16px;
}
.lang-nav li a:hover {
color:#D6264E;
color:#D6264E;
}
/*
@ -96,49 +100,50 @@ Content Area
*/
#content {
float:left;
background:#EBE6D3;
width:500px;
min-height:640px;
position: relative;
padding-bottom:50px;
float:left;
background:#EBE6D3;
width:500px;
min-height:640px;
position: relative;
padding-bottom:50px;
}
.boards-page #content {
width:698px;
width:698px;
}
#content h1 {font-size:30px;}
#content h2 {font-size:20px;margin-top:20px;}
#content h1,h2,h3,h4,h5 {font-family:"Palatino Linotype", "Book Antiqua", Palatino, serif;}
#content article {
padding:15px;
padding:15px;
}
p.intro {
color:#268BD2;
color:#268BD2;
}
p,pre {
margin-top:10px;
font-size: 16px;
line-height: 150%;
margin-top:10px;
font-size: 16px;
line-height: 150%;
}
h3 {
color:#D33682;
font-size:22px;
font-weight:bold;
color:#D33682;
font-size:22px;
font-weight:bold;
}
article a {color:#859900;text-decoration:underline;}
article ul {margin-left:20px;margin-top:10px;margin-bottom:10px;}
/*
Drop down nav
Featured Boards
*/
#featured {
overflow:hidden;
background:#C32672;
overflow:hidden;
background:#C32672;
}
#featured .more {
@ -158,64 +163,52 @@ Drop down nav
line-height: 22px;
}
#featured .more:hover {
background:#D33682;
background:#D33682;
}
#featured ul {
overflow: hidden;
overflow: hidden;
}
#sections .featured, #boards .board, #featured .board {
box-sizing:border-box;
width:25%;
display:block;
float:left;
text-align:center;
#boards .board, #featured .board {
box-sizing:border-box;
width:25%;
display:block;
float:left;
text-align:center;
}
#featured .board {width:25%;}
#sections .group li.featured {
margin-right:0px;
}
#boards .board a, #featured .board a {
padding-top: 20px;
padding-bottom: 0px;
min-height: 190px;
display:block;
padding-top: 20px;
padding-bottom: 0px;
min-height: 190px;
display:block;
}
#featured .board a {
min-height:130px;
padding-top: 10px;
padding-bottom: 10px;
min-height:130px;
padding-top: 10px;
padding-bottom: 10px;
}
#sections .featured img, #boards .board img, #featured .board img {
max-width:80%;
height:auto;
display:block;
margin:0 auto;
#boards .board img, #featured .board img {
max-width:80%;
height:auto;
display:block;
margin:0 auto;
}
#featured .board img {max-width:50%;}
#sections .featured a, #boards .board a, #featured .board a {
background:none;
}
#sections .boards hr {
clear:both;
border:none;
border-top:3px solid #D33682;
margin-bottom:5px;
background:none;
#boards .board a, #featured .board a {
background:none;
}
#sections .boards .featured a:hover {
background: #D33682;
}
#featured .board a:hover {
background: #D33682;
background: #D33682;
}
#boards .board a:hover {
background: #fdfaf0;
background: #fdfaf0;
}
#sections .featured strong, #boards .board strong, #featured .board strong {
font-size:16px;
font-family: 'Avenir', sans-serif;
#boards .board strong, #featured .board strong {
font-size:16px;
font-family: 'Avenir', sans-serif;
font-weight: 500;
color:#FFFFFF;
margin: 0;
@ -223,10 +216,35 @@ Drop down nav
display:block;
}
#boards .board strong {
color:#333333;
color:#333333;
}
#sections .featured span, #boards .board span, #featured .board span {
#boards .title {
display: block;
width: auto;
background: rgb(244, 242, 232);
padding-left: 20px;
padding-top: 30px;
clear: both;
margin-bottom: 10px;
border-top: 10px solid #ebe6d3;
}
#boards h2 {
font-size: 20px;
margin: 0;
padding: 0;
display: inline-block;
padding: 10px 20px 0px 20px;
background: #ebe6d3;
border-top-left-radius: 10px;
border-top-right-radius: 10px;
position: relative;
height: 17px;
top: 5px;
}
#boards .board span, #featured .board span {
color: #FFFFFF;
font-size: 12px;
font-weight: normal;
@ -236,7 +254,7 @@ Drop down nav
}
.facets {
position: relative;
position: relative;
top: 90px;
padding: 4px 15px 15px 15px;
background: #073642;
@ -244,17 +262,17 @@ Drop down nav
border-bottom-right-radius: 10px;
margin-right: 18px;
}
.facets h4, .boards-page #interfaces h4 {
text-transform: capitalize;
font-size: 18px;
.facets h4 {
text-transform: capitalize;
font-size: 16px;
margin: 10px 0 0 0;
color:#ffffff;
}
.facets ul, .facets li {
margin:0;
padding:0;
list-style:none;
margin:0;
padding:0;
list-style:none;
}
.facets .facet li {
@ -264,14 +282,14 @@ Drop down nav
margin-right: 2px;
background: #859900;
color: #FFF;
font-size: 14px;
font-size: 13px;
line-height: 23px;
height: 22px;
cursor:pointer;
text-transform:capitalize;
}
.facets .facet li:hover, .facets .facet li.selected {
color: #859900;
color: #859900;
background: #FFF;
}
@ -279,15 +297,15 @@ Drop down nav
background: #D33682;
}
.facets .facet:nth-of-type(2) li:hover, .facets .facet:nth-of-type(2) li.selected {
color: #D33682;
color: #D33682;
background: #FFF;
}
.facets .facet:nth-of-type(1) li {
background: #268BD2;
background: #268BD2;
}
.facets .facet:nth-of-type(1) li:hover, .facets .facet:nth-of-type(1) li.selected {
color: #268BD2;
color: #268BD2;
background: #FFF;
}
@ -295,6 +313,8 @@ Drop down nav
Footer
*/
.footer {clear: both;padding: 20px 0px;text-align:center;}
.footer a {color:#5F8645;}
@ -303,289 +323,300 @@ Left Column
*/
#leftcolumn {
float:left;
width:500px;
float:left;
width:500px;
}
.boards-page #leftcolumn {
width:302px;
width:302px;
}
#crumbtrail {
background:#6c71c4;
}
#crumbtrail p {
color:#fff;
margin:0;
padding:5px 15px;
}
#crumbtrail a, #crumbtrail a:hover, #crumbtrail a:active {
color:#fff;
}
#crumbtrail a.more {
text-align:center;
display:block;
}
#crumbtrail a:hover {
text-decoration: underline;
}
#interfaces ul, #interfaces li {
list-style:none;
margin:0;
padding:0;
list-style:none;
margin:0;
padding:0;
}
#interfaces li{
display:inline-block;
display:inline-block;
}
#interfaces {
background:#6c71c4;
padding:4px 6px 6px 6px;
}
.boards-page #interfaces {
background:transparent;
padding: 4px 30px 5px 15px;
position: relative;
top: 100px;
background:#6c71c4;
padding: 10px;
width: 292px;
margin-top: 20px;
box-sizing: border-box;
border-top-right-radius:23px;
}
#interfaces li a {
display:inline-block;
padding:0px 10px 0px 10px;
margin-top:2px;
margin-right:2px;
background:#5c61b4;
color:#FFF;
font-size: 14px;
display:inline-block;
padding:0px 10px 0px 10px;
margin-top:2px;
margin-right:2px;
background:#5c61b4;
color:#FFF;
font-size: 14px;
line-height: 23px;
height: 22px;
}
#interfaces li a:hover {color: #5c61b4;background:#FFF;}
#interfaces h2 {
color:#063541;
font-size: 24px;
line-height: 23px;
font-family:'Avenir', sans-serif;
padding:10px 10px 5px 10px;
color: #fff;
font-size: 20px;
line-height: 20px;
font-family: "Palatino Linotype", "Book Antiqua", Palatino, serif;
padding: 0px 0px 5px 0px;
}
/*
GPIO nav
*/
nav#gpio {
position:relative;
width:292px;
background:#5F8645;
height:662px;
margin-right:208px;
border-top-right-radius:46px;
border-bottom-right-radius:46px;
nav {
position:relative;
width:292px;
background:#5F8645;
min-height:653px;
margin-right:208px;
border-top-right-radius:46px;
border-bottom-right-radius:46px;
}
.boards-page nav#gpio {
margin-right:0;
.boards-page nav {
margin-right:0;
}
nav#gpio:before, nav#gpio:after {
content:'';
display:block;
width:28px;
height:28px;
background:#FFFFFF;
border-radius:50%;
border:14px solid #F7DF84;
right:19px;
top:19px;
position: absolute;
nav:before, nav:after {
content:'';
display:block;
width:28px;
height:28px;
background:#FFFFFF;
border-radius:50%;
border:14px solid #F7DF84;
right:19px;
top:19px;
position: absolute;
}
nav#gpio:after {
top:586px;
nav:after {
top:auto;
bottom:19px;
}
.phys {
color:#002B36;
font-size:11px;
opacity:0.8;
position:absolute;
left:-33px;
color:#002B36;
font-size:12px;
opacity:0.8;
position:absolute;
left:30px;
text-indent:0;
}
.bottom .phys {
text-align:right;
left:auto;
right:30px;
text-align:right;
left:auto;
right:30px;
}
nav#gpio ul.top, nav#gpio ul.bottom {
position:absolute;
left:246px;
top:87px;
list-style:none;
}
nav#gpio ul.bottom {
left:0px;
#gpio ul {
position:absolute;
top:87px;
list-style:none;
}
nav#gpio ul.top li {text-indent:63px;}
nav#gpio ul.top li a, nav#gpio ul.bottom li a {
display:block;
width:244px;
position:relative;
font-size:14px;
line-height:23px;
height:22px;
margin-bottom:2px;
border-top-left-radius:13px;
border-bottom-left-radius:13px;
}
nav#gpio ul.top a {
width:250px;
}
nav#gpio ul.bottom li a {
border-top-right-radius:13px;
border-bottom-right-radius:13px;
border-top-left-radius:0px;
border-bottom-left-radius:0px;
#gpio .top {
left:246px;
}
nav#gpio li a small {font-size:11px;}
nav#gpio ul.top li a:hover,
nav#gpio ul.bottom li a:hover,
nav#gpio ul.top li.active a,
nav#gpio ul.bottom li.active a {
background:#063541;
color:#FFFFFF;
}
nav#gpio li a:hover .phys, nav#gpio li.active a .phys{
color:#FFFFFF;
#gpio .bottom {
left:0px;
}
nav#gpio li.overlay-pin a:hover .phys, nav#gpio li.overlay-pin a .phys {
color:#002B36;
#gpio .top li {text-indent:56px;}
#gpio a {
display:block;
position:relative;
font-size:15px;
line-height:23px;
height:22px;
margin-bottom:2px;
}
#gpio .top a {
width:250px;
border-top-left-radius:13px;
border-bottom-left-radius:13px;
}
#gpio .bottom a {
width:244px;
border-top-right-radius:13px;
border-bottom-right-radius:13px;
}
nav#gpio ul.bottom li a:hover,
nav#gpio ul.bottom li.active a {
background:#063541;
color:#FFF;
#gpio a:hover,
#gpio .active a {
background:rgb(245, 243, 237);
color:#063541;
}
#gpio .pin1 a:hover, #gpio .pin1.active a {border-radius:0;}
#gpio li a small {font-size:11px;}
#gpio .overlay-pin a {
background:rgb(235, 230, 211);
color:#063541;
}
#gpio .overlay-pin a:hover {
background:rgb(245, 243, 237);
color:#063541;
}
#gpio .overlay-power .phys {
color:#FFFFFF;
opacity:1;
}
#gpio .overlay-power a {
background:#073642;
color:#FFFFFF;
}
#gpio .overlay-ground .phys {
background:#073642;
color:#FFFFFF;
opacity:1;
position:absolute;
top:0px;
width:20px;
height:22px;
border-radius:11px;
text-indent: 0px;
line-height: 22px;
}
#gpio .bottom .overlay-ground .phys {
padding-right:32px;
right:0;
}
#gpio .top .overlay-ground .phys {
padding-left:31px;
left:0;
}
nav#gpio li.overlay-pin a,
nav#gpio ul.bottom li.overlay-pin a {
background:rgb(235, 230, 211);
color:#063541;
#gpio .overlay-power a:hover {
background:#268bd2;
}
#gpio .overlay-ground a:hover .phys {
background:#268bd2;
}
#gpio li.overlay-ground span.pin {background:#073642;}
article .pin-hover {cursor:help;}
article .pin-hover:hover {color:#880000;}
article img {max-width:100%;}
nav#gpio ul li.hover-pin a,
nav#gpio ul.bottom li.hover-pin a {
color:#FFF;
background:rgba(200,0,0,0.6);
#gpio ul li.hover-pin a,
#gpio ul.bottom li.hover-pin a {
color:#FFF;
background:rgba(200,0,0,0.6);
}
nav#gpio ul.bottom a {
text-indent:10px;
#gpio ul.bottom a {
text-indent:10px;
}
nav#gpio span.pin {
display:block;
border:1px solid transparent;
border-radius:50%;
width:16px;
height:16px;
background:#002B36;
position:absolute;
right:2px;
top:2px;
#gpio .pin {
display:block;
border:1px solid transparent;
border-radius:50%;
width:16px;
height:16px;
background:#002B36;
position:absolute;
right:2px;
top:2px;
}
nav#gpio span.pin:after {
content:'';
display:block;
border-radius:100%;
background:#FDF6E3;
position:absolute;
left:5px;
top:5px;
width:6px;
height:6px;
font-size:7px;
#gpio .pin:after {
content:'';
display:block;
border-radius:100%;
background:#FDF6E3;
position:absolute;
left:5px;
top:5px;
width:6px;
height:6px;
font-size:7px;
}
nav#gpio ul.top span.pin {
left:2px;
top:2px;
#gpio .top .pin {
left:2px;
top:2px;
}
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 li.pow5v span.pin {background:#DC322F;}
nav#gpio li.gpio span.pin {background:#859900;}
nav#gpio li.uart span.pin {background:#6c71c4;}
nav#gpio li.pow3v3 span.pin {background:#B58900;}
nav#gpio li.i2c span.pin {background:#268BD2;}
nav#gpio li.spi span.pin {background:#D33682;}
nav#gpio li.pin1 span.pin {border-radius:0;}
div#pinbase, div#pinbasebplus {width:58px;position:absolute;left:216px;}
.bottom .gnd a {color:rgba(233, 229, 210, 0.5);}
.bottom .gnd a:hover {color:rgba(6, 53, 65, 0.5);}
.top .gnd a {color:rgba(6, 53, 65, 0.5);}
div#pinbase {
height:324px;
background:#073642;
top:80px;
}
div#pinbasebplus {
height:177px;
background:#184753;
top:404px;
}
.pin27, .pin28 {margin-top:12px;}
#gpio .pin1 .pin {border-radius:0;}
#gpio .pow3v3 .pin {background:#B58900;}
#gpio .pow5v .pin {background:#DC322F;}
#gpio .gpio .pin {background:#859900;}
#gpio .i2c .pin {background:#268BD2;}
#gpio .spi .pin {background:#D33682;}
#gpio .uart .pin {background:#6c71c4;}
ul.legend {
float:right;
list-style:none;
margin-top:-26px;
#pinbase {
width:58px;
position:absolute;
left:216px;
height:493px;
background:#073642;
top:80px;
}
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;}
@media (min-width:1200px){
#container {
width:1200px;
}
.board {
right:1200px;
}
#sections ul .dropdown {
min-width:700px;
max-width:700px;
}
#content {
width:700px;
}
.boards-page #content {
width:898px;
}
#container {
width:1200px;
}
.board {
right:1200px;
}
#content {
width:700px;
}
.boards-page #content {
width:898px;
}
}

628
resources/pinout.scss Normal file
View File

@ -0,0 +1,628 @@
$base-font-size: 16px;
$color-purple: #6c71c4;
$color-pink: #D33682;
$color-green: #859900;
$color-red: #DC322F;
$color-yellow: #B58900;
$color-blue: #268BD2;
$color-dark: #073642;
$color-content-bg: #EBE6D3;
$nav-bg: #5F8645;
$overlay-pin-bg: rgb(235, 230, 211);
$overlay-pin-fg: #063541;
$overlay-pin-bg-hover: rgb(245, 243, 237);
$overlay-pin-fg-hover: $overlay-pin-fg;
ul, li, a, body, h1, h2, h3, h4, h5, h6, p {margin:0;padding:0;text-decoration:none;}
body {
font-family:'Avenir', sans-serif;
font-weight:500;
font-size:$base-font-size;
}
table {
margin:20px 0;
border-collapse:collapse;
text-align:left;
font-size:0.8em;
td, th {border:1px solid $color-dark;padding:5px;}
th {background:$color-dark;color:$color-content-bg;}
&.details {
width:100%;
td, th {
border:none;font-size:16px;vertical-align:top;
}
img {margin-top:54px;}
}
&.pin-functions {
width:100%;
td {width:16.6666%;}
}
}
.prettyprint {
word-wrap:break-word;
}
.logo {
width:250px;
font-size:1.5em;
line-height:23px;
cursor:pointer;
position: absolute;
left:0px;
top:28px;
z-index:1;
font-weight:600;
a {color:#FFFFFF;}
img {float:left;margin:0 10px;top:8px;}
a:hover span, a:hover, a:hover span.out {
color:#FFFFFF;
}
}
img.grayscale {
filter: url("data:image/svg+xml;utf8,&lt;svg xmlns=\'http://www.w3.org/2000/svg\'&gt;&lt;filter id=\'grayscale\'&gt;&lt;feColorMatrix type=\'matrix\' values=\'0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\'/&gt;&lt;/filter&gt;&lt;/svg&gt;#grayscale"); /* Firefox 10+, Firefox on Android */
filter: gray; /* IE6-9 */
-webkit-filter: grayscale(100%); /* Chrome 19+, Safari 6+, Safari 6+ iOS */
}
#container {
width:1000px;
margin:0 auto;
position:relative;
padding-top:4px;
}
/*
Footer language nav
*/
#lang {
display:block;
background:#C7C2AE;
position:absolute;
bottom:0px;
width:100%;
font-size:0;
text-align:right;
a {
display:inline-block;
margin:10px;
margin-left:0px;
}
}
/*
Content Area
*/
#content {
float:left;
background:$color-content-bg;
width:500px;
min-height:640px;
position: relative;
padding-bottom:50px;
hr {
border:none;
background:none;
border-top:2px solid darken($color-content-bg,10%);
}
h1 {font-size:1.8em;}
h2 {
font-size:1.2em;
margin-top:20px;
}
h1,h2,h3,h4,h5,h6 {font-family:"Palatino Linotype", "Book Antiqua", Palatino, serif;}
p, pre {
margin-top:10px;
font-size: 1em;
line-height: 150%;
}
h3 {
color:$color-pink;
font-size:1.4em;
font-weight:bold;
}
article {
padding:15px;
.pin-hover {cursor:help;}
.pin-hover:hover {color:#880000;}
img {max-width:100%;}
a {
color:$color-green;
text-decoration:underline;
&:hover {text-decoration:none;}
}
ul {margin-left:20px;margin-top:10px;margin-bottom:10px;}
}
}
/*
Boards Page
*/
#boards .board, #featured .board {
box-sizing:border-box;
width:25%;
display:block;
float:left;
text-align:center;
a {
padding-top: 20px;
padding-bottom: 0px;
min-height: 190px;
display:block;
background:none;
}
img {
max-width:80%;
height:auto;
display:block;
margin:0 auto;
}
strong {
font-size:1em;
font-family: 'Avenir', sans-serif;
font-weight: 500;
color:#FFFFFF;
margin: 0;
padding: 0 5px;
display:block;
}
span {
color: #FFFFFF;
font-size: 0.75em;
font-weight: normal;
margin: 0;
padding: 0 5px;
display:block;
}
}
#boards .board {
a:hover {
background: lighten($color-content-bg,5%);
}
strong {
color:#333333;
}
}
.facets {
position: relative;
top: 90px;
padding: 4px 15px 15px 15px;
background: $color-dark;
border-top-right-radius: 10px;
border-bottom-right-radius: 10px;
margin-right: 18px;
h4 {
text-transform: capitalize;
font-size: 1em;
margin: 10px 0 0 0;
color:#ffffff;
}
ul, li {
margin:0;
padding:0;
list-style:none;
}
.facet li {
display: inline-block;
padding: 0px 10px 0px 10px;
margin-top: 2px;
margin-right: 2px;
background: $color-green;
color: #FFF;
font-size: 0.8em;
line-height: 23px;
height: 22px;
cursor:pointer;
text-transform:capitalize;
&:hover, &.selected {
color: $color-green;
background: #FFF;
}
}
.facet:nth-of-type(2) li {
background: $color-pink;
}
.facet:nth-of-type(2) li:hover, .facet:nth-of-type(2) li.selected {
color: $color-pink;
background: #FFF;
}
.facet:nth-of-type(1) li {
background: $color-blue;
}
.facet:nth-of-type(1) li:hover, .facet:nth-of-type(1) li.selected {
color: $color-blue;
background: #FFF;
}
}
/*
Featured Boards
*/
#featured {
overflow:hidden;
background:#C32672;
ul {
overflow: hidden;
}
.board {
width:25%;
a {
min-height:130px;
padding-top: 10px;
padding-bottom: 10px;
&:hover {
background: $color-pink;
}
}
img {max-width:50%;}
}
}
/*
Footer
*/
.footer {
clear: both;
padding: 20px 0px;
text-align:center;
a {color:#5F8645;}
}
/*
Left Column
*/
#leftcolumn {
float:left;
width:500px;
}
#crumbtrail {
background:$color-dark;
p {
color:#fff;
margin:0;
padding:5px 15px;
}
a, a:hover, a:active {
color:#fff;
}
a.more {
text-align:center;
display:block;
}
a:hover {
text-decoration: underline;
}
}
#interfaces {
background: $color-purple;
padding: 0px 0px 2px 2px;
display: block;
clear: both;
line-height: 2px;
text-align:right;
ul, li {
list-style:none;
margin:0;
padding:0;
}
li {
display:inline-block;
a {
display:inline-block;
padding:3px 10px 3px 10px;
margin-top:2px;
margin-right:2px;
background:darken($color-purple,5%);
color:#FFF;
font-size: 0.9em;
line-height: 1.45em;
&:hover {color: darken($color-purple,5%);background:mix($color-purple,#FFF,20%);}
}
&.selected a {
background:darken($color-purple,10%);
color:#FFF;
text-decoration: underline;
}
}
}
/*
GPIO nav
*/
nav {
position:relative;
width:292px;
background:$nav-bg;
min-height:653px;
margin-right:208px;
border-top-right-radius:46px;
border-bottom-right-radius:46px;
&:before, &:after {
content:'';
display:block;
width:28px;
height:28px;
background:#FFFFFF;
border-radius:50%;
border:14px solid #F7DF84;
right:19px;
top:19px;
position: absolute;
}
&:after {
top:auto;
bottom:19px;
}
}
#gpio {
ul {
position:absolute;
top:87px;
list-style:none;
}
a {
display:block;
position:relative;
font-size:1em;
line-height:23px;
height:22px;
margin-bottom:2px;
}
.phys {
color:$color-dark;
font-size:0.8em;
opacity:0.8;
position:absolute;
left:30px;
text-indent:0;
}
.pin {
display:block;
border:1px solid transparent;
border-radius:50%;
width:16px;
height:16px;
background:#002B36;
position:absolute;
right:2px;
top:2px;
&:after {
content:'';
display:block;
border-radius:100%;
background:#FDF6E3;
position:absolute;
left:5px;
top:5px;
width:6px;
height:6px;
}
}
.top {
left:246px;
li {text-indent:56px;}
a {
color:#063541;
width:250px;
border-top-left-radius:13px;
border-bottom-left-radius:13px;
}
.overlay-ground .phys {
padding-left:31px;
left:0;
}
.pin {
left:2px;
top:2px;
}
.gnd a {color:rgba(6, 53, 65, 0.5);}
}
.bottom {
left:0px;
a {
text-indent:10px;
color:#E9E5D2;
width:244px;
border-top-right-radius:13px;
border-bottom-right-radius:13px;
}
.overlay-ground .phys {
padding-right:32px;
right:0;
}
.phys {
text-align:right;
left:auto;
right:30px;
}
.gnd a {
color:rgba(233, 229, 210, 0.5);
&:hover {color:rgba(6, 53, 65, 0.5);}
}
}
a:hover,
.active a {
background:rgb(245, 243, 237);
color:#063541;
}
li a small {font-size:0.7em;}
.overlay-pin {
a {
background:$overlay-pin-bg;
color:$overlay-pin-fg;
&:hover {
background:$overlay-pin-bg-hover;
color:$overlay-pin-fg-hover;
}
}
&.gnd a {
color:rgba(6, 53, 65, 0.5);
}
}
.overlay-power {
.phys {
color:#FFFFFF;
opacity:1;
}
a {
background:$color-dark;
color:#FFFFFF;
&:hover {
background:$color-blue;
}
}
}
.overlay-ground {
.phys {
background:$color-dark;
color:#FFFFFF;
opacity:1;
position:absolute;
top:0px;
width:20px;
height:22px;
border-radius:11px;
text-indent: 0px;
line-height: 22px;
}
a:hover .phys {
background:$color-blue;
}
span.pin {background:$color-dark;}
}
ul li.hover-pin a,
.bottom li.hover-pin a {
color:#FFF;
background:rgba(200,0,0,0.6);
}
.pin1 a:hover, .pin1.active a, .pin1 .pin {border-radius:0;}
.pow3v3 .pin {background:$color-yellow;}
.pow5v .pin {background:$color-red;}
.gpio .pin {background:$color-green;}
.i2c .pin {background:$color-blue;}
.spi .pin {background:$color-pink;}
.uart .pin {background:$color-purple;}
}
#pinbase {
width:58px;
position:absolute;
left:216px;
height:493px;
background:$color-dark;
top:80px;
}
.boards-page {
nav {
margin-right:0;
}
#leftcolumn {
width:302px;
}
#content {
width:698px;
}
}
@media (min-width:1200px){
#container {
width:1200px;
}
.board {
right:1200px;
}
#content {
width:700px;
}
.boards-page #content {
width:898px;
}
}

480
resources/pinout.scss.css Normal file
View File

@ -0,0 +1,480 @@
ul, li, a, body, h1, h2, h3, h4, h5, h6, p {
margin: 0;
padding: 0;
text-decoration: none; }
body {
font-family: 'Avenir', sans-serif;
font-weight: 500;
font-size: 16px; }
table {
margin: 20px 0;
border-collapse: collapse;
text-align: left;
font-size: 0.8em; }
table td, table th {
border: 1px solid #073642;
padding: 5px; }
table th {
background: #073642;
color: #EBE6D3; }
table.details {
width: 100%; }
table.details td, table.details th {
border: none;
font-size: 16px;
vertical-align: top; }
table.details img {
margin-top: 54px; }
table.pin-functions {
width: 100%; }
table.pin-functions td {
width: 16.6666%; }
.prettyprint {
word-wrap: break-word; }
.logo {
width: 250px;
font-size: 1.5em;
line-height: 23px;
cursor: pointer;
position: absolute;
left: 0px;
top: 28px;
z-index: 1;
font-weight: 600; }
.logo a {
color: #FFFFFF; }
.logo img {
float: left;
margin: 0 10px;
top: 8px; }
.logo a:hover span, .logo a:hover, .logo a:hover span.out {
color: #FFFFFF; }
img.grayscale {
filter: url("data:image/svg+xml;utf8,&lt;svg xmlns='http://www.w3.org/2000/svg'&gt;&lt;filter id='grayscale'&gt;&lt;feColorMatrix type='matrix' values='0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0'/&gt;&lt;/filter&gt;&lt;/svg&gt;#grayscale");
/* Firefox 10+, Firefox on Android */
filter: gray;
/* IE6-9 */
-webkit-filter: grayscale(100%);
/* Chrome 19+, Safari 6+, Safari 6+ iOS */ }
#container {
width: 1000px;
margin: 0 auto;
position: relative;
padding-top: 4px; }
/*
Footer language nav
*/
#lang {
display: block;
background: #C7C2AE;
position: absolute;
bottom: 0px;
width: 100%;
font-size: 0;
text-align: right; }
#lang a {
display: inline-block;
margin: 10px;
margin-left: 0px; }
/*
Content Area
*/
#content {
float: left;
background: #EBE6D3;
width: 500px;
min-height: 640px;
position: relative;
padding-bottom: 50px; }
#content hr {
border: none;
background: none;
border-top: 2px solid #dbd2b0; }
#content h1 {
font-size: 1.8em; }
#content h2 {
font-size: 1.2em;
margin-top: 20px; }
#content h1, #content h2, #content h3, #content h4, #content h5, #content h6 {
font-family: "Palatino Linotype", "Book Antiqua", Palatino, serif; }
#content p, #content pre {
margin-top: 10px;
font-size: 1em;
line-height: 150%; }
#content h3 {
color: #D33682;
font-size: 1.4em;
font-weight: bold; }
#content article {
padding: 15px; }
#content article .pin-hover {
cursor: help; }
#content article .pin-hover:hover {
color: #880000; }
#content article img {
max-width: 100%; }
#content article a {
color: #859900;
text-decoration: underline; }
#content article a:hover {
text-decoration: none; }
#content article ul {
margin-left: 20px;
margin-top: 10px;
margin-bottom: 10px; }
/*
Boards Page
*/
#boards .board, #featured .board {
box-sizing: border-box;
width: 25%;
display: block;
float: left;
text-align: center; }
#boards .board a, #featured .board a {
padding-top: 20px;
padding-bottom: 0px;
min-height: 190px;
display: block;
background: none; }
#boards .board img, #featured .board img {
max-width: 80%;
height: auto;
display: block;
margin: 0 auto; }
#boards .board strong, #featured .board strong {
font-size: 1em;
font-family: 'Avenir', sans-serif;
font-weight: 500;
color: #FFFFFF;
margin: 0;
padding: 0 5px;
display: block; }
#boards .board span, #featured .board span {
color: #FFFFFF;
font-size: 0.75em;
font-weight: normal;
margin: 0;
padding: 0 5px;
display: block; }
#boards .board a:hover {
background: #f3f0e5; }
#boards .board strong {
color: #333333; }
.facets {
position: relative;
top: 90px;
padding: 4px 15px 15px 15px;
background: #073642;
border-top-right-radius: 10px;
border-bottom-right-radius: 10px;
margin-right: 18px; }
.facets h4 {
text-transform: capitalize;
font-size: 1em;
margin: 10px 0 0 0;
color: #ffffff; }
.facets ul, .facets li {
margin: 0;
padding: 0;
list-style: none; }
.facets .facet li {
display: inline-block;
padding: 0px 10px 0px 10px;
margin-top: 2px;
margin-right: 2px;
background: #859900;
color: #FFF;
font-size: 0.8em;
line-height: 23px;
height: 22px;
cursor: pointer;
text-transform: capitalize; }
.facets .facet li:hover, .facets .facet li.selected {
color: #859900;
background: #FFF; }
.facets .facet:nth-of-type(2) li {
background: #D33682; }
.facets .facet:nth-of-type(2) li:hover, .facets .facet:nth-of-type(2) li.selected {
color: #D33682;
background: #FFF; }
.facets .facet:nth-of-type(1) li {
background: #268BD2; }
.facets .facet:nth-of-type(1) li:hover, .facets .facet:nth-of-type(1) li.selected {
color: #268BD2;
background: #FFF; }
/*
Featured Boards
*/
#featured {
overflow: hidden;
background: #C32672; }
#featured ul {
overflow: hidden; }
#featured .board {
width: 25%; }
#featured .board a {
min-height: 130px;
padding-top: 10px;
padding-bottom: 10px; }
#featured .board a:hover {
background: #D33682; }
#featured .board img {
max-width: 50%; }
/*
Footer
*/
.footer {
clear: both;
padding: 20px 0px;
text-align: center; }
.footer a {
color: #5F8645; }
/*
Left Column
*/
#leftcolumn {
float: left;
width: 500px; }
#crumbtrail {
background: #073642; }
#crumbtrail p {
color: #fff;
margin: 0;
padding: 5px 15px; }
#crumbtrail a, #crumbtrail a:hover, #crumbtrail a:active {
color: #fff; }
#crumbtrail a.more {
text-align: center;
display: block; }
#crumbtrail a:hover {
text-decoration: underline; }
#interfaces {
background: #6c71c4;
padding: 0px 0px 2px 2px;
display: block;
clear: both;
line-height: 2px;
text-align: right; }
#interfaces ul, #interfaces li {
list-style: none;
margin: 0;
padding: 0; }
#interfaces li {
display: inline-block; }
#interfaces li a {
display: inline-block;
padding: 3px 10px 3px 10px;
margin-top: 2px;
margin-right: 2px;
background: #5a5fbd;
color: #FFF;
font-size: 0.9em;
line-height: 1.45em; }
#interfaces li a:hover {
color: #5a5fbd;
background: #e2e3f3; }
#interfaces li.selected a {
background: #484fb5;
color: #FFF;
text-decoration: underline; }
/*
GPIO nav
*/
nav {
position: relative;
width: 292px;
background: #5F8645;
min-height: 653px;
margin-right: 208px;
border-top-right-radius: 46px;
border-bottom-right-radius: 46px; }
nav:before, nav:after {
content: '';
display: block;
width: 28px;
height: 28px;
background: #FFFFFF;
border-radius: 50%;
border: 14px solid #F7DF84;
right: 19px;
top: 19px;
position: absolute; }
nav:after {
top: auto;
bottom: 19px; }
#gpio ul {
position: absolute;
top: 87px;
list-style: none; }
#gpio a {
display: block;
position: relative;
font-size: 1em;
line-height: 23px;
height: 22px;
margin-bottom: 2px; }
#gpio .phys {
color: #073642;
font-size: 0.8em;
opacity: 0.8;
position: absolute;
left: 30px;
text-indent: 0; }
#gpio .pin {
display: block;
border: 1px solid transparent;
border-radius: 50%;
width: 16px;
height: 16px;
background: #002B36;
position: absolute;
right: 2px;
top: 2px; }
#gpio .pin:after {
content: '';
display: block;
border-radius: 100%;
background: #FDF6E3;
position: absolute;
left: 5px;
top: 5px;
width: 6px;
height: 6px; }
#gpio .top {
left: 246px; }
#gpio .top li {
text-indent: 56px; }
#gpio .top a {
color: #063541;
width: 250px;
border-top-left-radius: 13px;
border-bottom-left-radius: 13px; }
#gpio .top .overlay-ground .phys {
padding-left: 31px;
left: 0; }
#gpio .top .pin {
left: 2px;
top: 2px; }
#gpio .top .gnd a {
color: rgba(6, 53, 65, 0.5); }
#gpio .bottom {
left: 0px; }
#gpio .bottom a {
text-indent: 10px;
color: #E9E5D2;
width: 244px;
border-top-right-radius: 13px;
border-bottom-right-radius: 13px; }
#gpio .bottom .overlay-ground .phys {
padding-right: 32px;
right: 0; }
#gpio .bottom .phys {
text-align: right;
left: auto;
right: 30px; }
#gpio .bottom .gnd a {
color: rgba(233, 229, 210, 0.5); }
#gpio .bottom .gnd a:hover {
color: rgba(6, 53, 65, 0.5); }
#gpio a:hover,
#gpio .active a {
background: #f5f3ed;
color: #063541; }
#gpio li a small {
font-size: 0.7em; }
#gpio .overlay-pin a {
background: #ebe6d3;
color: #063541; }
#gpio .overlay-pin a:hover {
background: #f5f3ed;
color: #063541; }
#gpio .overlay-pin.gnd a {
color: rgba(6, 53, 65, 0.5); }
#gpio .overlay-power .phys {
color: #FFFFFF;
opacity: 1; }
#gpio .overlay-power a {
background: #073642;
color: #FFFFFF; }
#gpio .overlay-power a:hover {
background: #268BD2; }
#gpio .overlay-ground .phys {
background: #073642;
color: #FFFFFF;
opacity: 1;
position: absolute;
top: 0px;
width: 20px;
height: 22px;
border-radius: 11px;
text-indent: 0px;
line-height: 22px; }
#gpio .overlay-ground a:hover .phys {
background: #268BD2; }
#gpio .overlay-ground span.pin {
background: #073642; }
#gpio ul li.hover-pin a,
#gpio .bottom li.hover-pin a {
color: #FFF;
background: rgba(200, 0, 0, 0.6); }
#gpio .pin1 a:hover, #gpio .pin1.active a, #gpio .pin1 .pin {
border-radius: 0; }
#gpio .pow3v3 .pin {
background: #B58900; }
#gpio .pow5v .pin {
background: #DC322F; }
#gpio .gpio .pin {
background: #859900; }
#gpio .i2c .pin {
background: #268BD2; }
#gpio .spi .pin {
background: #D33682; }
#gpio .uart .pin {
background: #6c71c4; }
#pinbase {
width: 58px;
position: absolute;
left: 216px;
height: 493px;
background: #073642;
top: 80px; }
.boards-page nav {
margin-right: 0; }
.boards-page #leftcolumn {
width: 302px; }
.boards-page #content {
width: 698px; }
@media (min-width: 1200px) {
#container {
width: 1200px; }
.board {
right: 1200px; }
#content {
width: 700px; }
.boards-page #content {
width: 898px; } }

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB

View File

@ -1,6 +1,13 @@
#!/usr/bin/env python
from flask import Flask, send_from_directory
import sys
try:
from flask import Flask, send_from_directory
except ImportError:
exit("This script requires the psutil module\nInstall with: sudo pip install Flask")
app = Flask(__name__)
lang = 'en'

View File

@ -1,41 +0,0 @@
#Pinout Overlays
A Pinout overlay describes the functions of the Raspberry Pi pins for a specific board.
An overlay is constructed from a JSON file and, optionally, a markdown file containing an extended long-description.
##JSON Format
The JSON overlay file must include a name, manufacturer name, URL, description and a "pin" array defining all the
pins that the board uses.
If a counterpart .md file is present in description/overlay it will be used for the long 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 a "mode" flag, which defines the pin as an "input" or an "output".
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": "Explorer HAT",
"manufacturer": "Pimoroni",
"url": "https://github.com/pimoroni/pibrella",
"description": "An all-in-one light, input and output add-on board.",
"pin": {
"7": {
"name": "Green LED"
},
"11": {
"name": "Yellow LED"
}
}
}
```

View File

@ -1,51 +0,0 @@
<!--
---
name: Arduino SPI
description: Program Arduino with Raspberry Pi SPI
pin:
19:
name: MOSI
direction: output
active: high
description: Master Out / Slave In
21:
name: MISO
direction: input
active: high
description: Master In / Slave Out
23:
name: SCKL
direction: output
active: high
description: Clock
24:
name: CE0
direction: output
active: high
description: Arduino Reset
-->
#ATmega 328p / Arduino over SPI
###Did you know that your Pi could power and program an ATmega 328p/Arduino directly, with nothing but a few wires, a breadboard, a 16Mhz crystal oscillator and some 22pF capacitors?
Read my [complete Pico PiDuino tutorial](http://pi.gadgetoid.com/article/building-the-pico-piduino) to get started for just over &pound;5
You'll need to install [Gordon's modified AVRDude](https://projects.drogon.net/raspberry-pi/gertboard/arduino-ide-installation-isp/).
Connect 8/CEO to your ATmega's Reset/RST pin, 9/MISO to its MISO pin (D12), 10 to its MOSI pin (D11) and 11/SCLK to its SCLK pin (D13).
Power your ATmega with the 3.3v and GND pins from your Pi, and you're good to go.
Make sure you have no rogue SPI device drivers running and check it's connected correctly using:
```bash
avrdude -p m328p -c gpio
```
To get started compiling Arduino sketches from the command line, first:
```bash
sudo apt-get install arduino arduino-mk
```
Then refer to this [article](http://pi.gadgetoid.com/article/programming-your-pico-piduino) for a complete run-through of the process!

View File

@ -1,10 +1,22 @@
<!--
---
name: Display-o-Tron HAT
class: board
type: alle
formfactor: HAT
manufacturer: Pimoroni
url: https://github.com/pimoroni/dot3k
description: Ein 3-zeiliges LCD mit einer 6-Zonen RGB Hintergrundbeleuchtung und 6 Tasten
url: https://shop.pimoroni.com/products/display-o-tron-hat
github: https://github.com/pimoroni/dot3k
buy: https://shop.pimoroni.com/products/display-o-tron-hat
image: 'display-o-tron-hat.png'
pincount: 40
eeprom: yes
power:
'1':
'2':
ground:
'6':
pin:
3:
mode: i2c
@ -38,7 +50,7 @@ Beide Busse können aber weiterhin noch mit anderen Komponenten genutzt werden.
Mit diesem Einzeiler installierst Du den Display-o-Tron HAT:
```bash
curl get.pimoroni.com/dot3k | bash
curl -sS https://get.pimoroni.com/dot3k | bash
```
...den Rest findest Du in der Anleitung auf Github :-)

View File

@ -1,23 +1,22 @@
<!--
---
name: Display-o-Tron 3000
class: board
type: alle
formfactor: Andere
manufacturer: Pimoroni
github: https://github.com/pimoroni/dot3k
url: https://github.com/pimoroni/dot3k
description: Ein 3-zeiliges LCD mit RGB Hintergrundbeleuchtung und Joystick
install:
'devices':
- 'i2c'
- 'spi'
'apt':
- 'python-smbus'
- 'python3-smbus'
- 'python-dev'
- 'python3-dev'
'python':
- 'dot3k'
'examples': 'python/examples/'
url: https://shop.pimoroni.com/products/displayotron-3000
github: https://github.com/pimoroni/dot3k
buy: https://shop.pimoroni.com/products/displayotron-3000
image: 'display-o-tron.png'
pincount: 26
eeprom: no
power:
'2':
'17':
ground:
'6':
pin:
3:
mode: i2c
@ -57,7 +56,7 @@ pin:
Mit diesem Einzeiler installierst Du das Display-o-Tron 3000:
```bash
curl get.pimoroni.com/dot3k | bash
curl -sS https://get.pimoroni.com/dot3k | bash
```
...den Rest findest Du in der Anleitung auf Github :-)

View File

@ -1,28 +1,17 @@
<!--
---
name: Explorer HAT Pro
class: board
type: alle
formfactor: HAT
manufacturer: Pimoroni
url: https://github.com/pimoroni/explorer-hat
description: Eine Platine mit LEDs, Ein- und Ausgängen, Motorsteuerung, Sensor-Tasten und Steckbrett.
url: http://shop.pimoroni.com/products/explorer-hat
github: https://github.com/pimoroni/explorer-hat
buy: http://shop.pimoroni.com/products/explorer-hat
description: Eine Platine mit LEDs, Ein- und Ausgängen, Motorsteuerung, Sensor-Tasten und Steckbrett.
install:
'apt':
- 'python-smbus'
- 'python3-smbus'
- 'python-dev'
- 'python3-dev'
'python':
- 'explorerhat'
'examples': 'examples/'
image: 'explorer-hat-pro.png'
pincount: 40
i2c:
'0x28':
name: Cap Touch
device: cap1208
'0x48':
name: Analog Input
device: ads1015
eeprom: yes
pin:
'3': {}
'5': {}
@ -97,6 +86,13 @@ pin:
name: Motor 2 +
mode: output
active: high
i2c:
'0x28':
name: Cap Touch
device: cap1208
'0x48':
name: Analog Input
device: ads1015
-->
#Explorer HAT und Explorer HAT Pro

View File

@ -1,25 +1,17 @@
<!--
---
name: Explorer HAT
class: board
type: alle
formfactor: HAT
manufacturer: Pimoroni
url: https://github.com/pimoroni/explorer-hat
description: Eine Platine mit LEDs, Ein- und Ausgängen, Sensor-Tasten und Steckbrett.
url: http://shop.pimoroni.com/products/explorer-hat
github: https://github.com/pimoroni/explorer-hat
buy: http://shop.pimoroni.com/products/explorer-hat
description: Eine Platine mit LEDs, Ein- und Ausgängen, Sensor-Tasten und Steckbrett.
install:
'devices':
- 'i2c'
'apt':
- 'python-smbus'
- 'python3-smbus'
- 'python-dev'
- 'python3-dev'
'python':
- 'explorerhat'
'python3':
- 'explorerhat'
'examples': 'examples/'
image: 'explorer-hat.png'
pincount: 40
eeprom: yes
pin:
'7':
name: LED 1

View File

@ -1,6 +1,8 @@
<!--
---
name: Masse (Ground)
class: interface
type: pinout
description: Raspberry Pi Masse Pins
pin:
'6':
@ -12,7 +14,7 @@ pin:
'34':
'39':
-->
#Masse (Ground)
#Masse
Die Masseanschlüsse des Raspberry Pi sind alle miteinander verbunden. Es ist also egal, welchen
Du verwendets.

View File

@ -1,7 +1,10 @@
<!--
---
name: I2C
class: interface
type: pinout
description: Raspberry Pi I2C Anschlüsse
url: http://www.raspberry-projects.com/pi/programming-in-python/i2c-programming-in-python/using-the-i2c-interface-2
pin:
'3':
name: Data
@ -47,4 +50,4 @@ DEVICE_BUS = 1
DEVICE_ADDR = 0x15
bus = smbus.SMBus(DEVICE_BUS)
bus.write_byte_data(DEVICE_ADDR, 0x00, 0x01)
```
```

View File

@ -1,19 +1,17 @@
<!--
---
name: Piano HAT
class: board
type: alle
formfactor: HAT
manufacturer: Pimoroni
url: https://github.com/pimoroni/piano-hat
description: Ein kleines Pi Piano mit 16 berührungsempfindlichen Tasten
url: https://shop.pimoroni.com/products/piano-hat
github: https://github.com/pimoroni/piano-hat
buy: https://shop.pimoroni.com/products/piano-hat
image: 'piano-hat.png'
pincount: 40
i2c:
'0x28':
name: Cap Touch A
device: cap1188
datasheet: http://ww1.microchip.com/downloads/en/DeviceDoc/CAP1188%20.pdf
'0x2b':
name: Cap Touch B
device: cap1188
datasheet: http://ww1.microchip.com/downloads/en/DeviceDoc/CAP1188%20.pdf
eeprom: yes
pin:
3:
mode: i2c
@ -31,6 +29,13 @@ pin:
15:
name: Reset B
mode: output
i2c:
'0x28':
name: Cap Touch A
device: cap1188
'0x2b':
name: Cap Touch B
device: cap1188
-->
#Piano HAT
@ -41,7 +46,7 @@ Der HAT benutzt zwei Microchip CAP1188 ICs mit den I2C Adressen 0x28 und 0x2b.
Mit folgendem Einzeiler installierst Du die nötige Software:
```bash
curl get.pimoroni.com/pianohat | bash
curl -sS https://get.pimoroni.com/pianohat | bash
```
Den Rest findest Du in der Anleitung!

View File

@ -1,49 +0,0 @@
<!--
---
name: PiBorg LEDBorg
description: A single RGB LED for your Raspberry Pi
buy: https://www.piborg.org/ledborg
pincount: 26
pin:
'11':
name: Red LED
direction: output
active: high
description: PiBorg Red LED
'13':
name: Green LED
direction: input
active: high
description: PiBorg Green LED
'15':
name: Blue LED
direction: output
active: high
description: PiBorg Blue LED
-->
###The PiBorg LedBorg is an ultra-bright RGB LED board for the Raspberry Pi.
PiBorg has its own driver, so you don't need to drive it manually.
If you want a much, much wider range of colours, though, you can drive it manually using softPwm in WiringPi. The pin assignments for this are as follows:
WiringPi pin 0: Red LED
WiringPi pin 2: Green LED
WiringPi pin 3: Blue LED
This is easy using WiringPi in Python:
```python
import wiringpi2 as wiringpi
wiringpi.wiringPiSetup()
wiringpi.softPwmCreate(0,0,100)
wiringpi.softPwmCreate(2,0,100)
wiringpi.softPwmCreate(3,0,100)
# Purple!
wiringpi.softPwmWrite(3,100) # Full Blue
wiringpi.softPwmWrite(0,100) # Full Red
wiringpi.softPWMWrite(2,0) # No Green
```

View File

@ -1,10 +1,17 @@
<!--
---
name: Pibrella
manufacturer: Pimoroni Vs Cyntech
url: https://github.com/pimoroni/pibrella
class: board
type: alle
formfactor: Andere
manufacturer: Cyntech
description: eine "Alles-in-Einem" Licht, Ton, Ein- und Ausgabe Erweiterungsplatine.
url: http://pibrella.com
github: https://github.com/pimoroni/pibrella
buy: https://shop.cyntech.co.uk/products/pibrella?variant=581387897
image: 'pibrella.png'
pincount: 26
eeprom: no
pin:
'7':
name: Green LED

View File

@ -1,16 +0,0 @@
<!--
---
name: PiGlow
manufacturer: Pimoroni
url: https://github.com/pimoroni/piglow
github: https://github.com/pimoroni/piglow
buy: http://shop.pimoroni.com/products/piglow
description: 18 einfache LEDs als Spirale angeordnet und über Python ansteuerbar.
pincount: 26
pin:
'3':
mode: i2c
'5':
mode: i2c
-->
#PiGlow

View File

@ -1,11 +1,17 @@
<!--
---
name: Raspberry Pi Dots
name: DOTs
class: board
type: alle
formfactor: Andere
manufacturer: Raspberry Pi
description: verbinde die Punkte um eine Schaltung zu erstellen
url: http://www.raspberrypi.org/dots/
github: https://github.com/raspberrypilearning/dots
formfactor: '40-way'
buy: https://thepihut.com/products/raspberry-pi-dots-board
image: 'rpf-dots.png'
pincount: 40
eeprom: no
pin:
bcm0:
name: 'Farbe: Blau'

View File

@ -1,11 +1,16 @@
<!--
---
name: Ryanteck Motorsteuerung
name: RTK Motorsteuerung
class: board
type: alle
formfactor: Andere
manufacturer: Ryanteck
url: http://www.ryanteck.uk/store/ryanteck-rpi-motor-controller-board
buy: http://www.ryanteck.uk/store/ryanteck-rpi-motor-controller-board
description: A budget motor controller with quick start guides.
url: https://ryanteck.uk/add-ons/6-ryanteck-rpi-motor-controller-board-0635648607160.html
buy: https://ryanteck.uk/add-ons/6-ryanteck-rpi-motor-controller-board-0635648607160.html
image: 'rtk-000-001.png'
pincount: 26
eeprom: no
pin:
'11':
name: Motor 1 A
@ -24,36 +29,27 @@ pin:
direction: output
active: high
-->
#Ryanteck Motorsteuerung
# RTK Motorsteuerung
###Ein schneller und einfacher Weg um Motoren mit deinem Pi zu steuern.
```python
##Simples Motor Script für den RTK-000-001
import RPi.GPIO as GPIO
import time
#Setze BCM Broadcom Pin Nummern
GPIO.setmode(GPIO.BCM)
from gpiozero import RyanteckRobot
from time import sleep
#Motor 1 = Pins 17 and 18
#Motor 2 = Pins 22 and 23
GPIO.setup(17, GPIO.OUT)
GPIO.setup(18, GPIO.OUT)
robot = RyanteckRobot()
#Jetzt wird jede Richtung für 5 Sekunden in
#einer Endlosschleife durchlaufen.
while (True):
#Sleep 1 second then turn 17 on
GPIO.output(18, 0)
time.sleep(1)
GPIO.output(17, 1);
time.sleep(5);
#And now the other way round
GPIO.output(17, 0)
time.sleep(1);
GPIO.output(18, 1);
time.sleep(5);
#And loop back around
#And final cleanup
GPIO.cleanup()
while True:
robot.forward()
sleep(5)
robot.left()
sleep(1)
robot.backward()
sleep(5)
robot.right()
sleep(1)
robot.stop()
sleep(1)
```
[GPIO Zero docs](http://gpiozero.readthedocs.io/en/v1.3.1/api_boards.html#ryanteck-mcb-robot)

View File

@ -1,41 +0,0 @@
<!--
---
name: "Sense HAT"
manufacturer: Raspberry Pi Foundation
url: https://www.raspberrypi.org/products/sense-hat/
description: Erweiterungsmodul mit einer 8×8 RGB LED Matrix, 5-Tasten Joystick sowie jede menge Sensoren (Gyroskop, Beschleunigungsmesser, Magnetometer, Temperatur, Luftdruck und Luftfeuchtigkeit)
install:
'devices':
- 'i2c'
- 'spi'
pincount: 40
pin:
3:
mode: i2c
5:
mode: i2c
16:
name: Joystick
mode: input
18:
name: Joystick
mode: input
19:
mode: spi
21:
mode: spi
22:
name: Joystick
mode: input
23:
mode: spi
24:
mode: spi
-->
#Sense HAT
LED Matrix: LED2472G -> ATTINY88 -> SPI(8/9/10/11)
Joystick: SKRHABE010 -> ATTINY88 -> GPIO23/24/25
Axis/IMU: LSM9DS1 -> i2c 0x1c(1e),0x6a(6b) (INT on MCU)
Luftdruck/Temp: LPS25H -> i2c 0x5c
Luftfeuchtigkeit/Temp: HTS221 -> i2c 0x5f

View File

@ -1,21 +1,17 @@
<!--
---
name: Skywriter HAT
class: board
type: alle
formfactor: HAT
manufacturer: Pimoroni
url: https://github.com/pimoroni/skywriter-hat
description: Ein 3D Positions- und Gesten-Sensor.
url: http://shop.pimoroni.com/products/skywriter-hat
github: https://github.com/pimoroni/skywriter-hat
buy: http://shop.pimoroni.com/products/skywriter-hat
description: Ein 3D Positions- und Gesten-Sensor.
install:
'apt':
- 'python-smbus'
- 'python3-smbus'
- 'python-dev'
- 'python3-dev'
'python':
- 'skywriter'
'examples': 'python/examples/'
image: 'skywriter-hat.png'
pincount: 40
eeprom: yes
pin:
'3':
mode: i2c
@ -25,6 +21,10 @@ pin:
name: Reset
'13':
name: Transfer
i2c:
'0x42':
name: Gesture sensor
device: mgc3130
-->
#Skywriter HAT

View File

@ -1,7 +1,10 @@
<!--
---
name: SPI
class: interface
type: pinout
description: Raspberry Pi SPI Anschlüsse
url: https://www.raspberrypi.org/documentation/hardware/raspberrypi/spi/
pincount: 5
pin:
'11':

View File

@ -1,11 +1,16 @@
<!--
---
name: Traffic HAT
manufacturer: Ryanteck LTD.
url: http://www.ryanteck.uk/store/traffichat
buy: http://www.ryanteck.uk/store/traffichat
class: board
type: alle
formfactor: HAT
manufacturer: Ryanteck
description: Ein schneller und einfacher Weg um die grundlegenden Fähigkeiten der GPIO-Ports zu erkunden.
url: https://ryanteck.uk/hats/1-traffichat-0635648607122.html
buy: https://ryanteck.uk/hats/1-traffichat-0635648607122.html
image: 'traffic-hat.png'
pincount: 40
eeprom: yes
pin:
'15':
name: LED1 / Grün
@ -48,4 +53,4 @@ IO.setup(5,IO.OUT)
#Button
IO.setup(25,IO.IN,pull_up_down=IO.PUD_UP)
```
```

View File

@ -1,7 +1,10 @@
<!--
---
name: UART
class: interface
type: pinout
description: Raspberry Pi UART Anschlüsse
url: http://elinux.org/RPi_Serial_Connection
pin:
'8':
name: TXD / Senden
@ -31,4 +34,4 @@ import wiringpi2 as wiringpi
wiringpi.wiringPiSetup()
serial = wiringpi.serialOpen('/dev/ttyAMA0',9600)
wiringpi.serialPuts(serial,'hello world!')
```
```

View File

@ -1,21 +1,21 @@
<!--
---
name: Unicorn HAT
class: board
type: alle
formfactor: HAT
manufacturer: Pimoroni
url: http://shop.pimoroni.com/products/unicorn-hat
buy: http://shop.pimoroni.com/products/unicorn-hat
description: 64 blendend helle RGB LEDs auf einem HAT
url: http://shop.pimoroni.com/products/unicorn-hat
github: https://github.com/pimoroni/unicornhat
install:
'apt':
- 'python-dev'
- 'python3-dev'
'python':
- 'unicornhat'
'python3':
- 'unicornhat'
'examples': 'python/examples/'
buy: http://shop.pimoroni.com/products/unicorn-hat
image: 'unicorn-hat.png'
pincount: 40
eeprom: detect
power:
'2':
ground:
'9':
pin:
'12':
name: Data
@ -35,7 +35,7 @@ analogen Audio-Ausgang erzeugen kann. Somit kannst Du nicht beides gleichzeitig
Die Einrichtung des HATs ist einfach:
```bash
curl get.pimoroni.com/unicornhat | bash
curl -sS https://get.pimoroni.com/unicornhat | bash
```
Dann musst Du die Library nur noch in Dein Python-Skript importieren und kannst anfangen zu experimentieren:

View File

@ -1,8 +1,11 @@
<!--
---
name: WiringPi Anschlussbelegung
url: http://wiringpi.com/
name: WiringPi
class: interface
type: pinout
page_url: wiringpi
url: http://wiringpi.com
github: https://github.com/WiringPi/WiringPi2-Python
pin:
'3':
name: WiringPi 8

View File

@ -1 +1 @@
SCL ist der Clock oder Tackt Anschluss des I2C-Bus des Pi. [mehr über I2C](/pinout/i2c).
SCL ist der Clock- oder Taktanschluss des I2C-Bus des Pi. [Mehr über I2C](/pinout/i2c).

View File

@ -1,48 +1,91 @@
---
default_desc: The comprehensive Raspberry Pi GPIO Pinout guide for the original Raspberry
Pi, B+ and Pi 2
default_title: Raspberry Pi GPIO Pinout - Pi 1, B+, Pi 2
title_suffix: " at Raspberry Pi GPIO Pinout"
domain: de.pinout.xyz
analytics_id: UA-69846516-4
base_url: /pinout/
resource_url: /resources/
domain: de.pinout.xyz
url_suffix:
urls:
GND: masse_ground
strings:
- made_by: 'Hersteller: {manufacturer}'
- type_hat: 'HAT form-factor'
- type_phat: 'pHAT form-factor'
- type_classic: 'Classic form-factor'
- pin_header: '{} pin header'
- uses_i2c: 'benutzt I2C'
- uses_spi: 'benutzt SPI'
- wiring_pi_pin: 'Wiring Pi Anschluss {}'
- uses_n_gpio_pins: 'benutzt {} GPIO Anschlüsse'
- bcm_pin_rev1_pi: 'BCM Anschluss {} auf dem Rev 1 ( sehr alter ) Pi'
- physical_pin_n: 'Physical pin {}'
- more_information: 'Mehr Informationen'
- github_repository: 'GitHub Repository'
- buy_now: 'jetzt kaufen'
featured:
- display-o-tron
- rpf-dots
- pibrella
- rtk-000-001
overlays:
- ground
- uart
- iface-dpi
- iface-gpclk
- iface-jtag
- iface-1wire
- iface-pcm
- iface-sd
- i2c
- spi
- arduino-spi
- uart
- wiringpi
- iqaudio-pi-dac
- 4tronix-picon-zero
- 4tronix-pistep2d
- 4tronix-pistep2q
- ab-1-wire-plus
- ab-1-wire-zero
- ab-adc-differential-pi
- ab-adc-pi-plus
- ab-adc-pi-zero
- ab-adcdac-pi-zero
- ab-io-pi-plus
- ab-io-pi-zero
- ab-rs485-pi
- ab-rtc-pi-plus
- ab-rtc-pi-zero
- ab-serial-pi-plus
- ab-serial-pi-zero
- ab-servo-pwm-pi-zero
- adafruit-cap-mpr121
- adafruit-servo-hat
- analog-zero
- automation-hat
- blinkt
- carberry
- cirruslogic-audio-card
- discohat
- display-o-tron
- display-o-tron-hat
- dots
- drum-hat
- enviro-phat
- espiot-phat
- explorer-hat
- explorer-hat-pro
- explorer-phat
- iqaudio-pi-dac
- iqaudio-pi-digiamp
- microdot-phat
- phat-dac
- pi-liter
- piano-hat
- piborg-ledborg
- piborg-zeroborg
- pibrella
- piglow
- pijack
- propeller-hat
- raspio-duino
- redbear-iot-hat
- rpf-dots
- rtk-000-001
- scroll-phat
- sense-hat
- skywriter-hat
- traffic-hat
- unicorn-hat
- unicorn-phat
- uugear-7port-usb-hub
- uugear-witty-pi
- uugear-witty-pi-2
- uugear-zero4u
- wifi-pants
- zero-lipo
- mote-phat
- 4tronix-robohat
- 4tronix-pistop
- icubex-pishield
- adafruit-pitft-35-plus
- pantilt-hat

7
src/de/template/404.md Normal file
View File

@ -0,0 +1,7 @@
#404 - Oh dear!
###Sorry, we couldn't find what you are looking for!
Use the pinout on the left to explore the pins and functions of the Raspberry Pi GPIO.
Or, use the menu above to discover new boards and learn about interfaces.

View File

@ -0,0 +1,3 @@
<p>Found an error, want to add your board's pinout? Visit our <a href="https://github.com/gadgetoid/Pinout.xyz">GitHub repository</a> and submit an Issue or a Pull Request!</p>
<p>Originally part of <a href="http://pi.gadgetoid.com">pi.gadgetoid.com</a>. Tweet us at <a href="https://twitter.com/pipinout"> @PiPinout</a>. Maintained by <a href="https://twitter.com/gadgetoid">@Gadgetoid</a> and <a href="https://twitter.com/roguehal13">@RogueHAL13</a>.</p>
<p>Translation by <a href="https://github.com/rdmueller">@rdmueller</a> and <a href="https://github.com/KojoePi">@KojoePi</a>.</p>

View File

@ -7,7 +7,7 @@ Diese GPIO Anschlussbelegung ist nicht zum Ausdrucken gedacht, aber sie ist ein
##Welche Bedeutung haben diese Nummern?
* BCM - Broadcom Anschlussnummer, meist als "GPIO" bezeichnet. Dies sind die Pins die Du wahscheinlich mit RPi.GPIO benutzen wirst
* WiringPi - Wiring Pi Anschlussnummer, für Gordon's Wiring Pi library
* WiringPi - Wiring Pi Anschlussnummer, für Gordon Henderson's Wiring Pi library
* Physical - Die Anschlussnummer, die dem physikalischen Pin an der Anschlussleiste des Raspberry Pi entspricht.
##Pi 2

View File

@ -1,66 +0,0 @@
<!doctype html>
<html lang="{{langcode}}">
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
<title>{{title}}</title>
<meta name="description" content="{{description}}" />
<link href='//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={{v}}" rel="stylesheet">
<link href="{{resource_url}}print.css?v={{v}}" rel="stylesheet" media="print">
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css">
{{hreflang}}
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-69846516-4', 'auto');
ga('send', 'pageview');
</script>
</head>
<body>
<div id="container">
<ul class="main-nav">
<li><a href="https://twitter.com/gadgetoid"><i class="fa fa-twitter"></i> @Gadgetoid</a></li>
<li><a href="https://twitter.com/ralfdmueller"><i class="fa fa-twitter"></i> @RalfDMueller</a></li>
<li><a href="https://github.com/Gadgetoid/Pinout2"><i class="fa fa-github"></i> Contribute</a></li>
{{lang_links}}
</ul>
<h1 class="logo"><a title="Raspberry Pi GPIO Pinout Start" href="/"><img src="{{resource_url}}pinout-logo.png" style="top:8px;" /><span>Raspberry Pi</span>n<span class="out">out</span></a></h1>
<div class="overlay-container">
<span>Infos zu den Pins und Erweiterungen des Pi <i class="fa fa-arrow-right"></i></span>
<div class="drop-down">
<span>Auswählen&hellip;</span>
<ul class="overlay">
{{overlays}}
</ul>
</div>
</div>
<nav id="gpio">
<div id="pinbase"></div>
<div id="pinbasebplus"></div>
{{nav}}
</nav>
<div id="content">
<div id="pages">
{{content}}
</div>
</div>
<div class="footer" style="clear: both;padding: 20px 0px;text-align:center;">
<p>Übersetzung von <a href="https://twitter.com/ralfdmueller">@RalfDMueller</a></p>
<p>Fehler gefunden? In <a href="https://github.com/gadgetoid/Pinout2">unserem GitHub Repository</a> kannst Du ein Ticket eröffnen oder einen Pull-Request stellen</p>
</div>
</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/prettify/0.1/prettify.js"></script>
<script src='{{resource_url}}prettify/lang-ruby.js'></script>
<script src='{{resource_url}}prettify/lang-bash.js'></script>
<script src='{{resource_url}}gaat.js'></script>
<script src='{{resource_url}}pinout.js?v={{v}}'></script>
</body>
</html>

View File

@ -0,0 +1,33 @@
strings:
- default_desc: 'The comprehensive Add-on boards & GPIO Pinout guide for the Raspberry Pi'
- default_title: 'Raspberry Pi GPIO Pinout'
- title_suffix: ' at Raspberry Pi GPIO Pinout'
- home: 'Home'
- boards: 'Boards'
- details: 'Details'
- group_other: 'alle'
- form_undefined: 'Andere'
- pin_header: '{} pin header'
- type_hat: 'HAT form-factor'
- type_phat: 'pHAT form-factor'
- type_classic: 'Classic form-factor'
- eeprom_detect: 'EEPROM Hersteller ID'
- eeprom_setup: 'benutzt EEPROM'
- uses_i2c: 'benutzt I2C'
- uses_spi: 'benutzt SPI'
- uses_5v_and_3v3: '5v und 3v3 Stromversorgung'
- uses_5v: '5v Stromversorgung'
- uses_3v3: '3v3 Stromversorgung'
- uses_n_gpio_pins: 'benutzt {} GPIO Anschlüsse'
- bcm_pin_rev1_pi: 'BCM Anschluss {} auf dem Rev 1 ( sehr alter ) Pi'
- physical_pin_n: 'Physical pin {}'
- wiring_pi_pin: 'Wiring Pi Anschluss {}'
- made_by: 'Hersteller: {manufacturer}'
- more_information: 'Mehr Informationen'
- github_repository: 'GitHub'
- board_schematic : 'Schematic'
- buy_now: 'jetzt kaufen'
- browse_addons: 'Browse more HATs, pHATs and add-ons'
- return_home: 'Return to the Raspberry Pi GPIO Pinout'
- boards_title: 'Raspberry Pi HATs, pHATs &amp; Add-ons'
- boards_subtitle: 'Click on a HAT, pHAT or add-on for more details and to see which pins it uses!'

View File

@ -0,0 +1,42 @@
<!--
---
name: Picon Zero
class: board
type: motor
formfactor: pHAT
manufacturer: 4tronix
description: A robot controller board for the Raspberry Pi
url: http://4tronix.co.uk/piconzero/
buy: http://4tronix.co.uk/store/index.php?rt=product/product&product_id=552
image: '4tronix-picon-zero.png'
pincount: 40
eeprom: no
power:
'2':
ground:
'6':
'9':
'14':
'20':
'25':
'30':
'34':
'39':
pin:
'3':
mode: i2c
'5':
mode: i2c
'38':
name: Ultrasonic
mode: input/output
i2c:
'0x22':
name: PiconZero
device: ATMega328
-->
#Picon Zero
The Picon Zero is an add-on PCB for the Raspberry Pi that is physically the same size as a Raspberry Pi Zero and so is ideal as a pseudo-Hat (pHat) for the Pi Zero. However, it can of course be used on any Raspberry Pi with a 40-pin GPIO connector.
As well as 2 full H-Bridge motor drivers, the Picon Zero has a number of Input and Output pins that can be configured in a variety of ways, allowing you to easily add analog inputs or neopixel outputs to your Raspberry Pi without any complicated software and kernel specific drivers. It also provides an interface for an HC-SR04 ultrasonic distance sensor and opens up 5 GPIO pins from the Raspberry Pi for you to use as you see fit.

View File

@ -0,0 +1,54 @@
<!--
---
name: PiStep2 Dual
class: board
type: motor
formfactor: pHAT
manufacturer: 4tronix
description: A Dual Stepper Motor Driver for Raspberry Pi
url: http://4tronix.co.uk/store/index.php?rt=product/product&product_id=554
github:
buy: http://4tronix.co.uk/store/index.php?rt=product/product&product_id=554
image: '4tronix-pistep2d.png'
pincount: 40
eeprom: no
power:
'2':
'17':
ground:
'30':
'34':
'39':
pin:
'11':
name: MotorA_0
mode: output
'12':
name: MotorA_1
mode: output
'13':
name: MotorA_2
mode: output
'15':
name: MotorA_3
mode: output
'16':
name: MotorB_0
mode: output
'18':
name: MotorB_1
mode: output
'22':
name: MotorB_2
mode: output
'7':
name: MotorB_3
mode: output
-->
# PiStep2 Dual
Drive 2 uni-polar stepper motors using a single control board with the PiStep2 Dual.
* Uses a ULN2803 Darlington driver chip to drive the motors
* Ideal for use with 28BYJ48 stepper motors
* Supported in Scratch GPIO as well as in Python

View File

@ -0,0 +1,78 @@
<!--
---
name: PiStep2 Quad
class: board
type: motor
formfactor: pHAT
manufacturer: 4tronix
description: A Quad Stepper Motor Driver for Raspberry Pi
url: http://4tronix.co.uk/store/index.php?rt=product/product&product_id=554
github:
buy: http://4tronix.co.uk/store/index.php?rt=product/product&product_id=554
image: '4tronix-pistep2q.png'
pincount: 40
eeprom: no
power:
'2':
'17':
ground:
'30':
'34':
'39':
pin:
'11':
name: MotorA_0
mode: output
'12':
name: MotorA_1
mode: output
'13':
name: MotorA_2
mode: output
'15':
name: MotorA_3
mode: output
'16':
name: MotorB_0
mode: output
'18':
name: MotorB_1
mode: output
'22':
name: MotorB_2
mode: output
'7':
name: MotorB_3
mode: output
'33':
name: MotorC_0
mode: output
'32':
name: MotorC_1
mode: output
'31':
name: MotorC_2
mode: output
'29':
name: MotorC_3
mode: output
'38':
name: MotorD_0
mode: output
'37':
name: MotorD_1
mode: output
'36':
name: MotorD_2
mode: output
'35':
name: MotorD_3
mode: output
-->
# PiStep2 Quad
Drive 4 uni-polar stepper motors using a single control board with the PiStep2 Quad.
* Uses ULN2803 Darlington driver chips to drive the motors
* Ideal for use with 28BYJ48 stepper motors
* Supported in Scratch GPIO as well as in Python

View File

@ -0,0 +1,34 @@
<!--
---
name: Pi Stop
class: board
type: led
formfactor: Custom
manufacturer: 4tronix
description: LED Traffic Lights for Raspberry Pi
url: http://4tronix.co.uk/store/index.php?rt=product/product&product_id=390
buy: http://4tronix.co.uk/store/index.php?rt=product/product&product_id=390
image: '4tronix-pistop.png'
pincount: 4
eeprom: no
ground:
'9':
pin:
'11':
name: Green
mode: output
active: high
'13':
name: Amber
mode: output
active: high
'15':
name: Red
mode: output
active: high
-->
#Pi Stop Traffic Lights
The PiStop is placed vertically into the GPIO connectors and can be fitted into several positions in the board. It can be fitted into 26-pin headers as well as 40-pin headers.
PiStop only uses 3 GPIO pins plus ground, but you can fit multiple PiStops into one header, although not all positions are possible simultaneously as some pins are shared across the options. Note that only one position is illustrated in the pinout, but any succession of 3 GPIO next to a ground pin is suitable.

View File

@ -0,0 +1,79 @@
<!--
---
name: RoboHat
class: board
type: io,motor
formfactor: HAT
manufacturer: 4tronix
description: Robotics controller HAT
url: http://4tronix.co.uk/store/index.php?rt=product/product&product_id=547
github:
buy: http://4tronix.co.uk/store/index.php?rt=product/product&product_id=547
image: '4tronix-robohat.png'
pincount: 40
eeprom: yes
power:
'1':
'2':
ground:
'6':
'9':
'14':
'20':
'25':
'30':
'34':
'39':
pin:
'32':
name: MotorA_0
mode: output
'33':
name: MotorA_1
mode: output
'35':
name: MotorB_0
mode: output
'36':
name: MotorB_1
mode: output
'18':
name: out0
mode: output
active: high
'22':
name: out1
mode: output
active: high
'12':
name: out2
mode: output
active: high
'31':
name: out3
mode: output
active: high
'7':
name: in0
mode: input
'11':
name: in1
mode: input
'29':
name: in2
mode: input
'13':
name: in3
mode: input
'15':
name: in4
mode: input
'16':
name: in5
mode: input
'38':
name: Ultrasonic
mode: input/output
-->
# RoboHat
The RoboHat is a complete robot controller for small robots. It has 2 full H-bridges using DRV8833 for up to 1.5A per channel, a 5V switch-mode regulator to generate the 5V for the Raspberry Pi, 6 bufferened inputs that can accept 2.5V to 5.5V and convert to 3.3V and 4 outputs driven up to 5V. All the I/O is via GVS (Ground, Volts, Signal) 3-pin terminals so it is easy to plug in 3-pin sensors or small servos directly. There is also a connector plug in an HC-SR04 ultrasonic distance sensor with the necessary circuitry to read the value using a single GPIO pin.

Some files were not shown because too many files have changed in this diff Show More