Skip to content

Instantly share code, notes, and snippets.

@ronniej2014
Last active August 29, 2015 14:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ronniej2014/462b28cfcda55d20192a to your computer and use it in GitHub Desktop.
Save ronniej2014/462b28cfcda55d20192a to your computer and use it in GitHub Desktop.
import codeanticode.syphon.*;
SyphonServer server;
PImage img;
float R;
float G;
float B;
long lastChange1;
int blinkRate1 = 500;
boolean ledState1;
void setup()
{
size(270, 270, P3D);
//savedTime = millis();
smooth();
img = loadImage("slogan.png");
server = new SyphonServer(this, "Processing Syphon");
}
void draw()
{
if(millis()-lastChange1 > blinkRate1)
{
R = random(255);
G = random (255);
B = random (255);
fill(R, G, B);
ledState1 = !ledState1;
lastChange1 = millis();
}
rect(0, 0, width, height);
image(img, 0, 0);
server.sendScreen();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment