Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mini-Rainbow: led coordinates wrong #3

Open
muizenis opened this issue Jan 13, 2019 · 0 comments
Open

Mini-Rainbow: led coordinates wrong #3

muizenis opened this issue Jan 13, 2019 · 0 comments

Comments

@muizenis
Copy link

muizenis commented Jan 13, 2019

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

mryzl added a commit to mryzl/Rainbow-HAT that referenced this issue Apr 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant