1

For a project I'm working on, I'm looking to control the color of digital RGB leds using a python program. After doing some research I found out that Arduino should work for this. However, the code works as follows:

  • The code determines what the most present color is on the monitor
  • The color is then averaged out and sent as output in (r,g,b) format

To "scan" the colors of the screen I am using the python PIL library. My question is the following:

Will the code still be able to "read" colors of the monitors if it is not running on the PC? and if not, can I somehow control the RGB leds using just my PC?

  • `Will the code still be able to "read" colors of the monitors if it is not running on the PC` What? Where are you running what script exactly for what purpose? And yes, you can control the RGB leds of the arduino over a PC, e.g. by using the `Serial` communication over USB. Did I understand correctly that a python script screenshots the desktop, computes the average (R,G,B) value, sends it to the Arduino, which then lights up an RGB LED in that color? – Maximilian Gerhardt Mar 10 '17 at 18:06
  • @MaximilianGerhardt Yes that's correct. The script screenshots the monitor and then sends RGB values to the led strip. I'm not sure whether the code can screenshot the monitor if it is not actually running on the pc itself... – Arthur Thiam Mar 10 '17 at 18:09
  • You mean a program which is not running on a PC, but instead on an arduino, should make a screenshot of the monitor connected to the PC? How is this supposed to work? No, the Arduino can just receive the to-be-displayed RGB-value over the USB port, that would be the easiest thing. Why try and calculate an average color of a picture you can't see on the Arduino. – Maximilian Gerhardt Mar 10 '17 at 18:13
  • @MaximilianGerhardt Alright, thanks a lot! – Arthur Thiam Mar 10 '17 at 18:15

0 Answers0