My AllPixel arrived today from ManiacalLabs the first think you need to do when you get it is install the included components. As described not all of the components included are required but if you know what you're planning to do it should be pretty easy to work out what you need.
Next you need to make sure when you connect up the USB cable to the Raspberry Pi it sees your AllPixel board. I attached the USB before I had started the Pi and first off it did not see the board using;
ls /dev/ttyACM*
I restarted a couple of times and then I just unplugged it and plugged it back it an ta-da there is was listed.
Once I knew the board was recognised I was ready to connect up the LEDs. I have a short strip of WS2812 I was using, I connected the wires like this;
GND to GND
DIN to DATA
V+ to +5v
Once you've do this you should be able to just press the button on the AllPixel and you'll see the LEDs light up and if you press it again they should change configuration.
Now you're ready for installing the python library, the raspberry pi comes with pip installed so it should just be a case of running;
sudo pip install BiblioPixel
Now at this point you have a couple of options, you should have everything you need to start coding against the python library however if you'd also like to use the AllPixel with the GPIO pins on your Pi then you might want to run these commands.
curl https://raw.githubusercontent.com/ManiacalLabs/BiblioPixel/master/requirements.txt > requirements.txt
sudo pip install -r requirements.txt
I installed them just in case I wanted to work with the GPIO at a later date. There are further options you might need but these are all I had to run on my Raspberry Pi.
Now I wanted to do a test of my of my LED strip, the guys at ManiacalLabs have provided a great little script to run as quick start. All you need to do is download it and then run it and you'll see your LEDs come to life.
curl https://raw.githubusercontent.com/wiki/ManiacalLabs/AllPixel/examples/AllPixelStripTest.py > AllPixelStripTest.py
python
AllPixelStripTest.py
You should see the first 10 of the LEDs in you strip come to life and the 3 LEDs at the end change colour. Details of exactly what should happen is available on the AllPixel Documentation
Note: If you're using a different strip from you'll need to change the enum at the top to select the strip you are using. On line 7 change LEDTYPE.WS2812B to one of the following properties.
- LPD8806
- WS2801
- WS2811
- WS2812
- WS2812B
- NEOPIXEL
- APA104
- WS2811_400
- TM1809
- TM1804
- TM1803
- UCS1903
- SM16716
- APA102
- LPD1886
- P9813
0 comments:
Post a comment