


Bluetooth, a simple microcontroller, and an RGB LED. I stream image data over to the micro from Processing, so I can change the color in real time, or by a preset image. It pauses after each row, so I can move the writer to a new position if I’d like. I’ll post more when I get better working with it.
//Bluetooth LightWrite —Dylan Moore 2008. Thanks, arduino!
void setup()
{
Serial.begin(9600);
}
int r,g,b;
int incomingByte = 0;
void loop()
{
//PWM:
analogWrite(9,r); //R
analogWrite(11,g); //G
analogWrite(10,b); //B
//Serial.println(“heartbeat”);
if (Serial.available() > 0)
{
incomingByte = Serial.read();
if(incomingByte==255) //this will be the transition number while (Serial.available()<=0);
incomingByte = Serial.read();
r=incomingByte;
while(Serial.available()<=0);
incomingByte = Serial.read(); g=incomingByte;
while(Serial.available()<=0);
incomingByte = Serial.read(); b=incomingByte;
}
}