Total architectural change to embedded Yaml

This commit is contained in:
Phil Howard 2015-04-10 23:32:08 +01:00
parent 8a1d2745bb
commit e99a7d4444
73 changed files with 1233 additions and 1318 deletions

View File

@ -7,6 +7,11 @@ import os
import time
import sys
import pinout
import yaml
import markjaml
reload(sys)
sys.setdefaultencoding('utf8')
lang = "en-GB"
base_url = '/pinout/'
@ -17,26 +22,6 @@ if len(sys.argv) > 1:
pinout.load(lang)
'''overlays = [
'ground',
'spi',
'uart',
'i2c',
'wiringpi',
'arduino-spi',
'rtk-000-001',
'piborg-ledborg',
'piglow',
'pibrella',
'unicorn-hat',
'skywriter-hat',
'explorer-hat-pro',
'explorer-hat',
'display-o-tron',
'dots',
'traffic-hat'
]'''
overlays = pinout.settings['overlays']
template = open('src/{}/template/layout.html'.format(lang)).read()
@ -83,11 +68,13 @@ def slugify(value):
def load_overlay(overlay):
try:
loaded = json.load(open('src/{}/overlay/{}.json'.format(lang,overlay)))
data = markjaml.load('src/{}/overlay/{}.md'.format(lang,overlay))
loaded = data['data']
loaded['long_description'] = data['html']
except IOError:
return None
loaded['long_description'] = load_md('description/overlay/{}.md'.format(overlay))
details = []
@ -108,6 +95,7 @@ def load_overlay(overlay):
uses_3v = False
uses = 0
for pin in loaded['pin']:
pin = str(pin)
if pin.startswith('bcm'):
pin = pinout.bcm_to_physical(pin[3:])
@ -169,7 +157,7 @@ def render_pin_text(pin_num, pin_url, pin_name, pin_functions, pin_subtext):
pin_name=pin_name,
pin_functions=pin_functions,
pin_subtext=pin_subtext,
pin_text=load_md('description/pins/pin-{}.md'.format(pin_num)))
pin_text=load_md('pin/pin-{}.md'.format(pin_num)))
def render_overlay_page(overlay):
if overlay == None:
@ -271,13 +259,18 @@ def render_pin(pin_num, selected_url, overlay=None):
if 'bcm' in pin['scheme']:
bcm_pin = 'bcm' + str(pin['scheme']['bcm'])
if overlay != None and ( 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 str(pin_num) 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 overlay_pin == None:
overlay_pin = {}
pin_used = True
#print(overlay)
if 'name' in overlay_pin:
@ -302,8 +295,8 @@ def render_pin(pin_num, selected_url, overlay=None):
pin_url = base_url + slugify('pin{}_{}'.format(pin_num,pin_url))
if pin['name'] == 'Ground':
pin_url = base_url + 'ground'
if pin['type'] in pinout.get_setting('urls'):
pin_url = base_url + pinout.get_setting('urls')[pin['type']]
selected = ''
@ -348,7 +341,7 @@ and all other pages in /pinout/
serve.py will mirror this structure for testing.
'''
pages['pinout'] = {}
pages['pinout']['rendered_html'] = render_overlay_page({'name':'Index','long_description':load_md('description/index.md')})
pages['pinout']['rendered_html'] = render_overlay_page({'name':'Index','long_description':load_md('index.md')})
navs['pinout'] = render_nav('pinout')
print('Rendering pin pages...')

55
markjaml.py Normal file
View File

@ -0,0 +1,55 @@
import json
import markdown
import yaml
import re
import unicodedata
def slugify(value):
"""
Normalizes string, converts to lowercase, removes non-alpha characters,
and converts spaces to hyphens.
"""
value = unicode(value)
value = unicodedata.normalize('NFKD', value).encode('ascii', 'ignore').decode('ascii')
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.
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)
_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)
if _title != None:
_title = _title.group(0).replace('#','').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 = {}
_data['title'] = _title
elif _title != None:
_data = {'title':_title}
return {'data':_data, 'html':_html}

View File

@ -1,13 +1,19 @@
import json
import yaml
import time
import markdown
DB_FILE = 'pi-pinout.json'
SETTINGS_FILE = 'settings.json'
DB_FILE = 'pi-pinout.yaml'
SETTINGS_FILE = 'settings.yaml'
pins = None
settings = None
def get_setting(setting):
if setting in settings:
return settings[setting]
return None
def render_html(*args, **kwargs):
html = args[0]
kwargs['v'] = str(int(time.time()))
@ -50,8 +56,14 @@ def physical_to(pin, scheme='bcm'):
def load(lang='en-GB'):
global pins, settings
db = json.load(open('src/{}/{}'.format(lang,DB_FILE)))
settings = json.load(open('src/{}/{}'.format(lang,SETTINGS_FILE)))
if DB_FILE.endswith('.yaml'):
db = yaml.load(open('src/{}/{}'.format(lang,DB_FILE)).read())
else:
db = json.load(open('src/{}/{}'.format(lang,DB_FILE)))
if SETTINGS_FILE.endswith('.yaml'):
settings = yaml.load(open('src/{}/{}'.format(lang,SETTINGS_FILE)).read())
else:
settings = json.load(open('src/{}/{}'.format(lang,SETTINGS_FILE)))
pins = db['pins']

View File

@ -1,9 +0,0 @@
#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:
```bash
curl get.pimoroni.com/dot3k | bash
```
And follow the instructions!

View File

@ -1,26 +0,0 @@
#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!
Every Dot on the Dots board is a "floating" metal contact just waiting to be pulled down to ground with a dab of paint.
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
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:
```python
def is_dot_connected(dot_pin):
GPIO.setup(dot_pin, GPIO.IN, GPIO.PUD_UP)
state = GPIO.input( dot_pin )
GPIO.setup(dot_pin, GPIO.IN, GPIO.PUD_OFF)
return state == 0
```

View File

@ -1,15 +0,0 @@
#Explorer HAT and 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.
```bash
sudo apt-get install python-pip
sudo pip install explorer-hat
```
Then import it into your Python script and start tinkering:
```bash
import explorerhat
explorerhat.light.on()
```

View File

@ -1 +0,0 @@
explorer-hat-pro.md

View File

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

View File

@ -1,6 +0,0 @@
#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.
It also recognises gestures, including swipes and more.

View File

@ -1,30 +0,0 @@
{
"name": "Arduino SPI",
"description": "Program Arduino with Raspberry Pi SPI",
"pin": {
"19": {
"name": "MOSI",
"direction": "output",
"active": "high",
"description": "Master Out / Slave In"
},
"21": {
"name": "MISO",
"direction": "input",
"active": "high",
"description": "Master In / Slave Out"
},
"23": {
"name": "SCKL",
"direction": "output",
"active": "high",
"description": "Clock"
},
"24": {
"name": "CE0",
"direction": "output",
"active": "high",
"description": "Arduino Reset"
}
}
}

View File

@ -1,3 +1,29 @@
<!--
---
name: Arduino SPI
description: Program Arduino with Raspberry Pi SPI
pin:
19:
name: MOSI
direction: output
active: high
description: Master Out / Slave In
21:
name: MISO
direction: input
active: high
description: Master In / Slave Out
23:
name: SCKL
direction: output
active: high
description: Clock
24:
name: CE0
direction: output
active: high
description: Arduino Reset
-->
#ATmega 328p / Arduino over SPI
###Did you know that your Pi could power and program an ATmega 328p/Arduino directly, with nothing but a few wires, a breadboard, a 16Mhz crystal oscillator and some 22pF capacitors?

View File

@ -1,51 +0,0 @@
{
"name": "Display-o-Tron 3000",
"manufacturer": "Pimoroni",
"url": "https://github.com/pimoroni/dot3k",
"description": "A 3-line character LCD with an RGB backlight and joystick",
"pincount": 40,
"pin": {
"3": {
"mode": "i2c"
},
"5": {
"mode": "i2c"
},
"19": {
"mode": "spi"
},
"23": {
"mode": "spi"
},
"22": {
"name": "LCD CMD/DATA",
"mode": "output",
"active": "high"
},
"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"
},
"21": {
"name": "Joystick Down",
"mode": "input",
"active": "low"
}
}
}

View File

@ -0,0 +1,50 @@
<!--
---
name: Display-o-Tron 3000
manufacturer: Pimoroni
url: https://github.com/pimoroni/dot3k
description: A 3-line character LCD with an RGB backlight and joystick
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:
```bash
curl get.pimoroni.com/dot3k | bash
```
And follow the instructions!

View File

@ -1,36 +0,0 @@
{
"name": "Raspberry Pi Dots",
"description": "Join the dots to make a circuit",
"url": "http://www.raspberrypi.org/dots/",
"github": "https://github.com/raspberrypilearning/dots",
"pin": {
"bcm0": {"name":"Color: Blue", "direction":"input"},
"bcm1": {"name":"Dot 7", "direction":"input"},
"bcm2": {"name":"Dot 22", "direction":"input"},
"bcm3": {"name":"Dot 21", "direction":"input"},
"bcm4": {"name":"Dot 2", "direction":"input"},
"bcm5": {"name":"Dot 9", "direction":"input"},
"bcm6": {"name":"Dot 14", "direction":"input"},
"bcm7": {"name":"Dot 6", "direction":"input"},
"bcm8": {"name":"Dot 18", "direction":"input"},
"bcm9": {"name":"Dot 17", "direction":"input"},
"bcm10": {"name":"Color: Green", "direction":"input"},
"bcm11": {"name":"Dot 8", "direction":"input"},
"bcm12": {"name":"Dot 10", "direction":"input"},
"bcm13": {"name":"Cloud", "direction":"input"},
"bcm14": {"name":"Dot 1", "direction":"input"},
"bcm15": {"name":"Dot 3", "direction":"input"},
"bcm16": {"name":"Dot 13", "direction":"input"},
"bcm17": {"name":"Dot 4", "direction":"input"},
"bcm18": {"name":"Dot 20", "direction":"input"},
"bcm19": {"name":"Color: Orange", "direction":"input"},
"bcm20": {"name":"Bear", "direction":"input"},
"bcm21": {"name":"Dot 12", "direction":"input"},
"bcm22": {"name":"Dot 15", "direction":"input"},
"bcm23": {"name":"Dot 16", "direction":"input"},
"bcm24": {"name":"Dot 19", "direction":"input"},
"bcm25": {"name":"Dot 5", "direction":"input"},
"bcm26": {"name":"Dot 11", "direction":"input"},
"bcm27": {"name":"Color: Red", "direction":"input"}
}
}

117
src/en-GB/overlay/dots.md Normal file
View File

@ -0,0 +1,117 @@
<!--
---
name: Raspberry Pi Dots
description: Join the dots to make a circuit
url: http://www.raspberrypi.org/dots/
github: https://github.com/raspberrypilearning/dots
pin:
bcm0:
name: 'Color: Blue'
direction: input
bcm1:
name: Dot 7
direction: input
bcm2:
name: Dot 22
direction: input
bcm3:
name: Dot 21
direction: input
bcm4:
name: Dot 2
direction: input
bcm5:
name: Dot 9
direction: input
bcm6:
name: Dot 14
direction: input
bcm7:
name: Dot 6
direction: input
bcm8:
name: Dot 18
direction: input
bcm9:
name: Dot 17
direction: input
bcm10:
name: 'Color: Green'
direction: input
bcm11:
name: Dot 8
direction: input
bcm12:
name: Dot 10
direction: input
bcm13:
name: Cloud
direction: input
bcm14:
name: Dot 1
direction: input
bcm15:
name: Dot 3
direction: input
bcm16:
name: Dot 13
direction: input
bcm17:
name: Dot 4
direction: input
bcm18:
name: Dot 20
direction: input
bcm19:
name: 'Color: Orange'
direction: input
bcm20:
name: Bear
direction: input
bcm21:
name: Dot 12
direction: input
bcm22:
name: Dot 15
direction: input
bcm23:
name: Dot 16
direction: input
bcm24:
name: Dot 19
direction: input
bcm25:
name: Dot 5
direction: input
bcm26:
name: Dot 11
direction: input
bcm27:
name: 'Color: Red'
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!
Every Dot on the Dots board is a "floating" metal contact just waiting to be pulled down to ground with a dab of paint.
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
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:
```python
def is_dot_connected(dot_pin):
GPIO.setup(dot_pin, GPIO.IN, GPIO.PUD_UP)
state = GPIO.input( dot_pin )
GPIO.setup(dot_pin, GPIO.IN, GPIO.PUD_OFF)
return state == 0
```

View File

@ -1,110 +0,0 @@
{
"name": "Explorer HAT Pro",
"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.",
"pincount": 40,
"i2c": {
"0x28": {
"name": "Cap Touch",
"device": "cap1208"
},
"0x48": {
"name": "Analog Input",
"device": "ads1015"
}
},
"pin": {
"3": {},
"5": {},
"8": {},
"10": {},
"12": {},
"19": {},
"21": {},
"23": {},
"24": {},
"7": {
"name": "LED 1",
"mode": "output",
"active": "high"
},
"11": {
"name": "LED 2",
"mode": "output",
"active": "high"
},
"13": {
"name": "LED 3",
"mode": "output",
"active": "high"
},
"29": {
"name": "LED 4",
"mode": "output",
"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"
},
"36": {
"name": "Output 4",
"mode": "output",
"active": "high"
},
"16": {
"name": "Input 1",
"mode": "input",
"active": "high"
},
"15": {
"name": "Input 2",
"mode": "input",
"active": "high"
},
"18": {
"name": "Input 3",
"mode": "input",
"active": "high"
},
"22": {
"name": "Input 4",
"mode": "input",
"active": "high"
},
"40": {
"name": "Motor 2 +",
"mode": "output",
"active": "high"
},
"37": {
"name": "Motor 2 -",
"mode": "output",
"active": "high"
},
"35": {
"name": "Motor 1 +",
"mode": "output",
"active": "high"
},
"38": {
"name": "Motor 1 -",
"mode": "output",
"active": "high"
}
}
}

View File

@ -0,0 +1,106 @@
<!--
---
name: Explorer HAT Pro
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.
pincount: 40
i2c:
'0x28':
name: Cap Touch
device: cap1208
'0x48':
name: Analog Input
device: ads1015
pin:
'3': {}
'5': {}
'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
active: high
'15':
name: Input 2
mode: input
active: high
'16':
name: Input 1
mode: input
active: high
'18':
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
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
-->
#Explorer HAT and 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.
```bash
sudo apt-get install python-pip
sudo pip install explorer-hat
```
Then import it into your Python script and start tinkering:
```bash
import explorerhat
explorerhat.light.on()
```

View File

@ -1,71 +0,0 @@
{
"name": "Explorer HAT",
"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.",
"pincount": 40,
"pin": {
"7": {
"name": "LED 1",
"mode": "output",
"active": "high"
},
"11": {
"name": "LED 2",
"mode": "output",
"active": "high"
},
"13": {
"name": "LED 3",
"mode": "output",
"active": "high"
},
"29": {
"name": "LED 4",
"mode": "output",
"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"
},
"36": {
"name": "Output 4",
"mode": "output",
"active": "high"
},
"16": {
"name": "Input 1",
"mode": "input",
"active": "high"
},
"15": {
"name": "Input 2",
"mode": "input",
"active": "high"
},
"18": {
"name": "Input 3",
"mode": "input",
"active": "high"
},
"22": {
"name": "Input 4",
"mode": "input",
"active": "high"
}
}
}

View File

@ -0,0 +1,74 @@
<!--
---
name: Explorer HAT
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.
pincount: 40
pin:
'7':
name: LED 1
mode: output
active: high
'11':
name: LED 2
mode: output
active: high
'13':
name: LED 3
mode: output
active: high
'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
'29':
name: LED 4
mode: output
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
'36':
name: Output 4
mode: output
active: high
-->
#Explorer HAT and 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.
```bash
sudo apt-get install python-pip
sudo pip install explorer-hat
```
Then import it into your Python script and start tinkering:
```bash
import explorerhat
explorerhat.light.on()
```

View File

@ -1,14 +0,0 @@
{
"name": "Ground",
"description": "Raspberry Pi Ground Pins",
"pin": {
"6": {},
"9": {},
"14": {},
"20": {},
"25": {},
"30": {},
"34": {},
"39": {}
}
}

View File

@ -1,6 +1,20 @@
<!--
---
name: Ground
description: Raspberry Pi Ground Pins
pin:
'6':
'9':
'14':
'20':
'25':
'30':
'34':
'39':
-->
#Ground
The Ground pins on the Raspberry Pi are all electrically connected, so it doesn't matter
The Ground pins ona the Raspberry Pi are all electrically connected, so it doesn't matter
which one you use if you're wiring up a voltage supply.
Generally the one that's most convinient or closest to the rest of your connections is tidier

View File

@ -1,26 +0,0 @@
{
"name": "I2C",
"description": "Raspberry Pi i2c pins",
"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"
}
}
}

View File

@ -1,3 +1,26 @@
<!--
---
name: I2C
description: Raspberry Pi i2c pins
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
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.

View File

@ -1,25 +0,0 @@
{
"name": "PiBorg LEDBorg",
"description": "A single RGB LED for your Raspberry Pi",
"buy": "https://www.piborg.org/ledborg",
"pin": {
"11": {
"name": "Red LED",
"direction": "output",
"active": "high",
"description": "PiBorg Red LED"
},
"13": {
"name": "Green LED",
"direction": "input",
"active": "high",
"description": "PiBorg Green LED"
},
"15": {
"name": "Blue LED",
"direction": "output",
"active": "high",
"description": "PiBorg Blue LED"
}
}
}

View File

@ -1,3 +1,25 @@
<!--
---
name: PiBorg LEDBorg
description: A single RGB LED for your Raspberry Pi
buy: https://www.piborg.org/ledborg
pin:
'11':
name: Red LED
direction: output
active: high
description: PiBorg Red LED
'13':
name: Green LED
direction: input
active: high
description: PiBorg Green LED
'15':
name: Blue LED
direction: output
active: high
description: PiBorg Blue LED
-->
###The PiBorg LedBorg is an ultra-bright RGB LED board for the Raspberry Pi.
PiBorg has its own driver, so you don't need to drive it manually.

View File

@ -1,74 +0,0 @@
{
"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.",
"pincount": 26,
"pin": {
"7": {
"name": "Green LED",
"direction": "output",
"active": "high"
},
"11": {
"name": "Yellow LED",
"direction": "output",
"active": "high"
},
"13": {
"name": "Red LED",
"direction": "output",
"active": "high"
},
"15": {
"name": "Output A",
"direction": "output",
"active": "high"
},
"19": {
"name": "Input D",
"direction": "output",
"active": "high"
},
"21": {
"name": "Input A",
"direction": "input",
"active": "high"
},
"23": {
"name": "Button",
"direction": "input",
"active": "high"
},
"12": {
"name": "Buzzer",
"direction": "output",
"active": "high"
},
"16": {
"name": "Output B",
"direction": "output",
"active": "high"
},
"18": {
"name": "Output C",
"direction": "output",
"active": "high"
},
"22": {
"name": "Output D",
"direction": "output",
"active": "high"
},
"24": {
"name": "Input C",
"direction": "input",
"active": "high"
},
"26": {
"name": "Input B",
"direction": "input",
"active": "high"
}
}
}

View File

@ -0,0 +1,78 @@
<!--
---
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.
pincount: 26
pin:
'7':
name: Green LED
direction: output
active: high
'11':
name: Yellow LED
direction: output
active: high
'12':
name: Buzzer
direction: output
active: high
'13':
name: Red LED
direction: output
active: high
'15':
name: Output A
direction: output
active: high
'16':
name: Output B
direction: output
active: high
'18':
name: Output C
direction: output
active: high
'19':
name: Input D
direction: output
active: high
'21':
name: Input A
direction: input
active: high
'22':
name: Output D
direction: output
active: high
'23':
name: Button
direction: input
active: high
'24':
name: Input C
direction: input
active: high
'26':
name: Input B
direction: input
active: high
-->
#Pibrella
The all-in-one light, sound, input and output add-on board from Pimoroni vs Cyntech uses lots of IO on the Pi but leaves both Serial and I2C free leaving plenty of room for expansion if you get creative.
Pibrella is easy to use, first you should install the module using LXTerminal/Command Line:
```bash
sudo apt-get install python-pip
sudo pip install pibrella
```
Then import it into your Python script and start tinkering:
```bash
import pibrella
pibrella.light.red.on()
```

View File

@ -1,21 +0,0 @@
{
"name": "PiGlow",
"manufacturer": "Pimoroni",
"url": "https://github.com/pimoroni/piglow",
"github": "https://github.com/pimoroni/piglow",
"buy": "http://shop.pimoroni.com/products/piglow",
"description": "Simply 18 LEDs in a spiral pattern controllable in Python.",
"pincount": 26,
"pin": {
"1" : {},
"2" : {},
"3": {
"mode": "i2c"
},
"5": {
"mode": "i2c"
},
"14" : {},
"17" : {}
}
}

View File

@ -0,0 +1,20 @@
<!--
---
name: PiGlow
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.
pincount: 26
pin:
'1': {}
'2': {}
'3':
mode: i2c
'5':
mode: i2c
'14': {}
'17': {}
-->
#PiGlow

View File

@ -1,3 +1,29 @@
<!--
---
name: Ryanteck Motor Controller Board
manufacturer: Ryanteck
url: http://www.ryanteck.uk/store/ryanteck-rpi-motor-controller-board
buy: http://www.ryanteck.uk/store/ryanteck-rpi-motor-controller-board
description: A budget motor controller with quick start guides.
pincount: 26
pin:
'11':
name: Motor 1 A
direction: output
active: high
'12':
name: Motor 1 B
direction: output
active: high
'15':
name: Motor 2 A
direction: output
active: high
'16':
name: Motor 2 B
direction: output
active: high
-->
#Ryanteck Motor Controller Board
###A quick and easy way to start driving motors on your Raspberry Pi

View File

@ -1,30 +0,0 @@
{
"name": "Ryanteck Motor Controller Board",
"manufacturer": "Ryanteck",
"url": "http://www.ryanteck.uk/store/ryanteck-rpi-motor-controller-board",
"buy": "http://www.ryanteck.uk/store/ryanteck-rpi-motor-controller-board",
"description": "A budget motor controller with quick start guides.",
"pincount": 26,
"pin": {
"11": {
"name": "Motor 1 A",
"direction": "output",
"active": "high"
},
"12": {
"name": "Motor 1 B",
"direction": "output",
"active": "high"
},
"15": {
"name": "Motor 2 A",
"direction": "output",
"active": "high"
},
"16": {
"name": "Motor 2 B",
"direction": "output",
"active": "high"
}
}
}

View File

@ -1,23 +0,0 @@
{
"name": "Skywriter HAT",
"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.",
"pincount": 40,
"pin": {
"3": {
"mode": "i2c"
},
"5": {
"mode": "i2c"
},
"11": {
"name": "Reset"
},
"13": {
"name": "Transfer"
}
}
}

View File

@ -0,0 +1,25 @@
<!--
---
name: Skywriter HAT
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.
pincount: 40
pin:
'3':
mode: i2c
'5':
mode: i2c
'11':
name: Reset
'13':
name: Transfer
-->
#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.
It also recognises gestures, including swipes and more.

View File

@ -1,55 +0,0 @@
{
"name": "SPI",
"description": "Raspberry Pi SPI pins",
"pincount": 5,
"pin": {
"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"
},
"38": {
"name": "SPI1 MOSI"
},
"40": {
"name": "SPI1 SCLK"
},
"36": {
"name": "SPI1 CE2"
},
"11": {
"name": "SPI1 CE1"
},
"12": {
"name": "SPI1 CE0"
}
}
}

View File

@ -1,3 +1,47 @@
<!--
---
name: SPI
description: Raspberry Pi SPI pins
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
###Known as the four-wire serial bus, SPI lets you daisy-chain multiple compatible devices off a single set of pins by assigning them different addresses.

View File

@ -1,36 +0,0 @@
{
"name": "Traffic HAT",
"manufacturer": "Ryanteck LTD.",
"url": "http://www.ryanteck.uk/",
"buy": "http://www.ryanteck.uk/",
"description": "A quick and easy way to learn the basics of GPIO on a budget. All in a nice HAT.",
"pincount": 40,
"pin": {
"15": {
"name": "LED1 / Green",
"direction": "output",
"active": "high"
},
"16": {
"name": "LED2 / Amber",
"direction": "output",
"active": "high"
},
"18": {
"name": "LED3 / Red",
"direction": "output",
"active": "high"
},
"22": {
"name": "Button",
"direction": "input",
"active": "high"
},
"29": {
"name": "Buzzer",
"direction": "output",
"active": "high"
}
}
}

View File

@ -1,3 +1,34 @@
<!--
---
name: Traffic HAT
manufacturer: Ryanteck LTD.
url: http://www.ryanteck.uk/
buy: http://www.ryanteck.uk/
description: A quick and easy way to learn the basics of GPIO on a budget. All in
a nice HAT.
pincount: 40
pin:
'15':
name: LED1 / Green
direction: output
active: high
'16':
name: LED2 / Amber
direction: output
active: high
'18':
name: LED3 / Red
direction: output
active: high
'22':
name: Button
direction: input
active: high
'29':
name: Buzzer
direction: output
active: high
-->
#Traffic HAT
###A quick and easy way to learn the basics of GPIO on a budget. All in a nice HAT.
@ -78,4 +109,4 @@ while True:
IO.output(22,1) # Turn the Green LED On / 1
sleep(2)
```
```

View File

@ -1,16 +0,0 @@
{
"name": "UART",
"description": "Raspberry Pi UART pins",
"pin": {
"8": {
"name": "TXD / Transmit",
"direction": "output",
"active": "high"
},
"10": {
"name": "RXD / Receive",
"direction": "input",
"active": "high"
}
}
}

View File

@ -1,3 +1,17 @@
<!--
---
name: UART
description: Raspberry Pi UART pins
pin:
'8':
name: TXD / Transmit
direction: output
active: high
'10':
name: RXD / Receive
direction: input
active: high
-->
#UART - Universal Asynchronous Receiver/Transmitter
###The 2 UART pins in WiringPi are: 15, 16

View File

@ -1,18 +0,0 @@
{
"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",
"github": "https://github.com/pimoroni/unicornhat",
"pincount": 40,
"pin": {
"12": {
"name": "Data",
"direction": "output",
"mode": "pwm",
"active": "high",
"description": "WS2812 Data"
}
}
}

View File

@ -1,3 +1,20 @@
<!--
---
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
github: https://github.com/pimoroni/unicornhat
pincount: 40
pin:
'12':
name: Data
direction: output
mode: pwm
active: high
description: WS2812 Data
-->
#Unicorn HAT
64 blindingly bright LEDs packed into a HAT and driven with an ultra-fast, C library that you can talk to

View File

@ -1,84 +0,0 @@
{
"name": "WiringPi GPIO Pinout",
"page_url": "wiringpi",
"pin":{
"3":{
"name":"WiringPi 8"
},
"5":{
"name":"WiringPi 9"
},
"7":{
"name":"WiringPi 7"
},
"11":{
"name":"WiringPi 0"
},
"13":{
"name":"WiringPi 2"
},
"15":{
"name":"WiringPi 3"
},
"19":{
"name":"WiringPi 12"
},
"21":{
"name":"WiringPi 13"
},
"23":{
"name":"WiringPi 14"
},
"29":{
"name":"WiringPi 21"
},
"31":{
"name":"WiringPi 22"
},
"33":{
"name":"WiringPi 23"
},
"35":{
"name":"WiringPi 24"
},
"37":{
"name":"WiringPi 25"
},
"8":{
"name":"WiringPi 15"
},
"10":{
"name":"WiringPi 16"
},
"12":{
"name":"WiringPi 1"
},
"16":{
"name":"WiringPi 4"
},
"18":{
"name":"WiringPi 5"
},
"22":{
"name":"WiringPi 6"
},
"24":{
"name":"WiringPi 10"
},
"26":{
"name":"WiringPi 11"
},
"32":{
"name":"WiringPi 26"
},
"36":{
"name":"WiringPi 27"
},
"38":{
"name":"WiringPi 28"
},
"40":{
"name":"WiringPi 29"
}
}
}

View File

@ -1,3 +1,61 @@
<!--
---
name: WiringPi GPIO Pinout
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
-->
#Raspberry Pi WiringPi
###WiringPi is an attempt to bring Arduino-wiring-like simplicity to the Raspberry Pi.
@ -20,4 +78,4 @@ Installing to Python couldn't be easier, just:
sudo pip install wiringpi2
```
Note the 2 on the end? That's the all new, shinier WiringPi!
Note the 2 on the end? That's the all new, shinier WiringPi!

View File

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

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

@ -0,0 +1,368 @@
---
name: Raspberry Pi GPIO Pinout
pins:
'1':
name: 3v3 Power
type: "+3v3"
'2':
name: 5v Power
type: "+5v"
'3':
name: SDA
description: I2C Data
type: GPIO/I2C
scheme:
wiringpi: 8
bcm: 2
bcmAlt: 0
functions:
alt0: SDA1
alt1: SA3
'4':
name: 5v Power
type: "+5v"
'5':
name: SCL
description: I2C Clock
type: GPIO/I2C
scheme:
wiringpi: 9
bcm: 3
bcmAlt: 1
functions:
alt0: SCL1
alt1: SA2
'6':
name: 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 Transmit
type: GPIO/UART
scheme:
wiringpi: 15
bcm: 14
functions:
alt0: TXD0
alt1: SD6
alt2: Reserved
alt5: TXD1
'9':
name: Ground
type: GND
'10':
name: RXD
description: UART Receive
type: GPIO/UART
scheme:
wiringpi: 16
bcm: 15
functions:
alt0: RXD0
alt1: SD7
alt2: Reserved
alt5: RXD1
'11':
name: ''
type: GPIO
scheme:
wiringpi: 0
bcm: 17
functions:
alt0: Reserved
alt1: SD9
alt2: Reserved
alt3: RTS0
alt4: SPI1_CE1_N
alt5: RTS1
'12':
name: PCM_C
description: PCM Clock
type: GPIO
scheme:
wiringpi: 1
bcm: 18
functions:
alt0: PCM_CLK
alt1: SD10
alt2: Reserved
alt3: BSCSL SDA / MOSI
alt4: SPI1_CE0_N
alt5: PWM0
'13':
name: PCM_D
type: GPIO
scheme:
wiringpi: 2
bcm: 27
bcmAlt: 21
functions:
alt0: Reserved
alt1: Reserved
alt2: Reserved
alt3: SD1_DAT3
alt4: ARM_TMS
'14':
name: Ground
type: GND
'15':
name: ''
type: GPIO
scheme:
wiringpi: 3
bcm: 22
functions:
alt0: Reserved
alt1: SD14
alt2: Reserved
alt3: SD1_CLK
alt4: ARM_TRST
'16':
name: ''
type: GPIO
scheme:
wiringpi: 4
bcm: 23
functions:
alt0: Reserved
alt1: SD15
alt2: Reserved
alt3: SD1_CMD
alt4: ARM_RTCK
'17':
name: 3v3 Power
type: "+3v3"
'18':
name: ''
type: GPIO
scheme:
wiringpi: 5
bcm: 24
functions:
alt0: Reserved
alt1: SD16
alt2: Reserved
alt3: SD1_DAT0
alt4: ARM_TDO
'19':
name: MOSI
type: GPIO/SPI
scheme:
wiringpi: 12
bcm: 10
functions:
alt0: SPI0_MOSI
alt1: SD2
alt2: Reserved
'20':
name: Ground
type: GND
'21':
name: MISO
type: GPIO/SPI
scheme:
wiringpi: 13
bcm: 9
functions:
alt0: SPI0_MISO
alt1: SD1
alt2: Reserved
'22':
name: ''
type: GPIO
scheme:
wiringpi: 6
bcm: 25
functions:
alt0: Reserved
alt1: SD17
alt2: Reserved
alt3: SD1_DAT1
alt4: ARM_TCK
'23':
name: SCLK
type: GPIO/SPI
scheme:
wiringpi: 14
bcm: 11
functions:
alt0: SPI0_SCLK
alt1: SD3
alt2: Reserved
'24':
name: CE0
description: SPI Chip Select 0
type: GPIO/SPI
scheme:
wiringpi: 10
bcm: 8
functions:
alt0: SPI0_CE0_N
alt1: SD0
alt2: Reserved
'25':
name: 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: Reserved
'27':
name: ID_SD
description: HAT EEPROM i2c Data
type: GPIO/I2C
scheme:
wiringpi: 30
bcm: 0
functions:
alt0: SDA0
alt1: SA5
alt2: Reserved
'28':
name: ID_SC
description: HAT EEPROM i2c Clock
type: GPIO/I2C
scheme:
wiringpi: 31
bcm: 1
functions:
alt0: SCL0
alt1: SA4
alt2: Reserved
'29':
name: ''
type: GPIO
scheme:
wiringpi: 21
bcm: 5
functions:
alt0: GPCLK1
alt1: SA0
alt2: Reserved
alt5: ARM_TDO
'30':
name: Ground
type: GND
'31':
name: ''
type: GPIO
scheme:
wiringpi: 22
bcm: 6
functions:
alt0: GPCLK2
alt1: SOE_N / SE
alt2: Reserved
alt5: ARM_RTCK
'32':
name: ''
type: GPIO
scheme:
wiringpi: 26
bcm: 12
functions:
alt0: PWM0
alt1: SD4
alt2: Reserved
alt5: ARM_TMS
'33':
name: ''
type: GPIO
scheme:
wiringpi: 23
bcm: 13
functions:
alt0: PWM1
alt1: SD5
alt2: Reserved
alt5: ARM_TCK
'34':
name: 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: Reserved
alt3: BSCSL SCL / SCLK
alt4: SPI1_MISO
alt5: PWM1
'36':
name: ''
type: GPIO
scheme:
wiringpi: 27
bcm: 16
functions:
alt0: Reserved
alt1: SD8
alt2: Reserved
alt3: CTS0
alt4: SPI1_CE2_N
alt5: CTS1
'37':
name: ''
type: GPIO
scheme:
wiringpi: 25
bcm: 26
functions:
alt0: Reserved
alt1: Reserved
alt2: Reserved
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: Reserved
alt3: BSCSL / MISO
alt4: SPI1_MOSI
alt5: CPCLK0
'39':
name: Ground
type: GND
'40':
name: SCLK
description: SPI Clock
type: GPIO/SPI
scheme:
wiringpi: 29
bcm: 21
functions:
alt0: PCM_DOUT
alt1: SD13
alt2: Reserved
alt3: BSCSL / CE_N
alt4: SPI1_SCLK
alt5: GPCLK1

View File

@ -1,23 +0,0 @@
{
"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",
"overlays": [
"ground",
"spi",
"uart",
"i2c",
"wiringpi",
"arduino-spi",
"rtk-000-001",
"piborg-ledborg",
"piglow",
"pibrella",
"unicorn-hat",
"skywriter-hat",
"explorer-hat-pro",
"explorer-hat",
"display-o-tron",
"dots"
]
}

25
src/en-GB/settings.yaml Normal file
View File

@ -0,0 +1,25 @@
---
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"
urls:
GND: ground
overlays:
- ground
- spi
- uart
- i2c
- wiringpi
- arduino-spi
- rtk-000-001
- piborg-ledborg
- piglow
- pibrella
- unicorn-hat
- skywriter-hat
- explorer-hat-pro
- explorer-hat
- display-o-tron
- dots
- traffic-hat