Last active
August 29, 2015 14:11
-
-
Save ronniej2014/462b28cfcda55d20192a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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