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

add eyedropper example #90

Merged
merged 2 commits into from
Apr 30, 2021
Merged

add eyedropper example #90

merged 2 commits into from
Apr 30, 2021

Conversation

HerbFargus
Copy link

@HerbFargus HerbFargus commented Feb 8, 2021

This is just a quick example to create a real-time eyedropper where the LEDs on the blinkt reflect the rgb value at the mouse cursor. I'm sure it could be optimised but thought I'd put it out there for anyone interested.

quick video in action:

eyedropper

Dependencies:

  • pillow > 7.1 (I used pip3 install --user pillow==8.1.0)
  • pyautogui

pillow and pyautogui depend on x to work, so won't work directly on the framebuffer eg doesn't work on retropie.

Tested and working on my Raspberry Pi 4 on the latest Buster Desktop Raspberry Pi OS (2021-01-11)

@druck-pexip
Copy link

Nice. If you could separate the blinkt LEDs and evenly space them around the back of the screen, you could do a DIY Philips ambilight™

@HerbFargus
Copy link
Author

Nice. If you could separate the blinkt LEDs and evenly space them around the back of the screen, you could do a DIY Philips ambilight™

This is actually a derivative result of my attempts to do just that, but since as far as I can tell the blinkt module isn't directly supported with hyperion, I cobbled together something like this but the code isn't really up to snuff for inclusion in this repo.

@Gadgetoid
Copy link
Member

Aaaagh lured into thinking that GitHub's "Update Branch" feature would actually do something sensible. Grumble.

Hopefully the tests should actually run now. This example looks ace- cool trick!

@coveralls
Copy link

Pull Request Test Coverage Report for Build 799118883

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 74.026%

Totals Coverage Status
Change from base Build 799118446: 0.0%
Covered Lines: 57
Relevant Lines: 77

💛 - Coveralls

@Gadgetoid Gadgetoid merged commit 2f5fdc5 into pimoroni:master Apr 30, 2021
@Gadgetoid
Copy link
Member

Thank you- I can't actually locate a Blinkt! to try this out with, but it runs-

May be worth noting somewhere that a very up-to-date version of PIL/Pillow is required. I had to python3 -m pip install pillow --upgrade to replace the python3-pip apt version.

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

Successfully merging this pull request may close these issues.

None yet

5 participants