https://github.com/coatsy/neopi
Files for working with NeoPixels and Raspberry Pi
https://github.com/coatsy/neopi
Last synced: 6 days ago
JSON representation
Files for working with NeoPixels and Raspberry Pi
- Host: GitHub
- URL: https://github.com/coatsy/neopi
- Owner: coatsy
- License: mit
- Created: 2019-11-19T01:48:56.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-11-20T04:29:24.000Z (over 6 years ago)
- Last Synced: 2025-03-11T22:34:50.642Z (about 1 year ago)
- Language: Python
- Size: 5.86 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# neopi
Files for working with NeoPixels and Raspberry Pi
## Setup
### Setup for CircuitPython
[https://learn.adafruit.com/circuitpython-on-raspberrypi-linux/installing-circuitpython-on-raspberry-pi](https://learn.adafruit.com/circuitpython-on-raspberrypi-linux/installing-circuitpython-on-raspberry-pi)
### Install adafruit neopixel library
`sudo pip3 install rpi_ws281x adafruit-circuitpython-neopixel`
Note that running the adafruit library requires root access as it reads/writes directly from/to `dev/mem`
Run a program with `sudo python3 `
Library docs are at [https://circuitpython.readthedocs.io/projects/neopixel/en/latest/](https://circuitpython.readthedocs.io/projects/neopixel/en/latest/)
## Useful links
[https://www.thegeekpub.com/16187/controlling-ws2812b-leds-with-a-raspberry-pi/](https://www.thegeekpub.com/16187/controlling-ws2812b-leds-with-a-raspberry-pi/)
Raspberry Pi PWM pins (from an answer at [https://forums.adafruit.com/viewtopic.php?p=445593](https://forums.adafruit.com/viewtopic.php?p=445593))
| PIN | GPIO | DMA CHANNEL |
|--|--|--|
| 12 | 18 | 0 |
| 32 | 12 | 0 |
| 33 | 13 | 1 |
| 35 | 19 | 1 |
Note that unless you use one of the pins on DMA Channel 0, you need to set the channel in the constructor of the NeoPixel object
### Good Samples
[https://github.com/adafruit/Adafruit_CircuitPython_NeoPixel](https://github.com/adafruit/Adafruit_CircuitPython_NeoPixel)