Tweaked CSS, added i2c to dot3k and i2c detection, added LEDborg
This commit is contained in:
parent
a730e3e1c1
commit
ea95c428d9
26
description/overlay/piborg-ledborg.md
Normal file
26
description/overlay/piborg-ledborg.md
Normal 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
|
||||||
|
```
|
3
description/pins/pin-27.md
Normal file
3
description/pins/pin-27.md
Normal 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
1
description/pins/pin-28.md
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
pin-27.md
|
@ -16,6 +16,7 @@ overlays = [
|
|||||||
'i2c',
|
'i2c',
|
||||||
'arduino-spi',
|
'arduino-spi',
|
||||||
'rtk-000-001',
|
'rtk-000-001',
|
||||||
|
'piborg-ledborg',
|
||||||
'pibrella',
|
'pibrella',
|
||||||
'explorer-hat-pro',
|
'explorer-hat-pro',
|
||||||
'explorer-hat',
|
'explorer-hat',
|
||||||
@ -70,6 +71,12 @@ def load_overlay(overlay):
|
|||||||
if 'pin' in loaded:
|
if 'pin' in loaded:
|
||||||
uses = len(loaded['pin'])
|
uses = len(loaded['pin'])
|
||||||
details.append('* Uses {} GPIO pins'.format(uses))
|
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:
|
if 'url' in loaded:
|
||||||
details.append('* [More Information]({url})'.format(url=loaded['url']))
|
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_type = list([x.strip() for x in pin['type'].lower().split('/')])
|
||||||
pin_url = pin['name']
|
pin_url = pin['name']
|
||||||
pin_name = pin['name']
|
pin_name = pin['name']
|
||||||
pin_text_name = pin['name']
|
|
||||||
pin_used = False
|
pin_used = False
|
||||||
pin_link_title = []
|
pin_link_title = []
|
||||||
|
|
||||||
|
|
||||||
if overlay != None and str(pin_num) in overlay['pin']:
|
if overlay != None and str(pin_num) in overlay['pin']:
|
||||||
overlay_pin = overlay['pin'][str(pin_num)]
|
overlay_pin = overlay['pin'][str(pin_num)]
|
||||||
pin_text_name = ''
|
|
||||||
#print(overlay)
|
|
||||||
pin_name = overlay_pin['name']
|
|
||||||
pin_used = True
|
pin_used = True
|
||||||
|
#print(overlay)
|
||||||
|
if 'name' in overlay_pin:
|
||||||
|
pin_name = overlay_pin['name']
|
||||||
|
|
||||||
if 'description' in overlay_pin:
|
if 'description' in overlay_pin:
|
||||||
pin_link_title.append(overlay_pin['description'])
|
pin_link_title.append(overlay_pin['description'])
|
||||||
|
@ -5,6 +5,23 @@
|
|||||||
"description": "A 3-line character LCD with an RGB backlight and joystick",
|
"description": "A 3-line character LCD with an RGB backlight and joystick",
|
||||||
"pincount": 40,
|
"pincount": 40,
|
||||||
"pin": {
|
"pin": {
|
||||||
|
"3": {
|
||||||
|
"mode": "i2c"
|
||||||
|
},
|
||||||
|
"5": {
|
||||||
|
"mode": "i2c"
|
||||||
|
},
|
||||||
|
"19": {
|
||||||
|
"mode": "spi"
|
||||||
|
},
|
||||||
|
"23": {
|
||||||
|
"mode": "spi"
|
||||||
|
},
|
||||||
|
"22": {
|
||||||
|
"name": "LCD CMD/DATA",
|
||||||
|
"mode": "output",
|
||||||
|
"active": "high"
|
||||||
|
},
|
||||||
"7": {
|
"7": {
|
||||||
"name": "Joystick Button",
|
"name": "Joystick Button",
|
||||||
"mode": "input",
|
"mode": "input",
|
||||||
|
25
overlay/piborg-ledborg.json
Normal file
25
overlay/piborg-ledborg.json
Normal 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"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -82,11 +82,12 @@ nav#gpio li a {
|
|||||||
display:block;
|
display:block;
|
||||||
width:236px;
|
width:236px;
|
||||||
position:relative;
|
position:relative;
|
||||||
font-size:14px;
|
font-size:13px;
|
||||||
line-height:29px;
|
line-height:29px;
|
||||||
height:27px;
|
height:27px;
|
||||||
margin-bottom:2px;
|
margin-bottom:2px;
|
||||||
}
|
}
|
||||||
|
nav#gpio li a small {font-size:11px;}
|
||||||
|
|
||||||
nav#gpio li.overlay-pin a {
|
nav#gpio li.overlay-pin a {
|
||||||
background:rgba(235, 230, 211, 0.50);
|
background:rgba(235, 230, 211, 0.50);
|
||||||
|
Loading…
Reference in New Issue
Block a user