pinout.vvzero.com/src/en/overlay/unicorn-hat.md

56 lines
1.3 KiB
Markdown
Raw Normal View History

<!--
---
2016-01-31 19:03:17 +08:00
class: board
type: led
name: Unicorn HAT
manufacturer: Pimoroni
description: 64 blindingly bright RGB LEDs on a single HAT
url: http://shop.pimoroni.com/products/unicorn-hat
github: https://github.com/pimoroni/unicornhat
buy: http://shop.pimoroni.com/products/unicorn-hat
formfactor: 'HAT'
pincount: 40
eeprom: yes
2016-02-06 19:12:54 +08:00
power:
'2':
ground:
'9':
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/'
-->
#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!
To get the HAT set up and ready to go you can use the one-line product installer:
```bash
curl -sS get.pimoroni.com/unicornhat | bash
```
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
```