The OPC folder has 4 files in it.  One is OPCstrandtest, which you are already familiar with.

Check out Phil's Lightship guide for descriptions of how to use OPCpianoroll and OPCvideo.

New to this guide is the OPCscreencap sketch.  This sketch will capture whatever is playing on your screen in realtime and send it out to your wig over wifi. 

Open OPCscreencap and update the code to reflect your device's IP address.  Also, change the arrayWidth and arrayHeight numbers to match your LED strands -- I used 6 for width since we have 6 strands, and 12 for height since my longest strip is 12 pixels long.


OPC opc       = new OPC(this, "", 7890);
int arrayWidth  = 6,   //change these numbers to reflect your LED strands
    arrayHeight = 12,
    pixelSize   = 30,
    numPixels   = arrayWidth * arrayHeight,
    screenNum   = 0  ;  //if you have multiple computer monitors, try changing this to 1


Press "Play" in Processing.  You'll see a pixelated version of your screen that's 6x12.  Move some windows around on your screen and see if the lights in the wig change along with you.

To see the power of this app, pull up a music visualizer program (iTunes has a good native one, or head over to Electric Sheep on YouTube).   Make the video full screen while your Processing script is running, and Be Amazed.

This guide was first published on Apr 07, 2016. It was last updated on Mar 08, 2024.

This page (Use It) was last updated on Mar 20, 2016.

Text editor powered by tinymce.