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

Hard-coded gamma-correction, maybe add option? (patterns not written correctly on _old_ blink1) #10

Open
cvdwl opened this issue Feb 14, 2021 · 2 comments

Comments

@cvdwl
Copy link

cvdwl commented Feb 14, 2021

I have a couple of old blink1s I bought, possibly first batch out of beta. Using either the CLI or the python library, I get an issue where writing a pattern doesn't work.

  1. Buffers 12-15 map to 0 (ok, I guess the pattern memory is only 12 deep).
  2. written color values do not correspond to those read. Looks like it's a parabolic transform.

Not really a show-stopper, mostly just curious.

In [65]: for i in range(0,15):
    ...:     b.write_pattern_line(i*50,(i,i*10,i*15),i)
    ...:     print((i,i*10,j+i*15,i*50))
    ...:           
(0, 0, 0, 0)
(1, 10, 15, 50)
(2, 20, 30, 100)
(3, 30, 45, 150)
(4, 40, 60, 200)
(5, 50, 75, 250)
(6, 60, 90, 300)
(7, 70, 105, 350)
(8, 80, 120, 400)
(9, 90, 135, 450)
(10, 100, 150, 500)
(11, 110, 165, 550)
(12, 120, 180, 600)
(13, 130, 195, 650)
(14, 140, 210, 700)
(15, 150, 225, 750)

In [66]: b.read_pattern()
Out[66]: 
[(1, 88, 199, 750),
 (0, 0, 1, 50),
 (0, 2, 4, 100),
 (0, 4, 8, 150),
 (0, 6, 14, 200),
 (0, 10, 22, 250),
 (0, 14, 32, 300),
 (0, 19, 43, 350),
 (0, 25, 56, 400),
 (0, 32, 71, 450),
 (0, 39, 88, 500),
 (0, 47, 107, 550),
 (1, 88, 199, 750),
 (1, 88, 199, 750),
 (1, 88, 199, 750),
 (1, 88, 199, 750)]
@todbot
Copy link
Owner

todbot commented Feb 14, 2021

Hi @cvdwl,

  1. The original blink(1) only has 12 lines of color pattern memory. If you like, email us at blink1 at thingm.com with your blink(1) serial number and and we can arrange a new blink(1) mk3 to be shipped to you. Thank you for being an original blink(1) customer!

  2. What you are seeing is the built-in gamma-correction of blink1-python to make the perceived LED colors match better what is seen on the screen. In blink1-tool, you can optionally disable gamma-correction on pattern line write, but that option isn't available in blink1-python yet. So I think I'll rename this issue so we can add that option.

@todbot todbot changed the title patterns not written correctly on _old_ blink1 Hard-coded gamma-correction, maybe add option? (patterns not written correctly on _old_ blink1) Feb 14, 2021
@cvdwl
Copy link
Author

cvdwl commented Feb 15, 2021

Thanks, that clarifies things; P(em)M sent. Like I said, more a curiosity thing. I'd understand if these are well past EOL, but they still work.

They do seem to be a little finicky with establishing and releasing connections using the python library; still trying to work that one out. I'll check back in if I can establish a pattern.

(n.b. working with Raspberries and Linux mostly)

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

2 participants