Merge remote-tracking branch 'Gadgetoid/master'

This commit is contained in:
Gabriel Freire 2016-03-05 22:17:17 +00:00
commit 744e640d90
367 changed files with 8675 additions and 1587 deletions

View File

@ -1,14 +1,15 @@
LANG ?= en-GB
LANG ?= en
LANG := $(subst .UTF-8,,$(LANG))
LANG := $(subst _,-,$(LANG))
LANG := $(subst -, ,$(LANG))
LANG := $(subst _, ,$(LANG))
LANG := $(firstword $(LANG))
all:
./generate-html.py $(LANG)
cp -r resources output/$(LANG)/
clean:
rm -r output/$(LANG)/*
rm -rf output/$(LANG)/*
serve: all
./serve.py $(LANG)

View File

@ -24,26 +24,22 @@ The contents of this GitHub repository are used to build http://pinout.xyz and i
Current known contributors are:
* tr-TR - @Ardakilic
* fr-FR - @RogueM
* de - @rdmueller and @KojoePi
* es - @ResonantWave
* fr - @RogueM
* it - @LizardM4
* pt - @Maslor
* tr - @Ardakilic
We're looking for ( based on traffic ):
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`.
* German, de-DE
* Italian, it-IT
* Spanish ( Spain ), es-ES
* Polish pl-PL
* And any others!
You should start by duplicating the `src/en-GB` directory to the
appropriate culture. For example if you want to create a German translation you would create the folder `src/de-DE`.
At the moment cultures are not fully supported, so you can't have `src/fr-CA` ( sorry! ), and there are no plans for this.
There are no plans to support cultures, so you can't have `src/fr-CA` ( sorry! ).
Once you've made your translation, build and preview it with, for example:
```bash
make serve LANG=de-DE
make serve LANG=de
```
And then open: http://127.0.0.1:5000 in your browser.
@ -61,4 +57,4 @@ Submit your finished translation as a pull request and I'll get it live on pinou
* 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 )
* Tool to convert WiringPi to GPIO to BCM and back
* Tool to convert WiringPi to GPIO to BCM and back

View File

@ -2,19 +2,22 @@ import json, sys
db = json.load(open('pi-pinout.db'))
def from_phys(phys, mode="bcm"):
pin = db['pins'][str(phys)]
if 'scheme' in pin:
if mode in pin['scheme']:
return int(pin['scheme'][mode])
return None
pin = db['pins'][str(phys)]
if 'scheme' in pin:
if mode in pin['scheme']:
return int(pin['scheme'][mode])
return None
def to_phys(pin, mode="bcm"):
for pin in db['pins']:
if 'scheme' in db['pins'][pin]:
if mode in db['pins'][pin]['scheme']:
return int(pin)
return None
for pin in db['pins']:
if 'scheme' in db['pins'][pin]:
if mode in db['pins'][pin]['scheme']:
return int(pin)
return None
pin = int(sys.argv[1])
@ -23,5 +26,5 @@ mode = 'bcm'
if len(sys.argv) > 2:
mode = sys.argv[2]
print("Pin {} is {}: {}".format(pin,mode.upper(),from_phys(pin,mode)))
print("Pin {} is {}: {}".format(pin, mode.upper(), from_phys(pin, mode)))

View File

@ -1,25 +1,55 @@
#!/usr/bin/env python
import json
import markdown
import unicodedata
import re
import os
import time
import sys
import pinout
import yaml
import markjaml
import urlmapper
reload(sys)
sys.setdefaultencoding('utf8')
lang = "en"
default_strings = {
'made_by': 'Made by {manufacturer}',
'type_hat': 'HAT form-factor',
'type_classic': 'Classic form-factor',
'pin_header': '{} pin header',
'uses_i2c': 'Uses I2C',
'wiring_pi_pin': 'Wiring Pi pin {}',
'uses_n_gpio_pins': 'Uses {} GPIO pins',
'bcm_pin_rev1_pi': 'BCM pin {} on Rev 1 ( very early ) Pi',
'physical_pin_n': 'Physical pin {}',
'more_information': 'More Information',
'github_repository': 'GitHub Repository',
'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_audio': 'Audio',
'group_gesture': 'Gesture',
'group_pinout': 'Pinout',
'group_info': 'Info',
'group_featured': 'Featured'
}
def cssify(value):
value = slugify(value);
if value[0] == '3' or value[0] == '5':
value = 'pow' + value
return value
value = slugify(value);
if value[0] == '3' or value[0] == '5':
value = 'pow' + value
return value
def slugify(value):
"""
@ -31,158 +61,188 @@ def slugify(value):
value = re.sub('[^\w\s-]', '', value).strip().lower()
return re.sub('[-\s]+', '_', value)
def load_overlay(overlay):
try:
data = markjaml.load('src/{}/overlay/{}.md'.format(lang,overlay))
try:
data = markjaml.load('src/{}/overlay/{}.md'.format(lang, overlay))
loaded = data['data']
loaded['long_description'] = data['html']
except IOError:
return None
loaded = data['data']
loaded['long_description'] = data['html']
except IOError:
return None
'''
If this is not an info page, then build a collection of details and append them to long_description
'''
if 'type' not in loaded or loaded['type'] != 'info':
details = []
details = []
if 'type' not in loaded:
loaded['type'] = 'addon'
if 'manufacturer' in loaded:
details.append(strings['made_by'].format(manufacturer=loaded['manufacturer']))
if 'manufacturer' in loaded:
details.append(strings['made_by'].format(manufacturer=loaded['manufacturer']))
if 'pincount' in loaded:
pincount = int(loaded['pincount'])
if pincount == 40:
details.append(strings['type_hat'])
elif pincount == 26:
details.append(strings['type_classic'])
else:
details.append(strings['pin_header'].format(pincount))
if 'pincount' in loaded:
'''
Choose correct board type to be displayed based upon pincount and form factor.
This could be a HAT, a pHAT or other...
'''
pincount = int(loaded['pincount'])
if 'formfactor' in loaded:
formfactor = str(loaded['formfactor'])
if pincount == 40 and formfactor == 'HAT':
details.append(strings['type_hat'])
elif pincount == 40 and formfactor == 'pHAT':
details.append(strings['type_phat'])
elif pincount == 40 and formfactor == '40-way':
details.append(strings['pin_header'].format(pincount))
else:
details.append(strings['pin_header'].format(pincount))
elif pincount == 40:
details.append(strings['type_hat'])
elif pincount == 26:
details.append(strings['type_classic'])
else:
details.append(strings['pin_header'].format(pincount))
if 'pin' in loaded:
uses_5v = False
uses_3v = False
uses = 0
for pin in loaded['pin']:
pin = str(pin)
if pin.startswith('bcm'):
pin = pinout.bcm_to_physical(pin[3:])
'''
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 = 0
for pin in loaded['pin']:
pin = str(pin)
if pin.startswith('bcm'):
pin = pinout.bcm_to_physical(pin[3:])
if pin in pinout.pins:
actual_pin = pinout.pins[pin]
if pin in pinout.pins:
actual_pin = pinout.pins[pin]
if actual_pin['type'] in ['+3v3','+5v','GND']:
if actual_pin['type'] == '+3v3':
uses_3v = True
if actual_pin['type'] == '+5v':
uses_5v = True
else:
uses += 1
if actual_pin['type'] in ['+3v3', '+5v', 'GND'] and overlay != 'ground':
raise Exception(
"{} includes a reference to a {} pin, which isn't allowed".format(overlay, actual_pin['type']))
else:
uses += 1
if uses > 0:
details.append('* Uses {} GPIO pins'.format(uses))
if uses > 0:
details.append(strings['uses_n_gpio_pins'].format(uses))
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'])
'''
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'])
if 'url' in loaded:
details.append('* [More Information]({url})'.format(url=loaded['url']))
# 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']))
if 'github' in loaded:
details.append('* [GitHub Repository]({url})'.format(url=loaded['github']))
# Should only ever be a URL to the github repository with code supporting the product
if 'github' in loaded:
details.append('[{text}]({url})'.format(text=strings['github_repository'], url=loaded['github']))
if 'buy' in loaded:
details.append('* [Buy Now]({url})'.format(url=loaded['buy']))
# 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))))
loaded['long_description'] = '{}\n{}'.format(loaded['long_description'],markdown.markdown('\n'.join(details)))
# Automatically generate a page slug from the name if none is specified
if 'page_url' not in loaded:
loaded['page_url'] = slugify(loaded['name'])
if not 'page_url' in loaded:
loaded['page_url'] = slugify(loaded['name'])
loaded['rendered_html'] = render_overlay_page(loaded)
loaded['src'] = overlay
pages[loaded['page_url']] = loaded
navs[loaded['page_url']] = render_nav(loaded['page_url'], overlay=loaded)
return loaded
loaded['rendered_html'] = render_overlay_page(loaded)
loaded['src'] = overlay
pages[loaded['page_url']] = loaded
navs[loaded['page_url']] = render_nav(loaded['page_url'], overlay=loaded)
select_overlays.append((loaded['page_url'], loaded['name']))
return loaded
def load_md(filename):
filename = 'src/{}/{}'.format(lang, filename)
try:
html = markdown.markdown(open(filename).read(), extensions=['fenced_code'])
filename = 'src/{}/{}'.format(lang, filename)
try:
html = markdown.markdown(open(filename).read(), extensions=['fenced_code'])
return html
except IOError:
print('!! Unable to load markdown from {}'.format(filename))
return ''
return html
except IOError:
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)))
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 == None:
return ''
return '<article class="page_{}">{}</article>'.format(slugify(overlay['name']),overlay['long_description'])
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)
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']
pin = pinout.pins[str(pin_num)]
pin_url = pin['name']
if pin_url == 'Ground':
return (None, None, None)
if pin_url == 'Ground':
return None, None, None
pin_text_name = pin['name']
pin_text_name = pin['name']
pin_subtext = []
pin_subtext = []
pin_subtext.append(strings['physical_pin_n'].format(pin_num))
pin_subtext.append('Physical pin {}'.format(pin_num))
if 'scheme' in pin:
if 'bcm' in pin['scheme']:
bcm = pin['scheme']['bcm']
pin_url = 'gpio{}'.format(bcm)
if 'scheme' in pin:
if 'bcm' in pin['scheme']:
bcm = pin['scheme']['bcm']
pin_url = 'gpio{}'.format(bcm)
pin_text_name = 'BCM {}'.format(bcm)
pin_text_name = 'BCM {}'.format(bcm)
pin_subtext.append('BCM pin {}'.format(bcm))
if 'wiringpi' in pin['scheme']:
wiringpi = pin['scheme']['wiringpi']
pin_subtext.append('Wiring Pi pin {}'.format(wiringpi))
if 'bcmAlt' in pin['scheme']:
bcmAlt = pin['scheme']['bcmAlt']
pin_subtext.append(strings['bcm_pin_rev1_pi'].format(bcmAlt))
if pin['name'] != '':
pin_subname_text = '({})'.format(pin['name'])
pin_subtext.append('BCM pin {}'.format(bcm))
if 'wiringpi' in pin['scheme']:
wiringpi = pin['scheme']['wiringpi']
pin_subtext.append('Wiring Pi pin {}'.format(wiringpi))
if 'bcmAlt' in pin['scheme']:
bcmAlt = pin['scheme']['bcmAlt']
pin_subtext.append('BCM pin {} on Rev 1 ( very early ) Pi'.format(bcmAlt))
if 'description' in pin:
pin_text_name = '{} ({})'.format(pin_text_name, pin['description'])
if 'description' in pin:
pin_text_name = '{} ({})'.format(pin_text_name, pin['description'])
fn_headings = []
fn_functions = []
pin_functions = ''
if 'functions' in pin:
for x in range(6):
fn_headings.append('Alt' + str(x))
fn_headings = []
fn_functions = []
pin_functions = ''
if 'functions' in pin:
for x in range(6):
fn_headings.append( 'Alt' + str(x) )
function = ''
if 'alt' + str(x) in pin['functions']:
function = pin['functions']['alt' + str(x)]
function = ''
if 'alt' + str(x) in pin['functions']:
function = pin['functions']['alt' + str(x)]
fn_functions.append(function)
fn_functions.append( function )
pin_functions = '''<table class="pin-functions">
pin_functions = '''<table class="pin-functions">
<thead>
<tr>
<th>{headings}</th>
@ -195,153 +255,140 @@ def render_pin_page(pin_num):
</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_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))
)
#if pin_text != None:
return (pin_url, pin_text, pin_text_name) #pages[pin_url] = pin_text
pin_text = render_pin_text(
pin_num,
pin_url,
pin_text_name,
pin_functions,
'<ul><li>{}</li></ul>'.format('</li><li>'.join(pin_subtext))
)
# if pin_text != None:
return pin_url, pin_text, pin_text_name # pages[pin_url] = pin_text
def render_pin(pin_num, selected_url, overlay=None):
pin = pinout.pins[str(pin_num)]
pin = pinout.pins[str(pin_num)]
pin_type = list([x.strip() for x in pin['type'].lower().split('/')])
pin_url = pin['name']
pin_name = pin['name']
pin_used = False
pin_link_title = []
bcm_pin = None
if 'scheme' in pin:
if 'bcm' in pin['scheme']:
bcm_pin = 'bcm' + str(pin['scheme']['bcm'])
pin_type = list([x.strip() for x in pin['type'].lower().split('/')])
pin_url = pin['name']
pin_name = pin['name']
pin_used = False
pin_link_title = []
bcm_pin = None
if 'scheme' in pin:
if 'bcm' in pin['scheme']:
bcm_pin = 'bcm' + str(pin['scheme']['bcm'])
if overlay is not None and (
pin_num in overlay['pin'] or str(pin_num) in overlay['pin'] or bcm_pin in overlay['pin']):
if overlay != None 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']:
overlay_pin = overlay['pin'][pin_num]
elif str(pin_num) in overlay['pin']:
overlay_pin = overlay['pin'][str(pin_num)]
else:
overlay_pin = overlay['pin'][bcm_pin]
if pin_num in overlay['pin']:
overlay_pin = overlay['pin'][pin_num]
elif str(pin_num) in overlay['pin']:
overlay_pin = overlay['pin'][str(pin_num)]
else:
overlay_pin = overlay['pin'][bcm_pin]
if overlay_pin is None:
overlay_pin = {}
if overlay_pin == None:
overlay_pin = {}
pin_used = True
pin_used = True
#print(overlay)
if 'name' in overlay_pin:
pin_name = overlay_pin['name']
if 'name' in overlay_pin:
pin_name = overlay_pin['name']
if 'description' in overlay_pin:
pin_link_title.append(overlay_pin['description'])
if 'description' in overlay_pin:
pin_link_title.append(overlay_pin['description'])
if 'scheme' in pin:
if 'bcm' in pin['scheme']:
bcm = pin['scheme']['bcm']
pin_subname = ''
#pin_subname_text = ''
#if pin_url == '':
pin_url = 'gpio{}'.format(bcm)
if pin_name != '': #pin['name'] != '':
pin_subname = '<small>({})</small>'.format(pin_name) #pin['name'])
pin_name = 'BCM {} {}'.format(bcm, pin_subname)
if 'wiringpi' in pin['scheme']:
wiringpi = pin['scheme']['wiringpi']
pin_link_title.append(strings['wiring_pi_pin'].format(wiringpi))
if 'scheme' in pin:
if 'bcm' in pin['scheme']:
bcm = pin['scheme']['bcm']
pin_subname = ''
pin_url = base_url + slugify('pin{}_{}'.format(pin_num,pin_url))
pin_url = 'gpio{}'.format(bcm)
if pin_name != '':
pin_subname = '<small>({})</small>'.format(pin_name)
pin_name = 'BCM {} {}'.format(bcm, pin_subname)
if 'wiringpi' in pin['scheme']:
wiringpi = pin['scheme']['wiringpi']
pin_link_title.append(strings['wiring_pi_pin'].format(wiringpi))
if pin['type'] in pinout.get_setting('urls'):
pin_url = base_url + pinout.get_setting('urls')[pin['type']]
pin_url = base_url + slugify('pin{}_{}'.format(pin_num, pin_url))
selected = ''
if pin['type'] in pinout.get_setting('urls'):
pin_url = base_url + pinout.get_setting('urls')[pin['type']]
if base_url + selected_url == pin_url:
selected = ' active'
if pin_used:
selected += ' overlay-pin'
selected = ''
if base_url + selected_url == pin_url:
selected = ' active'
if pin_used:
selected += ' overlay-pin'
pin_url = pin_url + url_suffix
pin_url = pin_url + url_suffix
return '<li class="pin{pin_num} {pin_type}{pin_selected}"><a href="{pin_url}" title="{pin_title}"><span class="default"><span class="phys">{pin_num}</span> {pin_name}</span><span class="pin"></span></a></li>\n'.format(
pin_num=pin_num,
pin_type=' '.join(map(cssify, pin_type)),
pin_selected=selected,
pin_url=pin_url,
pin_title=', '.join(pin_link_title),
pin_name=pin_name,
langcode=lang
)
return '<li class="pin{pin_num} {pin_type}{pin_selected}"><a href="{pin_url}" title="{pin_title}"><span class="default"><span class="phys">{pin_num}</span> {pin_name}</span><span class="pin"></span></a></li>\n'.format(
pin_num = pin_num,
pin_type = ' '.join(map(cssify,pin_type)),
pin_selected = selected,
pin_url = pin_url,
pin_title = ', '.join(pin_link_title),
pin_name = pin_name
)
def render_nav(url, overlay=None):
html_odd = ''
html_even = ''
for odd in range(1,len(pinout.pins),2):
html_odd += render_pin(odd, url,overlay)
html_even += render_pin(odd+1,url,overlay)
html_odd = ''
html_even = ''
for odd in range(1, len(pinout.pins), 2):
html_odd += render_pin(odd, url, overlay)
html_even += render_pin(odd + 1, url, overlay)
return '''<ul class="bottom">
return '''<ul class="bottom">
{}</ul>
<ul class="top">
{}</ul>'''.format(html_odd, html_even)
def get_hreflang_urls(src):
hreflang = []
for lang in alternate_urls:
if src in alternate_urls[lang]:
url = alternate_urls[lang][src]
hreflang.append('<link rel="alternate" src="{url}" hreflang="{lang}"/>'.format(
lang=lang,
url=url
))
return hreflang
hreflang = []
for lang in sorted(alternate_urls):
if src in alternate_urls[lang]:
url = alternate_urls[lang][src]
hreflang.append('<link rel="alternate" href="{url}" hreflang="{lang}"/>'.format(
lang=lang,
url=url
))
return hreflang
def get_lang_urls(src):
urls = []
for url_lang in alternate_urls:
if src in alternate_urls[url_lang]:
img_css = ''
if url_lang == lang:
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(
lang=url_lang,
url=url,
resource_url=resource_url,
css=img_css
))
return urls
urls = []
for url_lang in sorted(alternate_urls):
if src in alternate_urls[url_lang]:
img_css = ''
if url_lang == lang:
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(
lang=url_lang,
url=url,
resource_url=resource_url,
css=img_css
))
return urls
'''
Main Program Flow
'''
lang = "en-GB"
default_strings = {
'made_by': '* Made by {manufacturer}',
'type_hat': '* HAT form-factor',
'type_classic': '* Classic form-factor',
'pin_header': '* {} pin header',
'uses_i2c': '* Uses I2C',
'wiring_pi_pin': 'Wiring Pi pin {}'
}
if len(sys.argv) > 1:
lang = sys.argv[1]
lang = sys.argv[1]
alternate_urls = urlmapper.generate_urls(lang)
@ -349,54 +396,119 @@ pinout.load(lang)
overlays = pinout.settings['overlays']
strings = pinout.get_setting('strings',{})
strings = pinout.get_setting('strings', {})
if type(strings) == list:
_strings = {}
for item in strings:
_strings[item.keys()[0]] = item.values()[0]
strings = _strings
_strings = {}
for item in strings:
_strings[item.keys()[0]] = item.values()[0]
strings = _strings
for key, val in default_strings.items():
if key not in strings:
strings[key] = val
if key not in strings:
strings[key] = val
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'
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 = open('src/{}/template/layout.html'.format(lang)).read()
pages = {}
navs = {}
select_overlays = []
overlays_html = ''
overlays_html = []
nav_html = {}
if not os.path.isdir('output'):
try:
os.mkdir('output')
except OSError:
exit('Failed to create output dir')
try:
os.mkdir('output')
except OSError:
exit('Failed to create output dir')
if not os.path.isdir('output/{}'.format(lang)):
try:
os.mkdir('output/{}'.format(lang))
except OSError:
exit('Failed to create output/{} dir'.format(lang))
try:
os.mkdir('output/{}'.format(lang))
except OSError:
exit('Failed to create output/{} dir'.format(lang))
if not os.path.isdir('output/{}/pinout'.format(lang)):
try:
os.mkdir('output/{}/pinout'.format(lang))
except OSError:
exit('Failed to create output/{}/pinout dir'.format(lang))
try:
os.mkdir('output/{}/pinout'.format(lang))
except OSError:
exit('Failed to create output/{}/pinout dir'.format(lang))
overlays = map(load_overlay, overlays)
overlay_subnav = ['featured']
featured_boards = []
'''
Build up the navigation between overlays. This needs to be done before rendering pages
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]
if overlay['src'] in pinout.settings['featured'] and 'image' in overlay and len(featured_boards) < 3:
featured_boards.append(overlay)
if 'class' in overlay and 'type' in overlay:
o_class = overlay['class']
o_type = overlay['type']
if o_class not in nav_html:
nav_html[o_class] = {}
if o_type not in nav_html[o_class]:
nav_html[o_class][o_type] = []
if o_class == 'board' and o_type not in overlay_subnav:
overlay_subnav.append(o_type)
nav_html[o_class][o_type] += [link]
overlays = map(load_overlay,overlays)
for url, name in select_overlays:
overlays_html += '<li><a href="{}{}">{}</a></li>'.format(base_url, url, name)
featured_boards_html = ''
for overlay in featured_boards:
featured_boards_html += '<div class="featured"><a href="{base_url}{page_url}"><img src="{resource_url}boards/{image}" /><strong>{name}</strong><span>{description}</span></a></div>'.format(
image=overlay['image'],
name=overlay['name'],
page_url=overlay['page_url'],
base_url=base_url,
resource_url=resource_url,
description=overlay['description']
)
featured_boards_html = '<div class="group group_featured">' + featured_boards_html + '</div>'
'''
Generate legacy navigation menu for all overlays in a single drop-down
'''
overlays_html.sort()
overlays_html = ''.join(map(lambda x: '<li><a href="{}{}">{}</a></li>'.format(base_url, x[0], x[1]), overlays_html))
'''
Generate the new categorised navigation menu
'''
overlay_subnav = ''.join(map(lambda overlay_type: '<li class="group_{cls}" data-group="{cls}">{text}</li>'.format(cls=overlay_type,text=strings['group_' + overlay_type]),overlay_subnav))
for overlay_type in nav_html.keys():
for overlay_group, items in nav_html[overlay_type].iteritems():
items.sort()
group_items = (''.join(map(lambda x: '<li><a href="{}{}">{}</a></li>'.format(base_url, x[0], x[1]), items)))
nav_html[overlay_type][overlay_group] = '<div class="group group_' + overlay_group + '"><ul>' + group_items + '</ul></div>'
nav_html[overlay_type] = ''.join(nav_html[overlay_type].values())
if overlay_type == 'board':
nav_html[overlay_type] = '<div class="group-nav"><ul>' + overlay_subnav + '</ul></div>' + featured_boards_html + nav_html[overlay_type]
print(nav_html)
'''
Manually add the index page as 'pinout', this is due to how the
@ -406,77 +518,93 @@ and all other pages in /pinout/
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('index.md')})
navs['index'] = render_nav('pinout')
print('Rendering pin pages...')
'''
Add the 404 page if 404.md is present.
'''
page404 = load_md('404.md')
if page404 is not None:
pages['404'] = {}
pages['404']['rendered_html'] = render_overlay_page({'name': '404', 'long_description': page404})
navs['404'] = render_nav('pinout')
for pin in range(1,len(pinout.pins)+1):
(pin_url, pin_html, pin_title) = render_pin_page(pin)
if pin_url == None:
continue
hreflang = get_hreflang_urls('pin{}'.format(pin))
langlinks = get_lang_urls('pin{}'.format(pin))
print('\nRendering pin pages...')
pin_nav = render_nav(pin_url)
pin_html = pinout.render_html(template,
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']
)
print('Outputting page {}'.format(pin_url))
for pin in range(1, len(pinout.pins) + 1):
(pin_url, pin_html, pin_title) = render_pin_page(pin)
if pin_url is None:
continue
with open(os.path.join('output',lang,'pinout','{}.html'.format(pin_url)),'w') as f:
f.write(pin_html)
hreflang = get_hreflang_urls('pin{}'.format(pin))
langlinks = get_lang_urls('pin{}'.format(pin))
#nav = render_nav()
pin_nav = render_nav(pin_url)
pin_html = pinout.render_html(template,
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'],
langcode=lang,
nav_html=nav_html
)
print('Rendering overlay and index pages...')
print('>> 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...')
for url in pages:
content = pages[url]['rendered_html']
nav = navs[url]
hreflang = []
langlinks = []
content = pages[url]['rendered_html']
nav = navs[url]
hreflang = []
langlinks = []
if url == 'index':
hreflang = get_hreflang_urls('index')
langlinks = get_lang_urls('index')
if url == 'index':
hreflang = get_hreflang_urls('index')
langlinks = get_lang_urls('index')
if 'src' in pages[url]:
src = pages[url]['src']
hreflang = get_hreflang_urls(src)
langlinks = get_lang_urls(src)
if 'src' in pages[url]:
src = pages[url]['src']
hreflang = get_hreflang_urls(src)
langlinks = get_lang_urls(src)
if not 'description' in pages[url]:
pages[url]['description'] = pinout.settings['default_desc']
if not 'description' in pages[url]:
pages[url]['description'] = pinout.settings['default_desc']
if 'name' in pages[url]:
pages[url]['name'] = pages[url]['name'] + pinout.settings['title_suffix']
else:
pages[url]['name'] = pinout.settings['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']
html = pinout.render_html(template,
lang_links="\n\t\t".join(langlinks),
hreflang = "\n\t\t".join(hreflang),
nav = nav,
content = content,
overlays = overlays_html,
resource_url = resource_url,
description = pages[url]['description'],
title = pages[url]['name']
)
print('Outputting page {}'.format(url))
if url != 'index':
url = os.path.join('pinout',url)
html = pinout.render_html(template,
lang_links="\n\t\t".join(langlinks),
hreflang="\n\t\t".join(hreflang),
nav=nav,
content=content,
overlays=overlays_html,
resource_url=resource_url,
description=pages[url]['description'],
title=pages[url]['name'],
langcode=lang,
nav_html=nav_html
)
with open(os.path.join('output',lang,'{}.html'.format(url)),'w') as f:
f.write(html)
if url != 'index' and url != '404':
url = os.path.join('pinout', url)
print('>> {}.html'.format(url))
with open(os.path.join('output', lang, '{}.html'.format(url)), 'w') as f:
f.write(html)
print('\nAll done!')

View File

@ -3,20 +3,17 @@ import json
import markdown
import unicodedata
import re
import os
import time
import sys
import pinout
import yaml
import markjaml
reload(sys)
sys.setdefaultencoding('utf8')
lang = "en-GB"
lang = "en"
if len(sys.argv) > 1:
lang = sys.argv[1]
lang = sys.argv[1]
pinout.load(lang)
@ -24,12 +21,14 @@ overlays = pinout.settings['overlays']
pages = {}
def cssify(value):
value = slugify(value);
if value[0] == '3' or value[0] == '5':
value = 'pow' + value
return value
value = slugify(value);
if value[0] == '3' or value[0] == '5':
value = 'pow' + value
return value
def slugify(value):
"""
@ -41,84 +40,89 @@ def slugify(value):
value = re.sub('[^\w\s-]', '', value).strip().lower()
return re.sub('[-\s]+', '_', value)
def load_overlay(overlay):
try:
data = markjaml.load('src/{}/overlay/{}.md'.format(lang,overlay))
try:
data = markjaml.load('src/{}/overlay/{}.md'.format(lang, overlay))
loaded = data['data']
except IOError:
return None
loaded = data['data']
except IOError:
return None
details = []
details = []
if 'manufacturer' in loaded:
details.append('* Made by ' + loaded['manufacturer'])
if 'manufacturer' in loaded:
details.append('* Made by ' + loaded['manufacturer'])
if 'pincount' in loaded:
pincount = int(loaded['pincount'])
if pincount == 40:
details.append('* HAT form-factor')
elif pincount == 26:
details.append('* Classic 26-pin')
else:
details.append('* {} pin header'.format(pincount))
if 'pincount' in loaded:
pincount = int(loaded['pincount'])
if pincount == 40:
details.append('* HAT form-factor')
elif pincount == 38:
details.append('* pHAT form-factor')
elif pincount == 26:
details.append('* Classic 26-pin')
else:
details.append('* {} pin header'.format(pincount))
if 'pin' in loaded:
uses_5v = False
uses_3v = False
uses = 0
for pin in loaded['pin']:
pin = str(pin)
if pin.startswith('bcm'):
pin = pinout.bcm_to_physical(pin[3:])
if 'pin' in loaded:
uses_5v = False
uses_3v = False
uses = 0
for pin in loaded['pin']:
pin = str(pin)
if pin.startswith('bcm'):
pin = pinout.bcm_to_physical(pin[3:])
if pin in pinout.pins:
actual_pin = pinout.pins[pin]
if pin in pinout.pins:
actual_pin = pinout.pins[pin]
if actual_pin['type'] in ['+3v3','+5v','GND']:
if actual_pin['type'] == '+3v3':
uses_3v = True
if actual_pin['type'] == '+5v':
uses_5v = True
else:
uses += 1
if actual_pin['type'] in ['+3v3', '+5v', 'GND']:
if actual_pin['type'] == '+3v3':
uses_3v = True
if actual_pin['type'] == '+5v':
uses_5v = True
else:
uses += 1
if uses > 0:
details.append('* Uses {} GPIO pins'.format(uses))
if uses > 0:
details.append('* Uses {} GPIO pins'.format(uses))
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('* Uses I2C')
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('* Uses I2C')
if 'url' in loaded:
details.append('* [More Information]({url})'.format(url=loaded['url']))
if 'url' in loaded:
details.append('* [More Information]({url})'.format(url=loaded['url']))
if 'github' in loaded:
details.append('* [GitHub Repository]({url})'.format(url=loaded['github']))
if 'github' in loaded:
details.append('* [GitHub Repository]({url})'.format(url=loaded['github']))
if 'buy' in loaded:
details.append('* [Buy Now]({url})'.format(url=loaded['buy']))
if 'buy' in loaded:
details.append('* [Buy Now]({url})'.format(url=loaded['buy']))
if not 'page_url' in loaded:
loaded['page_url'] = slugify(loaded['name'])
if not 'page_url' in loaded:
loaded['page_url'] = slugify(loaded['name'])
pages[loaded['page_url']] = loaded
return loaded
pages[loaded['page_url']] = loaded
return loaded
def load_md(filename):
filename = 'src/{}/{}'.format(lang, filename)
try:
html = markdown.markdown(open(filename).read(), extensions=['fenced_code'])
filename = 'src/{}/{}'.format(lang, filename)
try:
html = markdown.markdown(open(filename).read(), extensions=['fenced_code'])
return html
except IOError:
print('Unable to load markdown from {}'.format(filename))
return ''
return html
except IOError:
print('Unable to load markdown from {}'.format(filename))
return ''
overlays = map(load_overlay,overlays)
print(json.dumps(overlays))
overlays = map(load_overlay, overlays)
print(json.dumps(overlays))

7
make_all.sh Executable file
View File

@ -0,0 +1,7 @@
#!/bin/bash
for d in src/??; do
if [ -d $d ]; then
l=$(basename $d)
make LANG=$l
fi
done

View File

@ -4,6 +4,7 @@ import yaml
import re
import unicodedata
def slugify(value):
"""
Normalizes string, converts to lowercase, removes non-alpha characters,
@ -14,42 +15,43 @@ def slugify(value):
value = re.sub('[^\w\s-]', '-', value).strip().lower()
return re.sub('[-\s]+', '-', value)
def load(file):
'''
Loads and parses JSON-embedded Markdown file, chopping out and
parsing any JSON contained therein.
'''
Loads and parses JSON-embedded Markdown file, chopping out and
parsing any JSON contained therein.
Returns an object that includes the JSON data, and the parsed HTML.
'''
markson = open(file).read()
Returns an object that includes the JSON data, and the parsed HTML.
'''
markson = open(file).read()
_data = re.search(re.compile(r'<!--(JSON:|\n---\n)(.*)-->', re.DOTALL),markson)
_data = re.search(re.compile(r'<!--(JSON:|\n---\n)(.*)-->', re.DOTALL), markson)
_markdown = re.sub(re.compile(r'<!--(JSON:|\n---\n)(.*)-->', re.DOTALL),'',markson)
_html = markdown.markdown(_markdown, extensions=['fenced_code'])
_markdown = re.sub(re.compile(r'<!--(JSON:|\n---\n)(.*)-->', re.DOTALL), '', markson)
_html = markdown.markdown(_markdown, extensions=['fenced_code'])
# Scan for the Title in the Markdown file, this is always assumed
# to be the first string starting with a single hash/pound ( # ) sign
_title = re.search(re.compile(r'^#[^\#](.*)$', re.MULTILINE),markson)
# Scan for the Title in the Markdown file, this is always assumed
# to be the first string starting with a single hash/pound ( # ) sign
_title = re.search(re.compile(r'^#[^\#](.*)$', re.MULTILINE), markson)
if _title != None:
_title = _title.group(0).replace('#','').strip()
if _title != None:
_title = _title.group(0).replace('#', '').strip()
if _data != None:
_type = _data.group(0)[4:8].upper().strip()
if _data != None:
_type = _data.group(0)[4:8].upper().strip()
if _type == 'JSON':
_data = re.search('\{(.*)\}',_data.group(0),re.DOTALL).group(0)
_data = json.loads(_data)
elif _type == '---':
_data = re.search('\n(.*)\n',_data.group(0),re.DOTALL).group(0)
_data = yaml.load(_data)
else:
data = {}
if _type == 'JSON':
_data = re.search('\{(.*)\}', _data.group(0), re.DOTALL).group(0)
_data = json.loads(_data)
elif _type == '---':
_data = re.search('\n(.*)\n', _data.group(0), re.DOTALL).group(0)
_data = yaml.load(_data)
else:
data = {}
_data['title'] = _title
_data['title'] = _title
elif _title != None:
_data = {'title':_title}
elif _title != None:
_data = {'title':_title}
return {'data':_data, 'html':_html}
return {'data':_data, 'html':_html}

View File

@ -1,7 +1,6 @@
import json
import yaml
import time
import markdown
DB_FILE = 'pi-pinout.yaml'
SETTINGS_FILE = 'settings.yaml'
@ -9,43 +8,57 @@ SETTINGS_FILE = 'settings.yaml'
pins = None
settings = None
def get_setting(setting, default = None):
if setting in settings and settings[setting] != None:
return settings[setting]
return default
def render_html(*args, **kwargs):
html = args[0]
kwargs['v'] = str(int(time.time()))
for key in kwargs:
html = html.replace('{{' + key + '}}', kwargs[key])
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:
html = html.replace('{{' + key + '}}', kwargs[key])
return html
def bcm_to_physical(pin):
for idx in pins:
compare_pin = pins[idx]
if 'scheme' in compare_pin:
if 'bcm' in compare_pin['scheme']:
if compare_pin['scheme']['bcm'] == int(pin):
#print("Mapping BCM{} to {}".format(pin, str(idx)))
return str(idx)
return physical_from(pin, 'bcm')
def wiringpi_to_physical(pin):
return physical_from(pin, 'wiringpi')
def physical_from(pin, scheme='bcm'):
if scheme in ['bcm', 'wiringpi']:
for idx in pins:
compare_pin = pins[idx]
if 'scheme' in compare_pin:
if scheme in compare_pin['scheme']:
if compare_pin['scheme'][scheme] == int(pin):
#print("Mapping {}{} to {}".format(scheme, pin, str(idx)))
return str(idx)
elif scheme == 'physical':
return pin
return None
def physical_to_bcm(pin):
pin = pins[pin]
if 'scheme' in pin:
if 'bcm' in pin['scheme']:
return str(pin['scheme']['bcm'])
return None
return physical_to(pin, 'bcm')
def physical_to_wiringpi(pin):
pin = pins[pin]
if 'scheme' in pin:
if 'wiringpi' in pin['scheme']:
return str(pin['scheme']['wiringpi'])
return None
return physical_to(pin, 'wiringpi')
def physical_to(pin, scheme='bcm'):
if scheme in ['bcm','wiringpi']:
if scheme in ['bcm', 'wiringpi']:
pin = pins[pin]
if 'scheme' in pin:
if scheme in pin['scheme']:
@ -54,16 +67,17 @@ def physical_to(pin, scheme='bcm'):
return pin
return None
def load(lang='en-GB'):
def load(lang='en'):
global pins, settings
if DB_FILE.endswith('.yaml'):
db = yaml.load(open('src/{}/{}'.format(lang,DB_FILE)).read())
db = yaml.load(open('src/{}/{}'.format(lang, DB_FILE)).read())
else:
db = json.load(open('src/{}/{}'.format(lang,DB_FILE)))
db = json.load(open('src/{}/{}'.format(lang, DB_FILE)))
if SETTINGS_FILE.endswith('.yaml'):
settings = yaml.load(open('src/{}/{}'.format(lang,SETTINGS_FILE)).read())
settings = yaml.load(open('src/{}/{}'.format(lang, SETTINGS_FILE)).read())
else:
settings = json.load(open('src/{}/{}'.format(lang,SETTINGS_FILE)))
settings = json.load(open('src/{}/{}'.format(lang, SETTINGS_FILE)))
pins = db['pins']

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 65 KiB

BIN
resources/de.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 545 B

View File

Before

Width:  |  Height:  |  Size: 599 B

After

Width:  |  Height:  |  Size: 599 B

BIN
resources/es.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 469 B

0
resources/fr-FR.png → resources/fr.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 545 B

After

Width:  |  Height:  |  Size: 545 B

BIN
resources/it.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 420 B

View File

@ -1,5 +1,5 @@
* {margin:0;padding:0;text-decoration:none;}
body {font-family:'Sanchez', sans-serif;}
body {font-family:'Avenir', sans-serif;font-weight:500;}
pre {font-family:'Ubuntu Mono', sans-serif;font-size:13px;}
ul.bottom a {color:#E9E5D2;}
ul.top a {color:#063541;}
@ -11,144 +11,352 @@ table * {text-align:left;font-size:13px;}
table.pin-functions {width:100%;}
table.pin-functions td {width:16.6666%;}
h2 {font-size:18px;margin-top:20px;}
.drop-down {
float: right;
display: block;
width: 500px;
border:2px solid #D6264E;
margin-left:20px;
.prettyprint {
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;
}
.logo a {color:#FFFFFF;}
.logo img {float:left;margin:0 13px;}
.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 */
}
.overlay {
margin: 0;
padding: 0;
list-style: none;
display:none;
background:rgba(255,255,255,0.95);
padding:10px 0px;
clear:both;
overflow:hidden;
}
.overlay-container span {
display:block;
float:left;
}
.overlay li {
display:block;
width:250px;
float:left;
}
.overlay li:nth-child(odd) a {
border-right:2px solid #D6264E;
}
.overlay li:nth-child(4n+1) a,.overlay li:nth-child(4n+2) a {
background:rgba(214, 38, 78, 0.05);
}
.overlay li a, .drop-down span {
display:block;
font-size:14px;
line-height:28px;
color:#063541;
padding:0 10px;
cursor:pointer;
width:230px;
}
.drop-down span {width:60px;}
.drop-down span:hover, .drop-down:hover span {
background:#D6264E;
color:#FFFFFF;
}
.overlay li a:hover {
color:#FFFFFF;
background:#073642;
#container {
width:1000px;
margin:0 auto;
position:relative;
padding-top:4px;
}
.main-nav {
position:absolute;
right:0px;
top:0px;
/*
Very top nav
*/
#lang {
display:block;
overflow:hidden;
background:#C7C2AE;
}
.lang-nav {
line-height:30px;
display:block;
overflow:hidden;
float:right;
margin:0;
padding:0;
margin-right:10px;
list-style:none;
}
.main-nav li {
.lang-nav li {
margin:0;
padding:0;
float:left;
border-right: 1px solid #666;
padding-right: 10px;
}
.main-nav li:last-child {
.lang-nav li:last-child {
border-right:none;
padding-right:0px;
}
.main-nav li a {
.lang-nav li a {
padding-left:10px;
color:#6D6D6D;
font-size:16px;
}
.main-nav li a:hover {
.lang-nav li a:hover {
color:#D6264E;
}
nav#gpio {
position:relative;
width:300px;
background:#5F8645;
height:680px;
float:left;
margin-right:200px;
}
.phys {font-size:90%;opacity:0.8;color:#D33682;}
.bottom .phys {color:#002B36;}
.bottom .active .phys, .bottom :hover .phys,
.bottom .legend .phys {color:#FFF;}
/*
Content Area
*/
#content {
float:left;
background:#EBE6D3;
width:500px;
min-height:600px;
padding-bottom:60px;
min-height:640px;
padding-bottom:20px;
}
#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:20px;
padding:15px;
}
nav#gpio ul.top {
p.intro {
color:#268BD2;
}
p,pre {
margin-top:10px;
font-size: 16px;
line-height: 150%;
}
h3 {
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
*/
#sections {
overflow: hidden;
}
#sections ul, #sections ul li {
list-style: none;
margin:0;
padding:0;
}
#sections > ul {
display:block;
width:100%;
background:#FFF;
overflow:hidden;
padding-bottom:4px;
}
#sections > ul > li {
width:33%;
box-sizing:border-box;
border-left:4px solid #FFF;
float:left;
}
#sections > ul > li > a {
padding:0px 20px;
height:46px;
line-height:46px;
color:#fff;
display:block;
font-size:20px;
position: relative;
}
#sections > ul > li > a:after {
content: '';
border:10px solid transparent;
border-top-color:#FFF;
display:block;
width:0;
height:0;
position:absolute;
left:255px;
top:17px;
right:20px;
top:50%;
margin-top:-5px;
}
#sections ul .dropdown {
display:none;
position:absolute;
right:0px;
min-width:500px;
max-width:704px;
z-index:1;
}
#sections ul .boards .dropdown {
width:704px;
}
#sections .dropdown .group, #sections .dropdown .group-nav {
padding:10px;
box-sizing:border-box;
display:block;
}
#sections ul .dropdown .group-nav {
padding-right:0;
}
#sections .group li {
display:inline-block;
margin-right:5px;
margin-bottom:5px;
}
#sections .group a {
color:#FFF;
padding:5px 10px;
display:block;
}
#sections .boards .group-nav {
width:25%;
display:block;
float:left;
}
#sections .boards .group {
width:75%;
display:block;
float:left;
min-height:390px;
}
#sections .boards .group-nav li {
display:block;
color:#FFFFFF;
padding:5px 10px;
display:block;
margin-bottom:5px;
cursor:pointer;
}
#sections .boards .group-nav li:hover,
#sections .boards .group-nav li.active {background: #C32672;}
#sections .boards a, #sections .boards .dropdown {background: #D33682;}
#sections .boards .group {background: #C32672;}
#sections .boards ul a:hover {color: #D33682;background:#FFF;}
#sections .interfaces a, #sections .interfaces .dropdown {background: #6c71c4;}
#sections .interfaces ul a {background: #5c61b4;}
#sections .interfaces ul a:hover {color: #6c71c4;background:#FFF;}
#sections .guides a, #sections .guides .dropdown {background: #268BD2;}
#sections .guides ul a {background: #167BC2;}
#sections .guides ul a:hover {color: #268BD2;background:#FFF;}
#sections .boards {
border-left:none;
width:34%;
}
#sections .featured {
box-sizing:border-box;
width:33.3333%;
display:block;
float:left;
text-align:center;
}
#sections .featured img {
max-width:100%;
height:auto;
display:block;
}
#sections .featured a {
background:none;
}
#sections .featured a:hover {
background: #D33682;
}
#sections .featured strong {
font-size:20px;
font-family: 'Avenir', sans-serif;
font-weight: 500;
color:#FFFFFF;
margin: 0;
padding: 0 5px;
display:block;
}
#sections .featured span {
color: #FFFFFF;
font-size: 16px;
font-weight: normal;
margin: 0;
padding: 0 5px;
display:block;
}
/*
Footer
*/
.footer a {color:#5F8645;}
/*
GPIO nav
*/
nav#gpio {
position:relative;
width:292px;
background:#5F8645;
height:662px;
float:left;
margin-right:208px;
border-top-right-radius:46px;
border-bottom-right-radius:46px;
}
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#gpio:after {
top:586px;
}
.phys {
color:#002B36;
font-size:11px;
opacity:0.8;
position:absolute;
left:-33px;
}
.bottom .phys {
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 {
position:absolute;
left:16px;
top:17px;
list-style:none;
left:0px;
}
nav#gpio ul.top li {text-indent:52px;}
nav#gpio ul.top li {text-indent:63px;}
nav#gpio li a {
display:block;
width:236px;
width:244px;
position:relative;
font-size:13px;
line-height:29px;
height:27px;
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;
@ -159,12 +367,17 @@ nav#gpio ul.bottom li a {
nav#gpio li a small {font-size:11px;}
nav#gpio li a:hover,
nav#gpio li.active a {
background:#063541;
/*background:#EBE6D3;*/
color:#FFF;
color:#FFFFFF;
}
nav#gpio li a:hover .phys, nav#gpio li.active a .phys{
color:#FFFFFF;
}
nav#gpio li.overlay-pin a:hover .phys, nav#gpio li.overlay-pin a .phys {
color:#002B36;
}
nav#gpio ul.bottom li a:hover,
@ -174,12 +387,9 @@ nav#gpio ul.bottom li.active a {
}
nav#gpio li.overlay-pin a {
background:rgba(235, 230, 211, 0.50);
color:#063541;
}
nav#gpio li.overlay-pin a,
nav#gpio ul.bottom li.overlay-pin a {
background:rgba(235, 230, 211, 0.50); /*rgba(6, 53, 65, 0.50);*/
background:rgb(235, 230, 211);
color:#063541;
}
@ -198,14 +408,30 @@ nav#gpio ul.bottom a {
}
nav#gpio span.pin {
display:block;
border:1px solid #FFFFFF;
border:1px solid transparent;
border-radius:50%;
width:19px;
height:19px;
width:16px;
height:16px;
background:#002B36;
position:absolute;
right:3px;
top:3px;
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;
}
nav#gpio ul.top span.pin {
left:2px;
top:2px;
}
nav#gpio li.legend a {
background:#EBE6D3;
@ -220,170 +446,28 @@ nav#gpio ul.top li.legend {
padding-left:5px;
left:-5px;
}
nav#gpio ul.top span.pin {
left:3px;
top:3px;
}
nav#gpio span.pin:after {
content:'';
display:block;
border-radius:100%;
background:#FDF6E3;
position:absolute;
left:6px;
top:6px;
width:7px;
height:7px;
font-size:7px;
box-shadow: 0 0 5px rgba(10,41,51,0.5);
}
nav#gpio li.pow5v span.pin {
background:#DC322F;
}
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;}
nav#gpio li.gpio span.pin {
background:#859900;
}
div#pinbase, div#pinbasebplus {width:58px;position:absolute;left:216px;}
nav#gpio li.uart span.pin,
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.pin2 span.pin,
nav#gpio li.pin4 span.pin {
background:#DC322F;
}
nav#gpio li.pin3 span.pin,
nav#gpio li.pin5 span.pin,
nav#gpio li.pin27 span.pin,
nav#gpio li.pin28 span.pin {
background:#268BD2;
}
nav#gpio li.pin8 span.pin,
nav#gpio li.pin10 span.pin,
nav#gpio li.pin17 span.pin {
background:#B58900;
}
nav#gpio li.pin7 span.pin,
nav#gpio li.pin11 span.pin,
nav#gpio li.pin13 span.pin,
nav#gpio li.pin15 span.pin,
nav#gpio li.pin12 span.pin,
nav#gpio li.pin16 span.pin,
nav#gpio li.pin18 span.pin,
nav#gpio li.pin22 span.pin,
nav#gpio li.pin29 span.pin,
nav#gpio li.pin31 span.pin,
nav#gpio li.pin33 span.pin,
nav#gpio li.pin32 span.pin,
nav#gpio li.pin35 span.pin,
nav#gpio li.pin36 span.pin,
nav#gpio li.pin37 span.pin,
nav#gpio li.pin38 span.pin,
nav#gpio li.pin40 span.pin {
background:#859900;
}
nav#gpio li.pin19 span.pin,
nav#gpio li.pin21 span.pin,
nav#gpio li.pin23 span.pin,
nav#gpio li.pin24 span.pin,
nav#gpio li.pin26 span.pin {
background:#D33682;
}
*/
nav#gpio li.pin1 span.pin {
border-radius:0;
background:#B58900;
}
div#pinbase {
width:72px;
height:389px;
height:324px;
background:#073642;
position:absolute;
left:218px;
top:10px;
top:80px;
}
div#pinbasebplus {
width:72px;
height:215px;
height:177px;
background:#184753;
position:absolute;
left:218px;
top:401px;
top:404px;
}
.logo {
width:350px;
font-size:28px;
line-height:45px;
color:#888888;
margin-bottom:5px;
cursor:pointer;
position: absolute;
left:0px;
top:5px;
}
.logo a {
color:#888888;
}
.logo img {float:left;position:relative;top:0px;margin:0 13px;
-moz-transform:rotate(-45deg);
-webkit-transform:rotate(-45deg);
transform:rotate(-45deg);
width:30px;
}
.logo span {
color:#D6264E;
}
.logo span.out {
color:#5FB12D;
}
.logo a:hover span, .logo a:hover, .logo a:hover span.out {
color:#5FB12D;
}
.pin27, .pin28 {margin-top:16px;}
p.intro {
color:#268BD2;
}
p,pre {
margin-top:10px;
font-size: 15px;
line-height: 150%;
}
h3 {
color:#D33682;
font-size:16px;
font-weight:bold;
}
#container {
width:1000px;
margin:0 auto;
margin-top:10px;
position:relative;
padding-top:70px;
}
.overlay-container {
position: absolute;
right: 0px;
top: 35px;
font-size:20px;
color:#D6264E;
}
.overlay-container select {font-size:20px;}
article a {color:#859900;text-decoration:underline;}
article ul {margin-left:20px;margin-top:10px;margin-bottom:10px;}
.pin27, .pin28 {margin-top:12px;}
ul.legend {
float:right;
list-style:none;
@ -425,6 +509,10 @@ ol.linenums {margin-left:30px;}
.board {
right:1200px;
}
#sections ul .dropdown {
min-width:700px;
max-width:700px;
}
#content {
width:700px;
}

