Giter Site home page Giter Site logo

rainbow-hat's People

Contributors

alloboss2 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

zoerab mryzl

rainbow-hat's Issues

ws2811_init failed with code -1

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

Mini-Rainbow: led coordinates wrong

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)

video1

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:

video2

neopixel

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.