Tweaked CSS, added i2c to dot3k and i2c detection, added LEDborg

This commit is contained in:
Phil Howard 2015-03-21 23:40:38 +00:00
parent a730e3e1c1
commit ea95c428d9
7 changed files with 84 additions and 5 deletions

View File

@ -0,0 +1,26 @@
###The PiBorg LedBorg is an ultra-bright RGB LED board for the Raspberry Pi.
PiBorg has its own driver, so you don't need to drive it manually.
If you want a much, much wider range of colours, though, you can drive it manually using softPwm in WiringPi. The pin assignments for this are as follows:
WiringPi pin 0: Red LED
WiringPi pin 2: Green LED
WiringPi pin 3: Blue LED
This is easy using WiringPi in Python:
```python
import wiringpi2 as wiringpi
wiringpi.wiringPiSetup()
wiringpi.softPwmCreate(0,0,100)
wiringpi.softPwmCreate(2,0,100)
wiringpi.softPwmCreate(3,0,100)
# Purple!
wiringpi.softPwmWrite(3,100) # Full Blue
wiringpi.softPwmWrite(0,100) # Full Red
wiringpi.softPWMWrite(2,0) # No Green
```

View File

@ -0,0 +1,3 @@
# HAT EEPROM Pins ID_SC and ID_SD
These pins are generally reserved for i2c communication with a HAT EEPROM.

1
description/pins/pin-28.md Symbolic link
View File

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

View File

@ -16,6 +16,7 @@ overlays = [
'i2c',
'arduino-spi',
'rtk-000-001',
'piborg-ledborg',
'pibrella',
'explorer-hat-pro',
'explorer-hat',
@ -70,6 +71,12 @@ def load_overlay(overlay):
if 'pin' in loaded:
uses = len(loaded['pin'])
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 'url' in loaded:
details.append('* [More Information]({url})'.format(url=loaded['url']))
@ -153,17 +160,16 @@ def render_pin(pin_num, selected_url, overlay=None):
pin_type = list([x.strip() for x in pin['type'].lower().split('/')])
pin_url = pin['name']
pin_name = pin['name']
pin_text_name = pin['name']
pin_used = False
pin_link_title = []
if overlay != None and str(pin_num) in overlay['pin']:
overlay_pin = overlay['pin'][str(pin_num)]
pin_text_name = ''
#print(overlay)
pin_name = overlay_pin['name']
pin_used = True
#print(overlay)
if 'name' in overlay_pin:
pin_name = overlay_pin['name']
if 'description' in overlay_pin:
pin_link_title.append(overlay_pin['description'])

View File

@ -5,6 +5,23 @@
"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",

View File

@ -0,0 +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"
}
}
}

View File

@ -82,11 +82,12 @@ nav#gpio li a {
display:block;
width:236px;
position:relative;
font-size:14px;
font-size:13px;
line-height:29px;
height:27px;
margin-bottom:2px;
}
nav#gpio li a small {font-size:11px;}
nav#gpio li.overlay-pin a {
background:rgba(235, 230, 211, 0.50);