View File

@ -1,31 +1,69 @@
jQuery(document).ready(function(){
var overlay = $('.drop-down .overlay');
var overlay_slideUp;
var dropdowns = $('#sections ul li .dropdown');
$('pre').addClass('prettyprint').addClass('linenums');
window.prettyPrint&&prettyPrint();
$('.drop-down').on('click',function(e){
e.stopPropagation();
overlay.slideDown(100);
});
$('#container').on('click',function(){
overlay.slideUp(100);
var groups = $('#sections .boards .group');
var group_nav = $('#sections .boards .group-nav li');
groups.hide().filter(':eq(0)').show();
group_nav.removeClass('active').filter(':eq(0)').addClass('active');
group_nav.on('click',function(e){
group_nav.removeClass('active');
$(this).addClass('active');
groups.hide();
var group = $(this).data('group');
groups.filter('.group_' + group).show();
})
$('.drop-down').hover(function(){
clearTimeout(overlay_slideUp);
overlay_slideUp = setTimeout(function(){overlay.slideDown(100);}, 200);
},function(){
clearTimeout(overlay_slideUp);
overlay_slideUp = setTimeout(function(){overlay.slideUp(100);}, 500);
$('#container').on('click',function(){
dropdowns.slideUp(100);
});
$.gaat({
trackExternal: true,
trackDownload: false,
trackFTP: false
$('#sections > ul > li > a').on('click',function(e){
e.preventDefault();
e.stopPropagation();
var dropdown = $(this).parent().find('.dropdown');
dropdowns.hide();
dropdown.show();
});
$('#sections > ul > li > a').hover(function(e){
e.preventDefault();
var dropdown = $(this).parent().find('.dropdown');
clearTimeout(overlay_slideUp);
if(dropdowns.filter(':visible').length){
dropdowns.hide();
dropdown.show();
}
else
{
overlay_slideUp = setTimeout(function(){dropdowns.slideUp(100);dropdown.slideDown(100);}, 300);
}
},function(e){
e.preventDefault();
var dropdown = $(this).parent().find('.dropdown');
clearTimeout(overlay_slideUp);
overlay_slideUp = setTimeout(function(){dropdown.slideUp(100);}, 100);
});
dropdowns.on('click',function(e){
e.stopPropagation();
})
dropdowns.hover(function(e){
clearTimeout(overlay_slideUp);
},function(e){
e.preventDefault();
var dropdown = $(this);
clearTimeout(overlay_slideUp);
overlay_slideUp = setTimeout(function(){dropdown.slideUp(100);}, 100);
})
$('article p').each(function(){

View File

@ -4,7 +4,7 @@ div#pinbasebplus,
div#pinbase {background:transparent;}
#article {padding:0px;}
.main-nav, .overlay-container, .logo img {display:none;}
.main-nav, .overlay-container, .logo img, #sections, #lang, nav#gpio:before, nav#gpio:after {display:none;}
ul.bottom a {
color:#000000;

BIN
resources/pt.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 554 B

0
resources/tr-TR.png → resources/tr.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 492 B

After

Width:  |  Height:  |  Size: 492 B

View File

@ -1,27 +1,31 @@
#!/usr/bin/env python
from flask import Flask, redirect, send_from_directory
from flask import Flask, send_from_directory
import sys
app = Flask(__name__)
lang = 'en-GB'
lang = 'en'
@app.route('/')
def show_index():
return send_from_directory(basedir,'index.html')
return send_from_directory(basedir, 'index.html')
@app.route("/resources/<path:filename>")
def custom_static(filename):
return send_from_directory(basedir + 'resources/', filename)
return send_from_directory(basedir + 'resources/', filename)
@app.route("/<path:page>")
def show_page(page):
return send_from_directory(basedir,'{}.html'.format(page))
return send_from_directory(basedir, '{}.html'.format(page))
if __name__ == "__main__":
if len(sys.argv) > 1:
lang = sys.argv[1]
if len(sys.argv) > 1:
lang = sys.argv[1]
basedir = 'output/{lang}/'.format(lang=lang)
basedir = 'output/{lang}/'.format(lang=lang)
app.run(host='0.0.0.0', debug=True)
app.run(host='0.0.0.0', debug=True)

View File

@ -1,41 +1,19 @@
#Pinout Overlays
A Pinout overlay describes the functions of the Raspberry Pi pins for a specific board.
An overlay is specified by a Markdown file containing mandatory and optional fields as well as an extended long-description.
An overlay is constructed from a JSON file and, optionally, a markdown file containing an extended long-description.
The Markdown overlay file must include as a minimum a "name", "manufacturer", (short) "description", main "url", and last but not least a "pin" array defining all the pins that the board uses. It is also recommended to specify the header "pincount" and board "formfactor", as well as whether the board includes an "eeprom" (for us to ensure the HAT specifications are respected where appropriate).
##JSON Format
A long description is also highly desirable so that visitors to the site can get an introduction to the add-on boards featured on the site if they are not familar with them.
The JSON overlay file must include a name, manufacturer name, URL, description and a "pin" array defining all the
pins that the board uses.
Note that the pin array must list each pin by its *physical* location, and include at least a "name" describing the function of that pin.
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".
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 active "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:
Power pins and EEPROM should specifically be excluded, but specifying the "power" and "eeprom" fields are highly recommended if that info is known (please check the board schematic, this info is typically not difficult to find!)
```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"
}
}
}
```
See the overlay template.md for more information. We recommend you use this template as a starting point for any new add-on board submission.

View File

@ -1,6 +1,40 @@
#Overlays History
This document only logs the changes to the overlay files that are relevant for purposes of translations. See files history for further details!
Feb 7, 2016
- added espiot-phat.md
Jan 31, 2016
- major tweaks to sense-hat.md
Dec 29, 2015
- added drum-hat.md
Dec 16, 2015
- added phat-dac.md
Dec 3, 2015
- added explorer-phat.md
- added scroll-phat.md
Nov 21, 2015
- added cirruslogicaudiocard.md
Nov 20, 2015
- added discohat.md
Nov 15, 2015
- major tweaks to piglow.md
Nov 14, 2015
- major tweaks to i2c.md and related pins
Nov 12, 2015
- major tweaks to arduino-spi.md
Nov 9, 2015
- major tweaks to sense-hat.md
Nov 8, 2015
- major tweaks to spi.md

23
src/de/index.md Normal file
View File

@ -0,0 +1,23 @@
#Pinout!
###Der umfassende Letifaden zur Raspberry Pi GPIO Anschlussbelegung - jetzt auch zum Raspberry Pi Model B+ und Raspberry Pi 2
Diese GPIO Anschlussbelegung ist nicht zum Ausdrucken gedacht, aber sie ist ein umfassender Leitfaden und eine tolles Nachschlagewerk für die GPIO-Pins Deines Raspberry Pi's.
##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
* Physical - Die Anschlussnummer, die dem physikalischen Pin an der Anschlussleiste des Raspberry Pi entspricht.
##Pi 2
Um den Start des Pi 2 zu feiern und all die daraus resultierenden neuen Pi-Fans zu berücksichtigen wurde Pinout
neu gestaltet. Es ist nun übersichtlicher, umfassender und genauer und wird ständig weiter verbessert.
##Model B+
Jetzt da es das Raspberry Pi Modell B Plus gibt, wurde Pinout um die 14 extra Anschlüsse erweitert, die der neue Raspberry mitbringt.
Hinweis: die 14 neuen Anschlüsse des B+ sind in diesem Leitfaden leicht von den
restlichen Anschlüssen abgesetzt - diesen Abstand wirst Du allerdings nicht auf dem Raspberry Pi finden!

41
src/de/overlay/README.md Normal file
View File

@ -0,0 +1,41 @@
#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

@ -42,16 +42,10 @@ Make sure you have no rogue SPI device drivers running and check it's connected
avrdude -p m328p -c gpio
```
To get started compiling Arduino sketches from the command line:
To get started compiling Arduino sketches from the command line, first:
```bash
sudo apt-get install arduino arduino-mk
```
This basic Makefile should get you started. Create a basic sketch, name it mysketch.ino and run:
```bash
export BOARD=atmega328
make
avrdude -p m328p -c gpio -e -U flash:w:build-cli/Arduino.hex
```
Then refer to this [article](http://pi.gadgetoid.com/article/programming-your-pico-piduino) for a complete run-through of the process!

View File

@ -3,7 +3,7 @@
name: Display-o-Tron HAT
manufacturer: Pimoroni
url: https://github.com/pimoroni/dot3k
description: A 3-line character LCD with a 6-zone RGB backlight and 6 touch buttons
description: Ein 3-zeiliges LCD mit einer 6-Zonen RGB Hintergrundbeleuchtung und 6 Tasten
pincount: 40
pin:
3:
@ -32,13 +32,13 @@ pin:
-->
#Display-o-Tron HAT
Display-o-Tron HAT uses both SPI and I2c to drive the LCD display, backlight and touch.
However both of these busses can be shared with other devices.
Der Display-o-Tron HAT benutzt den SPI- und I2C-Bus um das LC-Display, die Hintergrundbeleuchtung und die Tasten zu steuern bzw. abzufragen.
Beide Busse können aber weiterhin noch mit anderen Komponenten genutzt werden.
You can use the one-line product installer to get Display-o-Tron HAT set up and ready to go, just:
Mit diesem Einzeiler installierst Du den Display-o-Tron HAT:
```bash
curl get.pimoroni.com/dot3k | bash
```
And follow the instructions!
...den Rest findest Du in der Anleitung auf Github :-)

View File

@ -4,7 +4,7 @@ name: Display-o-Tron 3000
manufacturer: Pimoroni
github: https://github.com/pimoroni/dot3k
url: https://github.com/pimoroni/dot3k
description: A 3-line character LCD with an RGB backlight and joystick
description: Ein 3-zeiliges LCD mit RGB Hintergrundbeleuchtung und Joystick
install:
'devices':
- 'i2c'
@ -17,32 +17,32 @@ install:
'python':
- 'dot3k'
'examples': 'python/examples/'
pincount: 40
pincount: 26
pin:
3:
mode: i2c
5:
mode: i2c
7:
name: Joystick Button
name: Joystick Taste
mode: input
active: low
11:
name: Joystick Left
name: Joystick links
mode: input
active: low
13:
name: Joystick Up
name: Joystick oben
mode: input
active: low
15:
name: Joystick Right
name: Joystick rechts
mode: input
active: low
19:
mode: spi
21:
name: Joystick Down
name: Joystick unten
mode: input
active: low
22:
@ -54,10 +54,10 @@ pin:
-->
#Display-o-Tron 3000
You can use the one-line product installer to get Display-o-Tron 3000 set up and ready to go, just:
Mit diesem Einzeiler installierst Du das Display-o-Tron 3000:
```bash
curl get.pimoroni.com/dot3k | bash
```
And follow the instructions!
...den Rest findest Du in der Anleitung auf Github :-)

View File

@ -1,12 +1,14 @@
<!--
---
name: Raspberry Pi Dots
description: Join the dots to make a circuit
description: verbinde die Punkte um eine Schaltung zu erstellen
url: http://www.raspberrypi.org/dots/
github: https://github.com/raspberrypilearning/dots
formfactor: '40-way'
pincount: 40
pin:
bcm0:
name: 'Color: Blue'
name: 'Farbe: Blau'
direction: input
bcm1:
name: Dot 7
@ -36,7 +38,7 @@ pin:
name: Dot 17
direction: input
bcm10:
name: 'Color: Green'
name: 'Farbe: Grün'
direction: input
bcm11:
name: Dot 8
@ -63,7 +65,7 @@ pin:
name: Dot 20
direction: input
bcm19:
name: 'Color: Orange'
name: 'Farbe: Orange'
direction: input
bcm20:
name: Bear
@ -87,16 +89,18 @@ pin:
name: Dot 11
direction: input
bcm27:
name: 'Color: Red'
name: 'Farbe: Rot'
direction: input
-->
#Raspberry Pi Dots
###Dots is a Dot to Dot HAT board for the Raspberry Pi that lets you join-the-dots with BARE Conductive Paint!
###Dots ist eine verbinde die Punkte HAT Platine für den Raspberry Pi, auf dem Du Punkte mit leitender Farbe verbindest!
Every Dot on the Dots board is a "floating" metal contact just waiting to be pulled down to ground with a dab of paint.
Jeder Punkt auf der Dots-Platine ist ein offener Metallkontakt der darauf wartet mit der Farbe kontaktiert zu werden.
Um einen Punkt auszulesen setze den dazugehörigen Anschluss als Eingang und checke, ob der Kontakt hergestellt ist:
To read a Dot you should set its corresponding pin as an INPUT and make sure it's pulled up like so:
```python
import RPi.GPIO as GPIO
@ -105,8 +109,8 @@ GPIO.setup(dot_pin, GPIO.IN, GPIO.PUD_UP)
state = GPIO.input(dot_pin)
```
It's good practise to only turn on the PULLUP when you actually want to read the Dot, so a method like
this is recommended for reading:
Es ist gute Praxis den Eingang nur auf PULLUP zu schalten, wenn Du den Kontakt auch lesen möchtest.
Somit ist folgender Code empfohlen:
```python
def is_dot_connected(dot_pin):

View File

@ -5,7 +5,7 @@ manufacturer: Pimoroni
url: https://github.com/pimoroni/explorer-hat
github: https://github.com/pimoroni/explorer-hat
buy: http://shop.pimoroni.com/products/explorer-hat
description: An all-in-one light, input, motor, touch and output add-on board.
description: Eine Platine mit LEDs, Ein- und Ausgängen, Motorsteuerung, Sensor-Tasten und Steckbrett.
install:
'apt':
- 'python-smbus'
@ -98,16 +98,17 @@ pin:
mode: output
active: high
-->
#Explorer HAT and Explorer HAT Pro
#Explorer HAT und Explorer HAT Pro
5V inputs and outputs, touch pads, LEDs, analog inputs and an H-Bridge motor driver make up the Explorer HAT Pro- a jack of all trades prototyping side-kick for your Raspberry Pi.
Der Explorer HAT Pro besteht aus 5V Ein- und Ausgängen, Sensor-Tasten, LEDs, analogen Eingängen und einem H-Bridge Motor-Treiber.
Perfekt für alle möglichen Ideen auf dem Raspberry Pi auszuprobieren.
```bash
sudo apt-get install python-pip
sudo pip install explorer-hat
```
Then import it into your Python script and start tinkering:
Anschliessend die Libraries in Dein Python-Skript importieren und anfangen zu basteln:
```bash
import explorerhat

View File

@ -5,7 +5,7 @@ manufacturer: Pimoroni
url: https://github.com/pimoroni/explorer-hat
github: https://github.com/pimoroni/explorer-hat
buy: http://shop.pimoroni.com/products/explorer-hat
description: An all-in-one light, input, touch and output add-on board.
description: Eine Platine mit LEDs, Ein- und Ausgängen, Sensor-Tasten und Steckbrett.
install:
'devices':
- 'i2c'
@ -70,16 +70,17 @@ pin:
mode: output
active: high
-->
#Explorer HAT and Explorer HAT Pro
#Explorer HAT und Explorer HAT Pro
5V inputs and outputs, touch pads, LEDs, analog inputs and an H-Bridge motor driver make up the Explorer HAT Pro- a jack of all trades prototyping side-kick for your Raspberry Pi.
Der Explorer HAT Pro besteht aus 5V Ein- und Ausgängen, Sensor-Tasten, LEDs, analogen Eingängen und einem H-Bridge Motor-Treiber.
Perfekt für alle möglichen Ideen auf dem Raspberry Pi auszuprobieren.
```bash
sudo apt-get install python-pip
sudo pip install explorer-hat
```
Then import it into your Python script and start tinkering:
Anschliessend die Libraries in Dein Python-Skript importieren und basteln:
```bash
import explorerhat

24
src/de/overlay/ground.md Normal file
View File

@ -0,0 +1,24 @@
<!--
---
name: Masse (Ground)
description: Raspberry Pi Masse Pins
pin:
'6':
'9':
'14':
'20':
'25':
'30':
'34':
'39':
-->
#Masse (Ground)
Die Masseanschlüsse des Raspberry Pi sind alle miteinander verbunden. Es ist also egal, welchen
Du verwendets.
Es macht also Sinn einfach den Pin zu verwenden, der am nähesten zu dein anderen von Dir verwendeten
Pins ist oder alternativ den Pin, der am nähesten zu dem 5V-Pin liegt, den Du benutzt.
Wenn Du den [SPI](/pinout/spi)-Bus verwendest, dann macht es Sinn den Pin 17 für 3v3 Volt und Pin 25
für Masse zu verwenden, da sich diese Pins in der Nähe zu den SPIO-Pins befinden.

50
src/de/overlay/i2c.md Normal file
View File

@ -0,0 +1,50 @@
<!--
---
name: I2C
description: Raspberry Pi I2C Anschlüsse
pin:
'3':
name: Data
direction: both
active: high
'5':
name: Clock
direction: both
active: high
'27':
name: EEPROM Data
direction: both
active: high
'28':
name: EEPROM Clock
direction: both
active: high
-->
#I2C - Inter Integrated Circuit
Der I2C-Bus des Raspberry Pi ist sehr praktisch um mit vielen unterschiedlichen Bausteinen
zu kommunizieren - egal ob z.B. ein MCP23017 als digitale I/O-Erweiterung oder sogar ein ATmega.
Die Adresse einen angeschlossenen I2C-Bausteins kann mit einem einfachen Einzeiler überprüft werden:
```bash
sudo apt-get install i2c-tools
sudo i2cdetect -y 1
```
Den I2C-Bus kann man von Python aus über die smbus-Library ansteuern:
```bash
sudo apt-get install python-smbus
```
...und dann in Python:
```python
import smbus
DEVICE_BUS = 1
DEVICE_ADDR = 0x15
bus = smbus.SMBus(DEVICE_BUS)
bus.write_byte_data(DEVICE_ADDR, 0x00, 0x01)
```

View File

@ -23,7 +23,7 @@ pin:
description: (optional)
18:
name: Rotary Encoder
description: (optional)
description: (optional)
22:
name: IR Sensor
description: (optional)
@ -47,4 +47,4 @@ The Pi Dac uses GPIO22 to mute/unmute the Pi-AMP+.
You can use GPIO25 to connect an IR sensor and GPIO23/24 for a rotary encoder. Both of
these parts are optional, but are broken out on the Pi-DAC+ for convenient access.
Note: pins reserved for the rotary encoder and IR sensor can be used for other purposes if those add-ons have not been fitted and enabled by software.
Note: pins marked as optional can be used for general purpose if those add-ons are not enabled by software.

View File

@ -3,7 +3,7 @@
name: Piano HAT
manufacturer: Pimoroni
url: https://github.com/pimoroni/piano-hat
description: A tiny Pi piano with 16 touch-sensitive buttons
description: Ein kleines Pi Piano mit 16 berührungsempfindlichen Tasten
pincount: 40
i2c:
'0x28':
@ -34,14 +34,14 @@ pin:
-->
#Piano HAT
Piano HAT has 16 touch-sensitive buttons. 13 of these are a single Piano octave, the rest give you octave up/down and instrument select functionality.
Piano HAT hat 16 berührungsempfindliche Tasten. 13 dieser Tasten bilden eine Piano-Oktave, die anderen lassen die die Oktave hoch oder runter schalten und Instrumente auswählen.
It uses two Microchip CAP1188 chips with the i2c addresses 0x28 and 0x2b.
Der HAT benutzt zwei Microchip CAP1188 ICs mit den I2C Adressen 0x28 und 0x2b.
You can use the one-line product installer to get Piano HAT set up and ready to go, just:
Mit folgendem Einzeiler installierst Du die nötige Software:
```bash
curl get.pimoroni.com/pianohat | bash
```
And follow the instructions!
Den Rest findest Du in der Anleitung!

View File

@ -3,6 +3,7 @@
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

View File

@ -3,7 +3,7 @@
name: Pibrella
manufacturer: Pimoroni Vs Cyntech
url: https://github.com/pimoroni/pibrella
description: An all-in-one light, sound, input and output add-on board.
description: eine "Alles-in-Einem" Licht, Ton, Ein- und Ausgabe Erweiterungsplatine.
pincount: 26
pin:
'7':
@ -61,16 +61,17 @@ pin:
-->
#Pibrella
The all-in-one light, sound, input and output add-on board from Pimoroni vs Cyntech uses lots of IO on the Pi but leaves both Serial and I2C free leaving plenty of room for expansion if you get creative.
Die "Alles-in-Einem" Licht, Ton, Ein- und Ausgabe Erweiterungsplatine von Pimoroni vs Cyntech
benutzt jede Menge I/O Anschlüsse des Pi aber lässt die serielle Schnittstelle und den I2C-Bus noch frei und somit viel Raum für creative Erweiterungen!
Pibrella is easy to use, first you should install the module using LXTerminal/Command Line:
Pibrella is einfach zu benutzen - einfach das entsprechende Modul über die Kommandozeile installieren:
```bash
sudo apt-get install python-pip
sudo pip install pibrella
```
Then import it into your Python script and start tinkering:
... dann die Library in Dein Python-Skript importieren und anfangen zu basteln:
```bash
import pibrella

View File

@ -5,16 +5,12 @@ manufacturer: Pimoroni
url: https://github.com/pimoroni/piglow
github: https://github.com/pimoroni/piglow
buy: http://shop.pimoroni.com/products/piglow
description: Simply 18 LEDs in a spiral pattern controllable in Python.
description: 18 einfache LEDs als Spirale angeordnet und über Python ansteuerbar.
pincount: 26
pin:
'1': {}
'2': {}
'3':
mode: i2c
'5':
mode: i2c
'14': {}
'17': {}
-->
#PiGlow
#PiGlow

View File

@ -1,6 +1,6 @@
<!--
---
name: Ryanteck Motor Controller Board
name: Ryanteck Motorsteuerung
manufacturer: Ryanteck
url: http://www.ryanteck.uk/store/ryanteck-rpi-motor-controller-board
buy: http://www.ryanteck.uk/store/ryanteck-rpi-motor-controller-board
@ -24,15 +24,15 @@ pin:
direction: output
active: high
-->
#Ryanteck Motor Controller Board
#Ryanteck Motorsteuerung
###A quick and easy way to start driving motors on your Raspberry Pi
###Ein schneller und einfacher Weg um Motoren mit deinem Pi zu steuern.
```python
##Simple motor script for the RTK-000-001
##Simples Motor Script für den RTK-000-001
import RPi.GPIO as GPIO
import time
#Set to broadcom pin numbers
#Setze BCM Broadcom Pin Nummern
GPIO.setmode(GPIO.BCM)
#Motor 1 = Pins 17 and 18
@ -40,7 +40,8 @@ GPIO.setmode(GPIO.BCM)
GPIO.setup(17, GPIO.OUT)
GPIO.setup(18, GPIO.OUT)
#Now loop forever turning one direction for 5 seconds, then the other
#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)
@ -55,4 +56,4 @@ while (True):
#And loop back around
#And final cleanup
GPIO.cleanup()
```
```

View File

@ -3,7 +3,7 @@
name: "Sense HAT"
manufacturer: Raspberry Pi Foundation
url: https://www.raspberrypi.org/products/sense-hat/
description: Add-on board that includes an 8×8 RGB LED matrix, 5-button joystick as well as IMU and environmental sensors
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'
@ -34,8 +34,8 @@ pin:
-->
#Sense HAT
LED Matrix: LED2472G -> ATTINY88 -> SPI
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)
Pressure/Temp: LPS25H -> i2c 0x5c
Humidity/Temp: HTS221 -> i2c 0x5f
Luftdruck/Temp: LPS25H -> i2c 0x5c
Luftfeuchtigkeit/Temp: HTS221 -> i2c 0x5f

View File

@ -5,7 +5,7 @@ manufacturer: Pimoroni
url: https://github.com/pimoroni/skywriter-hat
github: https://github.com/pimoroni/skywriter-hat
buy: http://shop.pimoroni.com/products/skywriter-hat
description: A 3D positional and gesture sensor.
description: Ein 3D Positions- und Gesten-Sensor.
install:
'apt':
- 'python-smbus'
@ -28,7 +28,7 @@ pin:
-->
#Skywriter HAT
Skywriter HAT senses your finger's position above it in 3 dimensions, outputting an X, Y, Z axis
which you can use in your Python scripts.
Skywriter HAT spürt die Position Deines Fingers über ihm in drei Dimensionen und gibt die somit die X-, Y- und Z-Koordinaten, welche Du in Deinen Python-Skripten verarbeiten kannst.
Er erkennt auch Gesten wie z.B. wischen und andere.
It also recognises gestures, including swipes and more.

50
src/de/overlay/spi.md Normal file
View File

@ -0,0 +1,50 @@
<!--
---
name: SPI
description: Raspberry Pi SPI Anschlüsse
pincount: 5
pin:
'11':
name: SPI1 CE1
'12':
name: SPI1 CE0
'19':
name: SPI0 MOSI
direction: output
active: high
description: Master Out / Slave In
'21':
name: SPI0 MISO
direction: input
active: high
description: Master In / Slave Out
'23':
name: SPI0 SCLK
direction: output
active: high
description: Clock
'24':
name: SPI0 CE0
direction: output
active: high
description: Chip Select 0
'26':
name: SPI0 CE1
direction: output
active: high
description: Chip Select 1
'35':
name: SPI1 MISO
'36':
name: SPI1 CE2
'38':
name: SPI1 MOSI
'40':
name: SPI1 SCLK
-->
#SPI - Serial Peripheral Interface - Serielle Schnittstelle für Erweiterungen
###Bekannt als der 4-Draht serielle Bus, kannst Du mit SPI mehrere Erweiterungen and nur 4 Pins hintereinander schalten.
Ein gutes Beispiel für eine SPI-Erweiterung ist der MCP23S17 Baustein zur Erweiterung der digitalen Ein-/Ausgänge. Beachte das 'S' anstelle der '0' bei der I2C-Version.

View File

@ -4,24 +4,23 @@ name: Traffic HAT
manufacturer: Ryanteck LTD.
url: http://www.ryanteck.uk/store/traffichat
buy: http://www.ryanteck.uk/store/traffichat
description: A quick and easy way to learn the basics of GPIO on a budget. All in
a nice HAT.
description: Ein schneller und einfacher Weg um die grundlegenden Fähigkeiten der GPIO-Ports zu erkunden.
pincount: 40
pin:
'15':
name: LED1 / Green
name: LED1 / Grün
direction: output
active: high
'16':
name: LED2 / Amber
name: LED2 / Orange
direction: output
active: high
'18':
name: LED3 / Red
name: LED3 / Rot
direction: output
active: high
'22':
name: Button
name: Taster
direction: input
active: high
'29':
@ -31,7 +30,7 @@ pin:
-->
#Traffic HAT
###A quick and easy way to learn the basics of GPIO on a budget. All in a nice HAT.
###Ein schneller und einfacher Weg um die grundlegenden Fähigkeiten der GPIO-Ports zu erkunden.
```python
import RPi.GPIO as IO

34
src/de/overlay/uart.md Normal file
View File

@ -0,0 +1,34 @@
<!--
---
name: UART
description: Raspberry Pi UART Anschlüsse
pin:
'8':
name: TXD / Senden
direction: output
active: high
'10':
name: RXD / Empfangen
direction: input
active: high
-->
#UART - Universal Asynchronous Receiver/Transmitter (serielle Schnittstelle)
###Die beiden UART Anschlüsse sind in WiringPi 15 und 16
UART ist eine einfache und nützliche Schnittstelle um einen Arduino (oder vorbereiteten ATmega) mit Deinem Pi zu verbinden.
Allerdings solltest Du auf die Spannungspegel der Anschlüsse zwischen den beiden Chips achten: der Pi hat 3,3 Volt, der Arduino 5 Volt.
Verbinde beide und die wirst magischen blauen Rauch aufsteigen sehen...
Persönlich baue nehme ich gerne einen ATmega 328 mit einem 3,3Volt Spannungsregulierer, der die 5 Volt Spannungsversorgung auf 3,3 Volt für den ATmega 328
runter reguliert. Der ATmega 328 läuft ganz gut mit 3,3 Volt und einem 15Mhz Quarz und so bekommt man einen Arduino-Klone mir 3,3 Volt Logik.
Wenn Du die WiringPi2-Python-Bibliothek installiert hast, dass öffnet das folgende Beispiel die serielle Schnittstelle mit
einer Übertragungsgeschwindigkeit von 9600baud und gibt 'hello world' aus:
```python
import wiringpi2 as wiringpi
wiringpi.wiringPiSetup()
serial = wiringpi.serialOpen('/dev/ttyAMA0',9600)
wiringpi.serialPuts(serial,'hello world!')
```

View File

@ -4,7 +4,7 @@ name: Unicorn HAT
manufacturer: Pimoroni
url: http://shop.pimoroni.com/products/unicorn-hat
buy: http://shop.pimoroni.com/products/unicorn-hat
description: 64 blindingly bright RGB LEDs on a single HAT
description: 64 blendend helle RGB LEDs auf einem HAT
github: https://github.com/pimoroni/unicornhat
install:
'apt':
@ -26,19 +26,19 @@ pin:
-->
#Unicorn HAT
64 blindingly bright LEDs packed into a HAT and driven with an ultra-fast, C library that you can talk to
from Python make Unicorn HAT PiGlow's bigger, brighter brother.
64 blendend helle LEDs auf einem HAT, die über eine super schnelle C-Library angesteuert werden.
Die C-Library lässt sich auch über Python ansteuern. Der Unicorn HAT ist quasi der grössere und hellere Bruder der PiGlow.
Note: Unicorn HAT uses some special PWM trickery, performed with the same hardware that lets you Pi produce sound
through the audio jack ( analog audio ) so you can't use both at the same time!
Hinweis: der Unicorn HAT trickst ein wenig mit dem PWM-Ausgang - der gleichen Hardware, mit der Dein Pi Sounds über den
analogen Audio-Ausgang erzeugen kann. Somit kannst Du nicht beides gleichzeitig nutzen!
Setup is easy, just:
Die Einrichtung des HATs ist einfach:
```bash
curl get.pimoroni.com/unicornhat | bash
```
Then import it into your Python script and start tinkering:
Dann musst Du die Library nur noch in Dein Python-Skript importieren und kannst anfangen zu experimentieren:
```bash
import unicornhat

View File

@ -0,0 +1,74 @@
<!--
---
name: WiringPi Anschlussbelegung
url: http://wiringpi.com/
page_url: wiringpi
pin:
'3':
name: WiringPi 8
'5':
name: WiringPi 9
'7':
name: WiringPi 7
'8':
name: WiringPi 15
'10':
name: WiringPi 16
'11':
name: WiringPi 0
'12':
name: WiringPi 1
'13':
name: WiringPi 2
'15':
name: WiringPi 3
'16':
name: WiringPi 4
'18':
name: WiringPi 5
'19':
name: WiringPi 12
'21':
name: WiringPi 13
'22':
name: WiringPi 6
'23':
name: WiringPi 14
'24':
name: WiringPi 10
'26':
name: WiringPi 11
'29':
name: WiringPi 21
'31':
name: WiringPi 22
'32':
name: WiringPi 26
'33':
name: WiringPi 23
'35':
name: WiringPi 24
'36':
name: WiringPi 27
'37':
name: WiringPi 25
'38':
name: WiringPi 28
'40':
name: WiringPi 29
-->
#WiringPi Bibliothek
###WiringPi is der Versuch die Einfachheit der VErdrahtung des Arduino auf den Raspberry Pi zu bringen.
Das Ziel dieser Bibliothek ist es, eine einzige gemeinsame Plattform und Programmierschnistelle für den Zugriff auf die
GPIOs des Rapsberry Pi für verschiedene Programmiersprachen zur VErfügung zu stellen.
Im Kern ist WiringPi eine C-Bibliothek, aber sie steht auch in Ruby und Python per "gem install wiringpi" bzw. "pip install wiringpi2" zur Verfügung.
Bei Python muss man auf die "2" am Ende achten - das ist die WiringPi2-Python Bibliothek, die momentan die aktuelle Version ist.
Mehr Informationen findest Du auf der offiziellen WiringPi-Webseite.
##Erste Schritte mit WiringPi
WiringPi benutzt seine eigene Nummerierung der Anschlüsse am Pi. Links siehst Du die entsprechende Nummerierung.

368
src/de/pi-pinout.yaml Normal file
View File

@ -0,0 +1,368 @@
---
name: Raspberry Pi GPIO Anschlussbelegung
pins:
'1':
name: 3v3 Stromversorgung
type: "+3v3"
'2':
name: 5v Stromversorgung
type: "+5v"
'3':
name: SDA
description: I2C Daten
type: GPIO/I2C
scheme:
wiringpi: 8
bcm: 2
bcmAlt: 0
functions:
alt0: SDA1
alt1: SA3
'4':
name: 5v Stromversorgung
type: "+5v"
'5':
name: SCL
description: I2C Tackt (Clock)
type: GPIO/I2C
scheme:
wiringpi: 9
bcm: 3
bcmAlt: 1
functions:
alt0: SCL1
alt1: SA2
'6':
name: Masse (Ground)
type: GND
'7':
name: GPCLK0
type: GPIO
scheme:
wiringpi: 7
bcm: 4
functions:
alt0: GPCLK0
alt1: SA1
alt5: ARM_TDI
'8':
name: TXD
description: UART Senden
type: GPIO/UART
scheme:
wiringpi: 15
bcm: 14
functions:
alt0: TXD0
alt1: SD6
alt2: reserviert
alt5: TXD1
'9':
name: Masse (Ground)
type: GND
'10':
name: RXD
description: UART Empfang
type: GPIO/UART
scheme:
wiringpi: 16
bcm: 15
functions:
alt0: RXD0
alt1: SD7
alt2: reserviert
alt5: RXD1
'11':
name: ''
type: GPIO
scheme:
wiringpi: 0
bcm: 17
functions:
alt0: reserviert
alt1: SD9
alt2: reserviert
alt3: RTS0
alt4: SPI1_CE1_N
alt5: RTS1
'12':
name: PWM0
description: PCM Tackt (Clock)
type: GPIO
scheme:
wiringpi: 1
bcm: 18
functions:
alt0: PCM_CLK
alt1: SD10
alt2: reserviert
alt3: BSCSL SDA / MOSI
alt4: SPI1_CE0_N
alt5: PWM0
'13':
name: ''
type: GPIO
scheme:
wiringpi: 2
bcm: 27
bcmAlt: 21
functions:
alt0: reserviert
alt1: reserviert
alt2: reserviert
alt3: SD1_DAT3
alt4: ARM_TMS
'14':
name: Masse (Ground)
type: GND
'15':
name: ''
type: GPIO
scheme:
wiringpi: 3
bcm: 22
functions:
alt0: reserviert
alt1: SD14
alt2: reserviert
alt3: SD1_CLK
alt4: ARM_TRST
'16':
name: ''
type: GPIO
scheme:
wiringpi: 4
bcm: 23
functions:
alt0: reserviert
alt1: SD15
alt2: reserviert
alt3: SD1_CMD
alt4: ARM_RTCK
'17':
name: 3v3 Stromversorgung
type: "+3v3"
'18':
name: ''
type: GPIO
scheme:
wiringpi: 5
bcm: 24
functions:
alt0: reserviert
alt1: SD16
alt2: reserviert
alt3: SD1_DAT0
alt4: ARM_TDO
'19':
name: MOSI
type: GPIO/SPI
scheme:
wiringpi: 12
bcm: 10
functions:
alt0: SPI0_MOSI
alt1: SD2
alt2: reserviert
'20':
name: Masse (Ground)
type: GND
'21':
name: MISO
type: GPIO/SPI
scheme:
wiringpi: 13
bcm: 9
functions:
alt0: SPI0_MISO
alt1: SD1
alt2: reserviert
'22':
name: ''
type: GPIO
scheme:
wiringpi: 6
bcm: 25
functions:
alt0: reserviert
alt1: SD17
alt2: reserviert
alt3: SD1_DAT1
alt4: ARM_TCK
'23':
name: SCLK
type: GPIO/SPI
scheme:
wiringpi: 14
bcm: 11
functions:
alt0: SPI0_SCLK
alt1: SD3
alt2: reserviert
'24':
name: CE0
description: SPI Chip Select 0
type: GPIO/SPI
scheme:
wiringpi: 10
bcm: 8
functions:
alt0: SPI0_CE0_N
alt1: SD0
alt2: reserviert
'25':
name: Masse (Ground)
type: GND
'26':
name: CE1
description: SPI Chip Select 1
type: GPIO/SPI
scheme:
wiringpi: 11
bcm: 7
functions:
alt0: SPI0_CE1_N
alt1: SWE_N / SRW_N
alt2: reserviert
'27':
name: ID_SD
description: HAT EEPROM i2c Daten
type: GPIO/I2C
scheme:
wiringpi: 30
bcm: 0
functions:
alt0: SDA0
alt1: SA5
alt2: reserviert
'28':
name: ID_SC
description: HAT EEPROM i2c Tackt (Clock)
type: GPIO/I2C
scheme:
wiringpi: 31
bcm: 1
functions:
alt0: SCL0
alt1: SA4
alt2: reserviert
'29':
name: ''
type: GPIO
scheme:
wiringpi: 21
bcm: 5
functions:
alt0: GPCLK1
alt1: SA0
alt2: reserviert
alt5: ARM_TDO
'30':
name: Masse (Ground)
type: GND
'31':
name: ''
type: GPIO
scheme:
wiringpi: 22
bcm: 6
functions:
alt0: GPCLK2
alt1: SOE_N / SE
alt2: reserviert
alt5: ARM_RTCK
'32':
name: PWM0
type: GPIO
scheme:
wiringpi: 26
bcm: 12
functions:
alt0: PWM0
alt1: SD4
alt2: reserviert
alt5: ARM_TMS
'33':
name: PWM1
type: GPIO
scheme:
wiringpi: 23
bcm: 13
functions:
alt0: PWM1
alt1: SD5
alt2: reserviert
alt5: ARM_TCK
'34':
name: Masse (Ground)
type: GND
'35':
name: MISO
description: SPI Master-In
type: GPIO/SPI
scheme:
wiringpi: 24
bcm: 19
functions:
alt0: PCM_FS
alt1: SD11
alt2: reserviert
alt3: BSCSL SCL / SCLK
alt4: SPI1_MISO
alt5: PWM1
'36':
name: ''
type: GPIO
scheme:
wiringpi: 27
bcm: 16
functions:
alt0: reserviert
alt1: SD8
alt2: reserviert
alt3: CTS0
alt4: SPI1_CE2_N
alt5: CTS1
'37':
name: ''
type: GPIO
scheme:
wiringpi: 25
bcm: 26
functions:
alt0: reserviert
alt1: reserviert
alt2: reserviert
alt3: SD1_DAT2
alt4: ARM_TDI
'38':
name: MOSI
description: SPI Master-Out
type: GPIO/SPI
scheme:
wiringpi: 28
bcm: 20
functions:
alt0: PCM_DIN
alt1: SD12
alt2: reserviert
alt3: BSCSL / MISO
alt4: SPI1_MOSI
alt5: CPCLK0
'39':
name: Masse (Ground)
type: GND
'40':
name: SCLK
description: SPI Clock
type: GPIO/SPI
scheme:
wiringpi: 29
bcm: 21
functions:
alt0: PCM_DOUT
alt1: SD13
alt2: reserviert
alt3: BSCSL / CE_N
alt4: SPI1_SCLK
alt5: GPCLK1

3
src/de/pin/pin-1.md Normal file
View File

@ -0,0 +1,3 @@
###Der 3v3 (3,3 Volt) Stromversorgungsanschluss auf dem Pi liefert maximal 50 mA. Das ist genug um ein paar LEDs oder ICs anzusteuern, aber auch nicht viel mehr.
Generell solltests Du eher die 5V Stromversorgung benutzen - zusammen mit einem 3,3 Volt Spannungsregler für 3,3 Volt Projekte.

11
src/de/pin/pin-10.md Normal file
View File

@ -0,0 +1,11 @@
Dieser Anschluss kann auch als [UART](https://de.wikipedia.org/wiki/Universal_Asynchronous_Receiver_Transmitter) Empfangsleitung genutzt werden. Empfangen heisst im englischen 'receive' - daher die Bezeichnung RXD.
Er wird im allgemeinen auch als serielle Schnittstelle bezeichnet. Über diesen Pin empfängt der Pi standardmässig Zeichen und
leitet sie an die Kommandozeile weiter. Zusammen mit TXD kannst Du so Deinen Pi über die Kommandozeile mit der seriellen Schnittstelle steuern.
Die serielle Schnittstelle ist sehr nützlich, wenn Du z.B. einen Arduino oder ein Propeller Board mit Deinem Pi venetzen möchtest. Dabei musst Du allerdings
darauf achten, dass Du vorher die serielle Kommandozeile (Console) in der raspi-config deaktivierst.
Die serielle Schnittstelle benötigst Du auch, wenn Du den Pi ohne ein Display ("headless") aufsetzen möchtest, denn dann kommst Du so auch an die Kommandozeile ran.
[Learn more about UART](/pinout/uart)

2
src/de/pin/pin-12.md Normal file
View File

@ -0,0 +1,2 @@
Der PWM0 Ausgang an Pin BCM 18 ist recht nützlich, wenn man Geräte mit recht genauen zeitlichen Signalen ansteuern möchte.
Die WS2812 LEDS auf dem [Unicorn HAT][/pinout/unicorn_hat) sind ein gutes Beispiel hierfür.

1
src/de/pin/pin-17.md Symbolic link
View File

@ -0,0 +1 @@
./pin-1.md

5
src/de/pin/pin-2.md Normal file
View File

@ -0,0 +1,5 @@
###Die 5v Stromanschlüsse sind direkt mit der Stromversorgung des Pi verbunden und können somit soviel Strom liefern, wie die Stromversorgung (abzüglich des Verbrauchs des Pi) hergibt
Mit einer guten Stromversorgung (z.B. den offiziellen Pi Adapter) kannst Du hier ca. 1,5A ziehen.
5 Volt hören sich im ersten Moment vielleicht nicht nach viel an, aber damit lässt sich wirklich viel anstellen. So kann man sogar weiter Arduionos damit betreiben oder sogar kleine Motoren.

2
src/de/pin/pin-27.md Normal file
View File

@ -0,0 +1,2 @@
Diese Anschlüsse sind für die HAT genannten Erweiterungsplatinen des Pi. Über diese
wird das EEPROM der Erweiterung per I2C angesprochen.

2
src/de/pin/pin-3.md Normal file
View File

@ -0,0 +1,2 @@
SDA ist die Datenleitung des I2C-Bus des Pi, [mehr über I2C](/pinout/i2c).

1
src/de/pin/pin-5.md Normal file
View File

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

1
src/de/pin/pin-6.md Normal file
View File

@ -0,0 +1 @@
Masse (Ground)

12
src/de/pin/pin-8.md Normal file
View File

@ -0,0 +1,12 @@
Dieser Anschluss kann auch als [UART](https://de.wikipedia.org/wiki/Universal_Asynchronous_Receiver_Transmitter) Sendeleitung genutzt werden. Senden heisst im
englischen 'transmit' - daher die Bezeichnung TXD.
Er wird im allgemeinen auch als serielle Schnittstelle bezeichnet. Über diesen Pin empfängt der Pi standardmässig Zeichen und
leitet sie an die Kommandozeile weiter. Zusammen mit RXD kannst Du so Deinen Pi über die Kommandozeile mit der seriellen Schnittstelle steuern.
Die serielle Schnittstelle ist sehr nützlich, wenn Du z.B. einen Arduino oder ein Propeller Board mit Deinem Pi venetzen möchtest. Dabei musst Du allerdings
darauf achten, dass Du vorher die serielle Kommandozeile (Console) in der raspi-config deaktivierst.
Die serielle Schnittstelle benötigst Du auch, wenn Du den Pi ohne ein Display ("headless") aufsetzen möchtest, denn dann kommst Du so auch an die Kommandozeile ran.
[Learn more about UART](/pinout/uart)

48
src/de/settings.yaml Normal file
View File

@ -0,0 +1,48 @@
---
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"
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'
overlays:
- ground
- uart
- i2c
- spi
- arduino-spi
- wiringpi
- iqaudio-pi-dac
- display-o-tron
- display-o-tron-hat
- dots
- explorer-hat
- explorer-hat-pro
- piano-hat
- piborg-ledborg
- pibrella
- piglow
- rtk-000-001
- sense-hat
- skywriter-hat
- traffic-hat
- unicorn-hat

View File

@ -0,0 +1,66 @@
<!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,44 @@
<!--
---
name: board name
manufacturer: made by
description: what it is
url: https://myaddon.com
github: https://github.com/myaddonrepo.com
buy: http://shopformyaddon.com
formfactor: Custom
pincount: 26
eeprom: no
power: 3v3,5v
pin:
'3':
mode: i2c
'5':
mode: i2c
i2c:
'0x00':
name: device display name
device: chip name
-->
#my add-on board
Use this section to provide additional information such as fonctionality, technical parts, install requirements, etc
The overlay itself uses the following fields, some of which are mandatory, as noted below:
MANDATORY
name: the board name as it will appear in the board selection menu at pinout.xyz
manufacturer: the manufacturer's name
description: a short 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
formfactor: the board's form factor. Valid values currently are Custom, HAT and pHAT.
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
OPTIONAL
github: github repository address
buy: URL where the board can be purchased

View File

@ -1,21 +0,0 @@
#Pinout!
###The comprehensive Raspberry Pi GPIO Pinout guide, now with Raspberry Pi Model B+ and Raspberry Pi 2
This GPIO Pinout isn't meant to be printable, but it's both a great quick-reference and a comprehensive guide to your Raspberry Pi's GPIO pins.
##What do these numbers mean, anyway?
* BCM - Broadcom pin number, commonly called "GPIO", these are the ones you probably want to use with RPi.GPIO
* WiringPi - Wiring Pi pin number, for Gordon's Wiring Pi library
* Physical - Number corresponding to the pins physical location on the header
##Pi 2
To celebrate the launch of the Pi 2 and the new Pi-enthusiasts it'll bring, Pinout has been updated to be cleaner, more comprehensive and more accurate and will continue to be improved.
##Model B+
Now that the Raspberry Pi Model B Plus is here, I've updated Pinout with the 14 extra pins you'll find on your shiny new board.
Note: While I've placed a gap to visually separate the additional 14 pins on the B+, you wont find this gap on the actual board!

7
src/en/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 menu on the left to explore the pins and functions of the Raspberry Pi GPIO.
Use the menu above to discover new boards, learn about interfaces and find GPIO connection guides.

27
src/en/index.md Normal file
View File

@ -0,0 +1,27 @@
#Pinout!
###The comprehensive Raspberry Pi GPIO Pinout guide now with Raspberry Pi Model B+, Raspberry Pi 2 and Pi Zero.
This GPIO Pinout is designed to be both a quick-reference and a comprehensive guide to your Raspberry Pi's GPIO pins.
##What do these numbers mean?
* BCM - Broadcom pin number, commonly called "GPIO", these are the ones you probably want to use with RPi.GPIO and GPIO Zero
* WiringPi - Wiring Pi pin number (shown as a tooltip), for Gordon's Wiring Pi library
* Physical - Number corresponding to the pins physical location on the header
##Raspberry Pi Zero
With the launch of the Pi Zero bringing Raspberry Pi into the hands of so many more people, we're pushing Pinout a little further with some visual tweaks and categorised menus to help you find what you need.
##Raspberry Pi 2
To celebrate the launch of the Pi 2 and the new Pi-enthusiasts it'll bring, Pinout has been updated to be cleaner, more comprehensive and more accurate and will continue to be improved.
##Raspberry Pi Model A+ and B+
Now that the Raspberry Pi Model B Plus is here, I've updated Pinout with the 14 extra pins you'll find on your shiny new board.
##Raspberry Pi Model "A" and "B"
Pinout was originally designed for the old 26-pin Raspberry Pi models, you'll see the outline of this original header displayed on the left in a slightly darker shade. If you click a pin you'll see details of its BCM pin assignment on the original Rev 1 Pi.

View File

@ -0,0 +1,33 @@
<!--
---
name: 1 Wire Pi Plus
class: board
type: other
manufacturer: AB Electronics UK
description: 1-Wire to I2C host interface
url: https://www.abelectronics.co.uk/p/60/1-Wire-Pi-Plus
github: https://github.com/abelectronicsuk
buy: https://www.abelectronics.co.uk/p/60/1-Wire-Pi-Plus
formfactor: Custom
pincount: 40
eeprom: no
power: 3v3,5v
pin:
'3':
mode: i2c
'5':
mode: i2c
i2c:
'0x18':
name: DS2482
device: DS2482-100
-->
#1 Wire Pi Plus
The 1 Wire Pi Plus from AB Electronics UK is a communication board supporting the 1-Wire® protocol designed for use on the Raspberry Pi A+, Raspberry Pi B+ and Raspberry Pi 2 Model B computer platforms. A 5V buffered I2C port is also provided on the board.
The 1-Wire® port on the 1 Wire Pi Plus is based around a DS2482-100 I2C to 1-Wire® bridge device. The DS2482-100 provides bi-directional protocol conversion between the I2C port on the Raspberry Pi and any attached 1-Wire® slave devices. An ESD Protection Diode is used to protect the 1 Wire Pi Plus and Raspberry Pi from electrostatic spikes on the 1-Wire® port. Connections to the 1-Wire® port can be made through the RJ-12 socket or the solder points on the PCB.
The Quick2wire lib from [https://github.com/quick2wire/quick2wire-python-api](https://github.com/quick2wire/quick2wire-python-api) allows easy access to the I2C port via Python.
[https://www.abelectronics.co.uk/kb/article/3/owfs-with-i2c-support-on-raspberry-pi](https://www.abelectronics.co.uk/kb/article/3/owfs-with-i2c-support-on-raspberry-pi "Configuring and using the 1-Wire® port on your Raspberry Pi")

View File

@ -0,0 +1,50 @@
<!--
---
name: ADC Differential Pi
class: board
type: other
manufacturer: AB Electronics UK
description: 8 channel Analogue to Digital Converter
url: https://www.abelectronics.co.uk/p/65/ADC-Differential-Pi-Raspberry-Pi-Analogue-to-Digital-converter
github: https://github.com/abelectronicsuk
buy: https://www.abelectronics.co.uk/p/65/ADC-Differential-Pi-Raspberry-Pi-Analogue-to-Digital-converter
formfactor: Custom
pincount: 40
eeprom: no
power: 3v3,5v
pin:
'3':
mode: i2c
'5':
mode: i2c
i2c:
'0x68':
name: MCP3424
device: MCP3424
'0x69':
name: MCP3424
device: MCP3424
-->
#ADC Differential Pi
The ADC Differential Pi is an 8 channel 18 bit analogue to digital converter designed to work with the Raspberry Pi A+, Raspberry Pi B+ and Raspberry Pi 2 Model B. The ADC Differential Pi is based on two Microchip MCP3424 A/D converters each containing 4 analogue inputs. The MCP3424 is a delta-sigma A/D converter with low noise differential inputs.
##Features
- 8 x 18-bit differential inputs
- Control via the Raspberry Pi I2C port
- Stack up to 4 ADC Differential Pi boards on a single Raspberry Pi
- Jumper selectable I2C addresses (8 choices)
- Buffered 5V I2C port
- Based on the MCP3424 from Microchip Technologies Inc
- Input range of ±2.048V
- On-board 2.048V reference voltage (Accuracy ± 0.05%, Drift: 15 ppm/°C)
- On-Board Programmable Gain Amplifier (PGA): Gains of 1, 2, 4 or 8
- Programmable Data Rate Options:
- 3.75 SPS (18 bits)
- 15 SPS (16 bits)
- 60 SPS (14 bits)
- 240 SPS (12 bits)
- One-Shot or Continuous Conversion Options
Arduino, C, Windows 10 IOT, Python 2 and Python 3 libraries available on GitHub.

View File

@ -0,0 +1,50 @@
<!--
---
name: ADC Pi Plus
class: board
type: other
manufacturer: AB Electronics UK
description: 8 channel Analogue to Digital Converter
url: https://www.abelectronics.co.uk/p/56/ADC-Pi-Plus-Raspberry-Pi-Analogue-to-Digital-converter
github: https://github.com/abelectronicsuk
buy: https://www.abelectronics.co.uk/p/56/ADC-Pi-Plus-Raspberry-Pi-Analogue-to-Digital-converter
formfactor: Custom
pincount: 40
eeprom: no
power: 3v3,5v
pin:
'3':
mode: i2c
'5':
mode: i2c
i2c:
'0x68':
name: MCP3424
device: MCP3424
'0x69':
name: MCP3424
device: MCP3424
-->
#ADC Pi Plus
The ADC Pi Plus is an 8 channel 17 bit analogue to digital converter designed to work with the Raspberry Pi A+, Raspberry Pi B+ and Raspberry Pi 2 Model B. The ADC Pi Plus is based on two Microchip MCP3424 A/D converters each containing 4 analogue inputs. The MCP3424 is a delta-sigma A/D converter with low noise differential inputs.
##Features
- 8 x 17-bit 0 to 5V Single Ended Inputs
- Control via the Raspberry Pi I2C port
- Stack up to 4 ADC Pi Plus boards on a single Raspberry Pi
- Jumper selectable I2C addresses
- Buffered 5V I2C port
- Based on the MCP3424 from Microchip Technologies Inc
- Single Ended full-scale range of 5.0V
- On-board 2.048V reference voltage (Accuracy ± 0.05%, Drift: 15 ppm/°C)
- On-Board Programmable Gain Amplifier (PGA): Gains of 1, 2, 4 or 8
- Programmable Data Rate Options:
- 3.75 SPS (17 bits)
- 15 SPS (15 bits)
- 60 SPS (13 bits)
- 240 SPS (11 bits)
- One-Shot or Continuous Conversion Options
Arduino, C, Windows 10 IOT, Python 2 and Python 3 libraries are available on GitHub.

View File

@ -0,0 +1,51 @@
<!--
---
name: ADC Pi Zero
class: board
type: other
image: 'ab-adc-pi-zero.png'
manufacturer: AB Electronics UK
description: 8 channel Analogue to Digital Converter
url: https://www.abelectronics.co.uk/p/69/ADC-Pi-Zero-Raspberry-Pi-Analogue-to-Digital-converter
github: https://github.com/abelectronicsuk
buy: https://www.abelectronics.co.uk/p/69/ADC-Pi-Zero-Raspberry-Pi-Analogue-to-Digital-converter
formfactor: Custom
pincount: 40
eeprom: no
power: 3v3,5v
pin:
'3':
mode: i2c
'5':
mode: i2c
i2c:
'0x68':
name: MCP3424
device: MCP3424
'0x69':
name: MCP3424
device: MCP3424
-->
#ADC Pi Zero
The ADC Pi Zero is an 8 channel 17 bit analogue to digital converter designed to work with the Raspberry Pi Zero. The ADC Pi Zero is based on two Microchip MCP3424 A/D converters each containing 4 analogue inputs. The MCP3424 is a delta-sigma A/D converter with low noise differential inputs.
##Features
- 8 x 17-bit 0 to 5V Single Ended Inputs
- Control via the Raspberry Pi I2C port
- Stack up to 4 ADC Pi Zero boards on a single Raspberry Pi
- Jumper selectable I2C addresses
- Buffered 5V I2C port
- Based on the MCP3424 from Microchip Technologies Inc
- Single Ended full-scale range of 5.0V
- On-board 2.048V reference voltage (Accuracy ± 0.05%, Drift: 15 ppm/°C)
- On-Board Programmable Gain Amplifier (PGA): Gains of 1, 2, 4 or 8
- Programmable Data Rate Options:
- 3.75 SPS (17 bits)
- 15 SPS (15 bits)
- 60 SPS (13 bits)
- 240 SPS (11 bits)
- One-Shot or Continuous Conversion Options
Arduino, C, Windows 10 IOT, Python 2 and Python 3 libraries are available on GitHub.

View File

@ -0,0 +1,47 @@
<!--
---
name: IO Pi Plus
class: board
type: other
manufacturer: AB Electronics UK
description: 32 Channel Digital Expansion Board
url: https://www.abelectronics.co.uk/p/54/IO-Pi-Plus
github: https://github.com/abelectronicsuk
buy: https://www.abelectronics.co.uk/p/54/IO-Pi-Plus
formfactor: Custom
pincount: 40
eeprom: no
power: 3v3,5v
pin:
'3':
mode: i2c
'5':
mode: i2c
i2c:
'0x20':
name: MCP23017
device: MCP23017
'0x21':
name: MCP23017
device: MCP23017
-->
#IO Pi Plus
The IO Pi Plus is a 32 channel digital expansion board designed for use on the Raspberry Pi A+, Raspberry Pi B+ and Raspberry Pi 2 Model B computer platform. The board is based around the MCP23017 16-bit I/O expander from Microchip Technology Inc.
A pair of MCP23017 expanders are included on the board allowing you to connect up to 32 digital inputs or outputs to the Raspberry Pi. The IO Pi Plus Expander is powered through the host Raspberry Pi using the GPIO port and extended pins on the GPIO connector allow you to stack the IO Pi Plus along with other expansion boards.
##Features
- 32 Digital Inputs/Outputs
- Control via the Raspberry Pi I2C port
- Stack up to 4 IO Pi boards on a single Raspberry Pi
- Jumper selectable I2C addresses
- External 5V Input with isolation jumper
- Based on the MCP23017 from Microchip Technologies Inc
- Configurable interrupt output pins - Configurable as active-high, active-low or open-drain
- INTA and INTB can be configured to operate independently or together
- Configurable interrupt source - Interrupt-on-change from configured register defaults or pin changes
- Polarity Inversion register to configure the polarity of the input port data
Arduino, C, Windows 10 IOT, Python 2 and Python 3 libraries are available on GitHub.

View File

@ -0,0 +1,33 @@
<!--
---
name: RTC Pi Plus
class: board
type: other
manufacturer: AB Electronics UK
description: Real-Time Clock Module for the Raspberry Pi
url: https://www.abelectronics.co.uk/p/52/RTC-Pi-Plus
github: https://github.com/abelectronicsuk
buy: https://www.abelectronics.co.uk/p/52/RTC-Pi-Plus
formfactor: Custom
pincount: 40
eeprom: no
power: 3v3,5v
pin:
'3':
mode: i2c
'5':
mode: i2c
i2c:
'0x68':
name: DS1307
device: DS1307
-->
#RTC Pi Plus
The RTC Pi Plus is a battery backed real-time clock module for the Raspberry Pi A+, Raspberry Pi B+ and Raspberry Pi 2 Model B. It keeps track of the time while the Raspberry Pi is switched off and allows the Raspberry Pi to retrieve the current date and time from the RTC Pi Plus when it is switched back on.
The RTC Pi Plus is powered through the host Raspberry Pi using the GPIO port and extended pins on the GPIO connector allow you to stack the RTC Pi Plus along with other expansion boards. The RTC Pi Plus uses the DS1307 RTC real time clock and a CR2032 battery to maintain the date and time when the main system power is not available.
Unlike most other DS1307 based RTC modules the RTC Pi also includes an I2C logic level converter allowing you to connect other 5V I2C devices to your Raspberry Pi.
Python 2 and 3 libraries are available on GitHub.

View File

@ -0,0 +1,34 @@
<!--
---
name: Serial Pi Plus
class: board
type: other
manufacturer: AB Electronics UK
description: UART to RS232 Converter
url: https://www.abelectronics.co.uk/p/51/Serial-Pi-Plus
github: https://github.com/abelectronicsuk
buy: https://www.abelectronics.co.uk/p/51/Serial-Pi-Plus
formfactor: Custom
pincount: 40
eeprom: no
power: 3v3
pin:
'8':
mode: UART
'10':
mode: UART
-->
#Serial Pi Plus
The Serial Pi Plus is a UART to RS232 serial converter for the Raspberry Pi.
The RS232 port is connected to the UART port on the Raspberry Pi using a MAX3232 interface. The MAX3232 IC converts the 3.3V UART port to RS232 voltages allowing communication with RS232 compatible devices over a DB9 serial cable or with the use of a null-modem cable the board allows terminal access with linux on the Raspberry Pi using a terminal application. The RS232 port can be accessed through the DB9 port or the solder points on the PCB.
##Features
- RS232 Master Port.
- Control the Raspberry Pi over RS232 or connect to external serial accessories.
- Stackable with other Raspberry Pi A+, Raspberry Pi B+ and Raspberry Pi 2 and Raspberry Pi accessory boards.
- Mounting holes for use with the AB Electronics UK mounting kits (sold separately)
[Configuring the RS232 communication on the Raspberry Pi](https://www.abelectronics.co.uk/kb/article/20/raspberry-pi-serial-port-usage)

View File

@ -1,24 +1,27 @@
<!--
---
class: guide
type: info
name: Arduino SPI
description: Program Arduino with Raspberry Pi SPI
pincount: 4
pin:
19:
'19':
name: MOSI
direction: output
active: high
description: Master Out / Slave In
21:
'21':
name: MISO
direction: input
active: high
description: Master In / Slave Out
23:
'23':
name: SCKL
direction: output
active: high
description: Clock
24:
'24':
name: CE0
direction: output
active: high

View File

@ -0,0 +1,78 @@
<!--
---
class: board
type: audio
name: Cirrus Logic Audio Card
manufacturer: Cirrus Logic and element14
description: Audio Card with unprecedented level of features and performance for Raspberry Pi.
url: http://www.element14.com/community/community/raspberry-pi/raspberry-pi-accessories/cirrus_logic_audio_card
buy: http://www.element14.com/community/community/raspberry-pi/raspberry-pi-accessories/cirrus_logic_audio_card
pincount: 40
pin:
'3':
name: SDA1
mode: i2c
description: WM8804 I2C - SDA
'5':
name: SCL1
mode: i2c
description: WM8804 I2C - SCLK
'11':
name: GPIO_GEN0
mode: input
description: WM5102 RST
'12':
name: PCM_CLK
mode: input
description: WM5102 AIF PCM - BCLK
'15':
name: GPIO_GEN3
mode: input
description: WM5102 LDO Enable
'16':
name: GPIO_GEN4
mode: input
description: WM8804 Control I/F Config
'19':
name: SPI_MOSI
mode: spi
description: WM5102 SPI - MOSI
'21':
name: SPI_MISO
mode: spi
description: WM5102 SPI - MISO
'23':
name: SPI_SCLK
mode: spi
description: WM5102 SPI - SCLK1
'24':
name: SPI_CE0_N
mode: input
description: WM8804 RST
'26':
name: SPI_CE1_N
mode: input
description: WM5102 SPI - CE
'35':
name: PCM_FS
mode: input
description: WM5102 AIF PCM - FS
'38':
name: PCM_DIN
mode: input
description: WM5102 AIF PCM - DIN
'40':
name: PCM_DOUT
mode: input
description: WM5102 AIF PCM - DOUT
-->
#Cirrus Logic Audio Card
###Offers a wealth of features, perfect for avid audiophiles wanting to use their Raspberry Pi for audio applications.
* Capable of rendering HD Audio, at 24-bit, 192kHz
* 3.5mm 4-pole jack for a headset/boom mic combination for gaming or VoIP applications
* Two DMIC microphones onboard for stereo recording
* 3.5mm jack for Stereo Line Input for high quality audio recording or capture
* 3.5 mm jack Stereo Line Output for connection to devices such as external stereo amplifiers or powered speakers
* Stereo Digital input and output (SPDIF)

View File

@ -0,0 +1,84 @@
<!--
---
class: board
type: audio
name: DiscoHAT
manufacturer: Kertatuote
description: Computer controlled DMX lights, sounds and special effects.
url: http://discohat.com
buy: http://discohat.com/shop
pincount: 40
pin:
'8':
name: TXD
active: high
mode: output
description: DMX out
'13':
name: Button1
active: low
mode: input
description: Button 1
'15':
name: Button2
active: low
mode: input
description: Button 2
'22':
name: Button3
active: low
mode: input
description: Button 3
'18':
name: Button4
active: low
mode: input
description: Button 4
'16':
name: Button5
active: low
mode: input
description: Button 5
'37':
name: Button6
active: low
mode: input
description: Button 6
'32':
name: Button7
active: low
mode: input
description: Button 7
'36':
name: Button8
active: low
mode: input
description: Button 8
'19':
name: MOSI
mode: spi
description: LED strip data
'23':
name: SCLK
mode: spi
description: LED strip clock
-->
#DiscoHAT
###DiscoHAT is a small board allowing you to do computer controlled lights, sounds and special effects.
It is an essential building block for making custom light and sound systems. You can easily create your own home disco based on it. It is also usable for small theatre groups, bands or school projects.
With DiscoHAT you can control DMX equipment and LED strips. It also has interfaces for up to 8 pushbuttons that can be configured to start light and sound sequences.
DiscoHAT was created to be used with QLC+ an Open Source light and sound control software that is absolutely AMAZING. The push buttons can trigger scenes (steady lights), chases (lights changing in a pattern) and shows (lights synced to music) from stage without need for displays, keyboards or mice. With a WiFi dongle you can also control the lights from your tablet or mobile phone.
The Raspberry Pi 2 has a bit more power and is recommended for DiscoHAT. You can also exchange the 40 pin connector with the 26 pin connector for using it on older Raspberries but then you lose HAT functionality and 4 buttons. The connectors are not soldered to DiscoHAT. It uses SMD through pin sockets.
DiscoHAT is being used by myself in our theater productions. The DMX output and the pushbuttons are optically isolated and ESD protected to cope with static electricity that easily builds up on stage due to long wires, hot air, plastic surfaces and nylon clothing.
The system has been in use for two plays so far and it is time to share the good things with other entertainers.
Break a leg,
Karri

View File

@ -1,44 +1,52 @@
<!--
---
class: board
type: lcd
name: Display-o-Tron HAT
manufacturer: Pimoroni
url: https://github.com/pimoroni/dot3k
description: A 3-line character LCD with a 6-zone RGB backlight and 6 touch buttons
url: https://github.com/pimoroni/dot3k
github: https://github.com/pimoroni/dot3k
buy: https://shop.pimoroni.com/products/display-o-tron-hat
formfactor: 'HAT'
pincount: 40
eeprom: yes
power:
'1':
'2':
ground:
'6':
pin:
3:
'3':
mode: i2c
5:
'5':
mode: i2c
22:
name: LCD CMD/DATA
mode: output
active: high
19:
'19':
mode: spi
22:
'22':
name: LCD Register Select
mode: output
23:
active: high
'23':
mode: spi
24:
'24':
name: LCD Chip Select
mode: chipselect
active: high
32:
'32':
name: LCD Reset
mode: output
active: low
-->
#Display-o-Tron HAT
Display-o-Tron HAT uses both SPI and I2c to drive the LCD display, backlight and touch.
Display-o-Tron HAT uses both SPI and I2c to drive the LCD display, backlight and touch.
However both of these busses can be shared with other devices.
You can use the one-line product installer to get Display-o-Tron HAT set up and ready to go, just:
To get the HAT set up and ready to go you can use the one-line product installer:
```bash
curl get.pimoroni.com/dot3k | bash
curl -sS get.pimoroni.com/displayotron | bash
```
And follow the instructions!

View File

@ -1,10 +1,54 @@
<!--
---
class: board
type: lcd
name: Display-o-Tron 3000
manufacturer: Pimoroni
github: https://github.com/pimoroni/dot3k
url: https://github.com/pimoroni/dot3k
description: A 3-line character LCD with an RGB backlight and joystick
url: https://github.com/pimoroni/dot3k
github: https://github.com/pimoroni/dot3k
buy: https://shop.pimoroni.com/products/displayotron-3000
formfactor: '26-way'
pincount: 26
eeprom: no
power:
'2':
'17':
ground:
'6':
pin:
'3':
mode: i2c
'5':
mode: i2c
'7':
name: Joystick Button
mode: input
active: low
'11':
name: Joystick Left
mode: input
active: low
'13':
name: Joystick Up
mode: input
active: low
'15':
name: Joystick Right
mode: input
active: low
'19':
mode: spi
'21':
name: Joystick Down
mode: input
active: low
'22':
name: LCD CMD/DATA
mode: output
active: high
'23':
mode: spi
install:
'devices':
- 'i2c'
@ -17,47 +61,15 @@ install:
'python':
- 'dot3k'
'examples': 'python/examples/'
pincount: 40
pin:
3:
mode: i2c
5:
mode: i2c
7:
name: Joystick Button
mode: input
active: low
11:
name: Joystick Left
mode: input
active: low
13:
name: Joystick Up
mode: input
active: low
15:
name: Joystick Right
mode: input
active: low
19:
mode: spi
21:
name: Joystick Down
mode: input
active: low
22:
name: LCD CMD/DATA
mode: output
active: high
23:
mode: spi
-->
#Display-o-Tron 3000
You can use the one-line product installer to get Display-o-Tron 3000 set up and ready to go, just:
The Display-o-Tron 3000 is a 3-line character LCD with an RGB backlight and joystick
To get the module set up and ready to go you can use the one-line product installer:
```bash
curl get.pimoroni.com/dot3k | bash
curl -sS get.pimoroni.com/displayotron | bash
```
And follow the instructions!

View File

@ -1,9 +1,15 @@
<!--
---
class: board
type: other
name: Raspberry Pi Dots
manufacturer: Raspberry Pi Foundation
description: Join the dots to make a circuit
url: http://www.raspberrypi.org/dots/
github: https://github.com/raspberrypilearning/dots
formfactor: '40-way'
pincount: 40
eeprom: no
pin:
bcm0:
name: 'Color: Blue'
@ -92,7 +98,7 @@ pin:
-->
#Raspberry Pi Dots
###Dots is a Dot to Dot HAT board for the Raspberry Pi that lets you join-the-dots with BARE Conductive Paint!
###Dots is a Dot to Dot board for the Raspberry Pi that lets you join-the-dots with BARE Conductive Paint!
Every Dot on the Dots board is a "floating" metal contact just waiting to be pulled down to ground with a dab of paint.
@ -100,13 +106,12 @@ To read a Dot you should set its corresponding pin as an INPUT and make sure it'
```python
import RPi.GPIO as GPIO
GPIO.setmode(GPIO.BCM )
GPIO.setmode(GPIO.BCM)
GPIO.setup(dot_pin, GPIO.IN, GPIO.PUD_UP)
state = GPIO.input(dot_pin)
```
It's good practise to only turn on the PULLUP when you actually want to read the Dot, so a method like
this is recommended for reading:
It's good practice to only turn on the PULLUP when you actually want to read the Dot, so a method like this is recommended for reading:
```python
def is_dot_connected(dot_pin):
@ -114,4 +119,4 @@ def is_dot_connected(dot_pin):
state = GPIO.input( dot_pin )
GPIO.setup(dot_pin, GPIO.IN, GPIO.PUD_OFF)
return state == 0
```
```

View File

@ -0,0 +1,44 @@
<!--
---
class: board
type: instrument
name: Drum HAT
image: 'drum-hat.png'
manufacturer: Pimoroni
description: An 8 pad finger Drum HAT for your Raspberry Pi
url: http://shop.pimoroni.com/products/drum-hat
github: https://github.com/pimoroni/drum-hat
buy: http://shop.pimoroni.com/products/drum-hat
formfactor: 'HAT'
pincount: 40
eeprom: yes
pin:
'3':
mode: i2c
'5':
mode: i2c
'22':
name: Alert
mode: input
'40':
name: Reset
mode: output
i2c:
'0x2c':
name: Cap Touch
device: cap1188
datasheet: http://ww1.microchip.com/downloads/en/DeviceDoc/CAP1188%20.pdf
-->
#Drum HAT
Drum HAT is the companion to Piano HAT. It uses the same cap touch sensor to provide 8 finger-sized drum pads. Use it to play music in Python, control software drum synths on your Pi, take control of hardware drum machines, or just build it into an elaborate drum-controlled project.
Features: 8 touch sensitive buttons and 8 LEDs. Works with Piano HAT (it uses a CAP1188 chip with a non-conflicting i2c address at 0x2c).
To get the HAT set up and ready to go you can use the one-line product installer:
```bash
curl -sS get.pimoroni.com/drumhat | bash
```
And follow the instructions!

View File

@ -0,0 +1,41 @@
<!--
---
class: board
type: iot
name: ESP IoT pHAT
manufacturer: Pimoroni
description: ESP8266 module.
url: https://shop.pimoroni.com/products/esp8266-phat
buy: https://shop.pimoroni.com/products/esp8266-phat
formfactor: 'pHAT'
pincount: 40
eeprom: no
power:
'2':
ground:
'6':
pin:
'8':
name: TXD / Transmit
direction: output
active: high
'10':
name: RXD / Receive
direction: input
active: high
'11':
name: Chip Reset
active: low
'13':
name: Chip Program
active: low
-->
#ESP IoT pHAT
The ESP IoT pHAT is an ESP8266 based add-on for the Raspberry Pi. It provides some GPIO and one ADC channel, broken out to use alongside a small prototyping area. Perfect for RPi Zero but works with A+/B+/2 too!
To get the pHAT set up and ready to go you can use the one-line product installer:
```bash
curl -sS get.pimoroni.com/iotphat | bash
```

View File

@ -1,42 +1,29 @@
<!--
---
class: board
type: multi
name: Explorer HAT Pro
manufacturer: Pimoroni
description: An all-in-one light, input, motor, touch and output add-on board.
url: https://github.com/pimoroni/explorer-hat
github: https://github.com/pimoroni/explorer-hat
buy: http://shop.pimoroni.com/products/explorer-hat
description: An all-in-one light, input, motor, touch and output add-on board.
install:
'apt':
- 'python-smbus'
- 'python3-smbus'
- 'python-dev'
- 'python3-dev'
'python':
- 'explorerhat'
'examples': 'examples/'
formfactor: 'HAT'
pincount: 40
i2c:
'0x28':
name: Cap Touch
device: cap1208
'0x48':
name: Analog Input
device: ads1015
eeprom: yes
pin:
'3': {}
'5': {}
'3':
mode: i2c
'5':
mode: i2c
'7':
name: LED 1
mode: output
active: high
'8': {}
'10': {}
'11':
name: LED 2
mode: output
active: high
'12': {}
'13':
name: LED 3
mode: output
@ -53,14 +40,10 @@ pin:
name: Input 3
mode: input
active: high
'19': {}
'21': {}
'22':
name: Input 4
mode: input
active: high
'23': {}
'24': {}
'29':
name: LED 4
mode: output
@ -97,14 +80,35 @@ pin:
name: Motor 2 +
mode: output
active: high
i2c:
'0x28':
name: Cap Touch
device: cap1208
'0x48':
name: Analog Input
device: ads1015
install:
'devices':
- 'i2c'
'apt':
- 'python-smbus'
- 'python3-smbus'
- 'python-dev'
- 'python3-dev'
'python':
- 'explorerhat'
'python3':
- 'explorerhat'
'examples': 'examples/'
-->
#Explorer HAT and Explorer HAT Pro
#Explorer HAT Pro
5V inputs and outputs, touch pads, LEDs, analog inputs and an H-Bridge motor driver make up the Explorer HAT Pro- a jack of all trades prototyping side-kick for your Raspberry Pi.
5V inputs and outputs, touch pads, LEDs, analog inputs and an H-Bridge motor driver make up the Explorer HAT Pro; a jack of all trades prototyping side-kick for your Raspberry Pi.
To get the HAT set up and ready to go you can use the one-line product installer:
```bash
sudo apt-get install python-pip
sudo pip install explorer-hat
curl -sS get.pimoroni.com/explorerhat | bash
```
Then import it into your Python script and start tinkering:

View File

@ -1,25 +1,16 @@
<!--
---
class: board
type: multi
name: Explorer HAT
manufacturer: Pimoroni
description: An all-in-one light, input, touch and output add-on board.
url: https://github.com/pimoroni/explorer-hat
github: https://github.com/pimoroni/explorer-hat
buy: http://shop.pimoroni.com/products/explorer-hat
description: An all-in-one light, input, touch and output add-on board.
install:
'devices':
- 'i2c'
'apt':
- 'python-smbus'
- 'python3-smbus'
- 'python-dev'
- 'python3-dev'
'python':
- 'explorerhat'
'python3':
- 'explorerhat'
'examples': 'examples/'
formfactor: 'HAT'
pincount: 40
eeprom: yes
pin:
'7':
name: LED 1
@ -69,14 +60,32 @@ pin:
name: Output 4
mode: output
active: high
i2c:
'0x28':
name: Cap Touch
device: cap1208
install:
'devices':
- 'i2c'
'apt':
- 'python-smbus'
- 'python3-smbus'
- 'python-dev'
- 'python3-dev'
'python':
- 'explorerhat'
'python3':
- 'explorerhat'
'examples': 'examples/'
-->
#Explorer HAT and Explorer HAT Pro
#Explorer HAT
5V inputs and outputs, touch pads, LEDs, analog inputs and an H-Bridge motor driver make up the Explorer HAT Pro- a jack of all trades prototyping side-kick for your Raspberry Pi.
5V inputs and outputs, touch pads and LEDs make up the Explorer HAT; a jack of all trades prototyping side-kick for your Raspberry Pi.
To get the HAT set up and ready to go you can use the one-line product installer:
```bash
sudo apt-get install python-pip
sudo pip install explorer-hat
curl -sS get.pimoroni.com/explorerhat | bash
```
Then import it into your Python script and start tinkering:

View File

@ -0,0 +1,99 @@
<!--
---
class: board
type: multi
name: Explorer pHAT
manufacturer: Pimoroni
description: An all-in-one input, output and motor add-on board.
url: https://github.com/pimoroni/explorer-hat
github: https://github.com/pimoroni/explorer-hat
buy: https://shop.pimoroni.com/products/explorer-phat
formfactor: 'pHAT'
pincount: 40
eeprom: no
pin:
'3':
mode: i2c
'5':
mode: i2c
'15':
name: Input 2
mode: input
active: high
'16':
name: Input 1
mode: input
active: high
'18':
name: Input 3
mode: input
active: high
'22':
name: Input 4
mode: input
active: high
'31':
name: Output 1
mode: output
active: high
'32':
name: Output 2
mode: output
active: high
'33':
name: Output 3
mode: output
active: high
'35':
name: Motor 1 +
mode: output
active: high
'36':
name: Output 4
mode: output
active: high
'37':
name: Motor 2 -
mode: output
active: high
'38':
name: Motor 1 -
mode: output
active: high
'40':
name: Motor 2 +
mode: output
active: high
i2c:
'0x48':
name: Analog Input
device: ads1015
install:
'devices':
- 'i2c'
'apt':
- 'python-smbus'
- 'python3-smbus'
- 'python-dev'
- 'python3-dev'
'python':
- 'explorerhat'
'python3':
- 'explorerhat'
'examples': 'examples/'
-->
#Explorer pHAT
5V inputs and outputs, analog inputs and an H-Bridge motor driver make up the Explorer pHAT; a jack of all trades prototyping side-kick for your Raspberry Pi. Perfect for RPi Zero but works with A+/B+/2 too!
To get the pHAT set up and ready to go you can use the one-line product installer:
```bash
curl -sS get.pimoroni.com/explorerhat | bash
```
Then import it into your Python script and start tinkering:
```bash
import explorerhat
```

View File

@ -1,7 +1,10 @@
<!--
---
class: interface
type: pinout
name: Ground
description: Raspberry Pi Ground Pins
pincount: 1
pin:
'6':
'9':

View File

@ -1,5 +1,7 @@
<!--
---
class: interface
type: pinout
name: I2C
description: Raspberry Pi i2c pins
pin:
@ -19,12 +21,13 @@ pin:
name: EEPROM Clock
direction: both
active: high
-->
#I2C - Inter Integrated Circuit
The Raspberry Pi's I2C pins are an extremely useful way to talk to many different types of external peripheral; from the MCP23017 digital IO expander, to a connected ATmega.
The i2c pins include a fixed 1.8 kohms pull-up resistor to 3.3v. This means they are not suitable for use as general purpose IO where a pull-up is not required.
You can verify the address of connected I2C peripherals with a simple one-liner:
```bash
@ -46,4 +49,4 @@ DEVICE_BUS = 1
DEVICE_ADDR = 0x15
bus = smbus.SMBus(DEVICE_BUS)
bus.write_byte_data(DEVICE_ADDR, 0x00, 0x01)
```
```

View File

@ -0,0 +1,57 @@
<!--
---
class: interface
type: pinout
name: DPI
description: Raspberry Pi DPI pins
pin:
'bcm0':
name: CLK
'bcm1':
name: DEN
'bcm2':
name: V-SYNC
'bcm3':
name: H-SYNC
'bcm4':
name: Blue 2
'bcm5':
name: Blue 3
'bcm6':
name: Blue 4
'bcm7':
name: Blue 5
'bcm8':
name: Blue 6
'bcm9':
name: Blue 7
'bcm10':
name: Green 2
'bcm11':
name: Green 3
'bcm12':
name: Green 4
'bcm13':
name: Green 5
'bcm14':
name: Green 6
'bcm15':
name: Green 7
'bcm16':
name: Red 2
'bcm17':
name: Red 3
'bcm18':
name: Red 4
'bcm19':
name: Red 5
'bcm20':
name: Red 6
'bcm21':
name: Red 7
-->
#DPI - Display Parallel Interface
###DPI (Display Parallel Interface) is a 24-bit parallel interface with 28 clock and synchronisation signals. The Pi uses a cut-down, 6-bit, 22 pin version omitting the least significant R, G and B colour bits.
DPI, combined with a simple adaptor consisting of 20 resistors, allows you to add a VGA connector to the Pi which supports resolutions from 640 x 480 up to 1920 x 1024 at 60fps and 6bits per channel.

View File

@ -0,0 +1,31 @@
<!--
---
class: interface
type: pinout
name: GPCLK
description: Raspberry Pi General Purpose Clock
pin:
'bcm4':
name: GPCLK0
'bcm5':
name: GPCLK1
'bcm6':
name: GPCLK2
-->
#GPCLK - General Purpose CLock
###General Purpose Clock pins can be set up to output a fixed frequency without any ongoing software control.
The following clock sources are available:
```
0 0 Hz Ground
1 19.2 MHz oscillator
2 0 Hz testdebug0
3 0 Hz testdebug1
4 0 Hz PLLA
5 1000 MHz PLLC (changes with overclock settings)
6 500 MHz PLLD
7 216 MHz HDMI auxiliary
8-15 0 Hz Ground
```

View File

@ -0,0 +1,33 @@
<!--
---
class: interface
type: pinout
name: JTAG
description: Raspberry Pi JTAG pins
pin:
'bcm4':
name: TDI (Alt5)
'bcm5':
name: TDO (Alt5)
'bcm6':
name: RTCK (Alt5)
'bcm12':
name: TMS (Alt5)
'bcm13':
name: TCK (Alt5)
'bcm22':
name: TRST (Alt4)
'bcm23':
name: RTCK (Alt4)
'bcm24':
name: TDO (Alt4)
'bcm25':
name: TCK (Alt4)
'bcm26':
name: TDI (Alt4)
'bcm27':
name: TMS (Alt4)
-->
#JTAG - Joint Test Action Group
###JTAG is a standardised interface for debugging integrated circuits which you can use to debug your Raspberry Pi

View File

@ -0,0 +1,19 @@
<!--
---
class: interface
type: pinout
name: PCM
description: Raspberry Pi PCM pins
pin:
'bcm18':
name: CLK
'bcm19':
name: FS
'bcm20':
name: DIN
'bcm21':
name: DOUT
-->
#PCM - Pulse-code Modulation
###PCM (Pulse-code Modulation) is a digital representation of sampled analog. On the Raspberry Pi it's a form of digital audio output which can be understood by a DAC for high quality sound.

View File

@ -0,0 +1,25 @@
<!--
---
class: interface
type: pinout
name: SD
description: Raspberry Pi SD0/SD1 pins
pin:
'bcm22':
name: CLK
'bcm23':
name: CMD
'bcm24':
name: DAT0
'bcm25':
name: DAT1
'bcm26':
name: DAT2
'bcm27':
name: DAT3
-->
#SD - SD Card Interface
###SD is the SD host/eMMC interface on the Raspberry Pi. SD host signals are normally used for the microSD slot.
These pins are "SD host" on Alt0 and "eMMC" on Alt3.

View File

@ -1,38 +1,42 @@
<!--
---
class: board
type: audio
name: "Pi-DAC+"
manufacturer: IQaudIO
buy: http://www.iqaudio.co.uk
description: An I2S digital to analog audio converter HAT for the Pi
buy: http://www.iqaudio.co.uk
formfactor: 'HAT'
pincount: 40
eeprom: yes
pin:
'3':
mode: i2c
'5':
mode: i2c
'12':
name: I2S
'15':
name: Mute/Unmute
description: Pi-AMP+ only (optional)
'16':
name: Rotary Encoder
description: (optional)
'18':
name: Rotary Encoder
description: (optional)
'22':
name: IR Sensor
description: (optional)
'35':
name: I2S
'38':
name: I2S
'40':
name: I2S
install:
'devices':
- 'i2c'
pincount: 40
pin:
3:
mode: i2c
5:
mode: i2c
12:
name: I2S
15:
name: Mute/Unmute
description: Pi-AMP+ only (optional)
16:
name: Rotary Encoder
description: (optional)
18:
name: Rotary Encoder
description: (optional)
22:
name: IR Sensor
description: (optional)
35:
name: I2S
38:
name: I2S
40:
name: I2S
-->
#IQaudIO Pi-DAC+
@ -42,7 +46,7 @@ control) analog audio to the Pi-DAC+ Phono connectors. The PI-DAC+ also, via the
Texas Instruments TPA6133A headphone amp, supports the direct use of headphones via
the Pi-DAC+ 3.5mm audio jack.
The Pi Dac uses GPIO22 to mute/unmute the Pi-AMP+.
The Pi-DAC+ uses GPIO22 to mute/unmute the Pi-AMP+.
You can use GPIO25 to connect an IR sensor and GPIO23/24 for a rotary encoder. Both of
these parts are optional, but are broken out on the Pi-DAC+ for convenient access.

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