Coder Social home page Coder Social logo

ledbacklightpi's Introduction

LEDBacklightPi

Syncs RGB LEDs to the current contents of the desktop using a Raspberry Pi. By default it uses a custom OpenCL-based algorithm, but it can optionally use a modified version of img_avg from ScreeonBloom, or fengsp's color-thief-py instead. It also hosts an (extremely simple) web control panel on port 1422 where you can switch between the aforementioned dynamic color behavior or simply setting the LEDs to a static color.

Requirements

  • Python 3.x
  • Pillow, colormath, pyopencl, and numpy installed on the host PC
  • python-daemon and colormath installed on the RPi
  • An OpenCL-capable GPU and PyOpenCL for the GPU mode
  • I've only tested the client program on Windows 10 and macOS, but there's no reason Linux and older versions of Windows shouldn't work.

Instructions

Wire up the Pi to the LED strip as shown here, then run python3 main.py start on your Raspberry Pi from the /Pi directory and Client/main.py on your computer. Alternatively, load up (your RPi's IP):1422 to access the web control panel.

Caveats

  • Does not work with exclusive fullscreen apps (i.e. games) because of how DirectX/OpenGL/Vulkan work. You'll have to run games in windowed or borderless windowed mode for the screen to be analyzed properly.
  • Copy-protected video (e.g. Netflix) appears as a black box and will be analyzed by the color selection algorithm as such. Which makes sense, if you think about it. Non-protected media like YouTube and MPC-HC work perfectly fine.
  • On multi-monitor setups, the program only looks at the primary monitor. This is intentional; it's intended to mirror the colors of your game or video, not your secondary screen.

ledbacklightpi's People

Contributors

karmeleon avatar

Watchers

 avatar  avatar

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.