2015-04-11 06:32:08 +08:00
|
|
|
<!--
|
|
|
|
---
|
2016-01-31 19:03:17 +08:00
|
|
|
class: board
|
|
|
|
type: led
|
2015-04-11 06:32:08 +08:00
|
|
|
name: Unicorn HAT
|
|
|
|
manufacturer: Pimoroni
|
|
|
|
description: 64 blindingly bright RGB LEDs on a single HAT
|
2015-12-30 01:49:41 +08:00
|
|
|
url: http://shop.pimoroni.com/products/unicorn-hat
|
2015-04-11 06:32:08 +08:00
|
|
|
github: https://github.com/pimoroni/unicornhat
|
2015-12-30 01:49:41 +08:00
|
|
|
buy: http://shop.pimoroni.com/products/unicorn-hat
|
|
|
|
formfactor: 'HAT'
|
|
|
|
pincount: 40
|
|
|
|
eeprom: yes
|
|
|
|
pin:
|
|
|
|
'12':
|
|
|
|
name: Data
|
|
|
|
direction: output
|
|
|
|
mode: pwm
|
|
|
|
active: high
|
|
|
|
description: WS2812 Data
|
2015-10-28 21:17:24 +08:00
|
|
|
install:
|
|
|
|
'apt':
|
|
|
|
- 'python-dev'
|
|
|
|
- 'python3-dev'
|
2015-10-28 21:18:08 +08:00
|
|
|
'python':
|
2015-10-28 21:17:24 +08:00
|
|
|
- 'unicornhat'
|
2015-10-28 21:18:08 +08:00
|
|
|
'python3':
|
2015-10-28 21:17:24 +08:00
|
|
|
- 'unicornhat'
|
|
|
|
'examples': 'python/examples/'
|
2015-04-11 06:32:08 +08:00
|
|
|
-->
|
2015-03-23 03:02:36 +08:00
|
|
|
#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.
|
|
|
|
|
|
|
|
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!
|
|
|
|
|
2015-11-10 07:44:51 +08:00
|
|
|
To get the HAT set up and ready to go you can use the one-line product installer:
|
2015-03-23 03:02:36 +08:00
|
|
|
|
|
|
|
```bash
|
2015-11-10 07:44:51 +08:00
|
|
|
curl -sS get.pimoroni.com/unicornhat | bash
|
2015-03-23 03:02:36 +08:00
|
|
|
```
|
|
|
|
|
|
|
|
Then import it into your Python script and start tinkering:
|
|
|
|
|
|
|
|
```bash
|
|
|
|
import unicornhat
|
|
|
|
unicornhat.set_pixel(0, 0, 255, 255, 255)
|
|
|
|
unicornhat.show()
|
2015-10-28 21:17:24 +08:00
|
|
|
```
|