allocom / rainbow-hat Goto Github PK
View Code? Open in Web Editor NEW32/64 LED HAT for Raspberry Pi
License: MIT License
32/64 LED HAT for Raspberry Pi
License: MIT License
Traceback (most recent call last):
File "demo.py", line 7, in
import rainbowhat as rainbow
File "build/bdist.linux-armv7l/egg/rainbowhat.py", line 17, in
File "build/bdist.linux-armv7l/egg/neopixel.py", line 114, in begin
RuntimeError: ws2811_init failed with code -1
Exiting cleanly
When trying to light up the right leds on the mini-Rainbow (8x4) with Python with x and y positions and set_pixel, both x and y seem to have a range with the length of 8 (0-7). Each second row of 4 leds seems to be a continuation of the first row of 4 leds.
Example:
import time
import rainbowhat as rainbow
rainbow.set_layout(rainbow.PHAT)
rainbow.rotation(0)
rainbow.brightness(0.3)
for x in range(8):
for y in range(4):
rainbow.set_pixel(x,y,255,255,255)
rainbow.show()
time.sleep(1)
Playing with rotation doesn't help. I'm using set_layout to set it to PHAT.
Example 2 (with rotation):
import time
import rainbowhat as rainbow
rainbow.set_layout(rainbow.PHAT)
rainbow.rotation(90)
rainbow.brightness(0.3)
for x in range(4):
rainbow.set_pixel(x,0,255,255,255)
rainbow.show()
time.sleep(1)
for x in range(4):
rainbow.set_pixel(x,1,255,0,0)
rainbow.show()
time.sleep(1)
results in this:
I had issue with using sudo pip install rainbowhat
as that installs the appropriate files for the Pimoroni Rainbow HAT, not the Allo Rainbow HAT/PHAT. Using your github install instructions however do work. I would suggest removing that from your README under https://github.com/allocom/Rainbow-HAT/tree/master/library/RainbowHat
sudo python demo.py
Traceback (most recent call last):
File "demo.py", line 7, in
import rainbowhat as rainbow
File "build/bdist.linux-armv7l/egg/rainbowhat.py", line 4, in
ImportError: No module named neopixel
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.