Apple led lamp
I found the led smart light at Schiphol airport. It looked like a nice design and i wanted to see if this would
be possible to stear the device from the internet. To do that i reversed engineered the PCB and connected the appropriate pins to an arduino. You can see that the microprocessor has been removed as the whole thing will be controlled from the arduino.
The pins that need to be connected is as follows:
1 2 3 4 5 6 7 8
+5V GND CW Green Blue MIC Button Red
The green wire should be connected to the other side of the resistor compared to shown.
/* */ const uint8_t PROGMEM gamma[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10, 10, 11, 11, 11, 12, 12, 13, 13, 13, 14, 14, 15, 15, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, 23, 24, 24, 25, 25, 26, 27, 27, 28, 29, 29, 30, 31, 32, 32, 33, 34, 35, 35, 36, 37, 38, 39, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 50, 51, 52, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 66, 67, 68, 69, 70, 72, 73, 74, 75, 77, 78, 79, 81, 82, 83, 85, 86, 87, 89, 90, 92, 93, 95, 96, 98, 99,101,102,104,105,107,109,110,112,114, 115,117,119,120,122,124,126,127,129,131,133,135,137,138,140,142, 144,146,148,150,152,154,156,158,160,162,164,167,169,171,173,175, 177,180,182,184,186,189,191,193,196,198,200,203,205,208,210,213, 215,218,220,223,225,228,231,233,236,239,241,244,247,249,252,255 }; // Output int redPin = 9; // Red LED, connected to digital pin 9 int greenPin = 3; // Green LED, connected to digital pin 3 int bluePin = 6; // Blue LED, connected to digital pin 6 int whitePin = 10; // White LED, connected to digital pin 10 int test; double red, green, blue, white; // Program variables int redVal = 0; // Variables to store the values to send to the pins int greenVal = 0; // Initial values are Red full, Green and Blue off int blueVal = 0; int whiteVal = 0; int i; int wait = 1; // 50ms (.05 second) delay; shorten for faster fades void setup() { Serial.begin(115200); pinMode(redPin, OUTPUT); // sets the pins as output pinMode(greenPin, OUTPUT); pinMode(bluePin, OUTPUT); pinMode(whitePin, OUTPUT); } // Main program void loop() { //RED for (i=0; i<255;i++){ redVal=i;greenVal=0;blueVal=0;pulse(); } for (i=255; i>-1;i--){ redVal=i;greenVal=0;blueVal=0;pulse(); } //GREEN for (i=0; i<255;i++){ redVal=0;greenVal=i;blueVal=0;pulse(); } for (i=255; i>-1;i--){ redVal=0;greenVal=i;blueVal=0;pulse(); } //BLUE for (i=0; i<255;i++){ redVal=0;greenVal=0;blueVal=i;pulse(); } for (i=255; i>-1;i--){ redVal=0;greenVal=0;blueVal=i;pulse(); } //YELLOW for (i=0; i<255;i++){ redVal=i;greenVal=i;blueVal=0;pulse(); } for (i=255; i>-1;i--){ redVal=i;greenVal=i;blueVal=0;pulse(); } //MAGENTA for (i=0; i<255;i++){ redVal=i;greenVal=0;blueVal=i;pulse(); } for (i=255; i>-1;i--){ redVal=i;greenVal=0;blueVal=i;pulse(); } //CYAN for (i=0; i<255;i++){ redVal=0;greenVal=i;blueVal=i;pulse(); } for (i=255; i>-1;i--){ redVal=0;greenVal=i;blueVal=i;pulse(); } //WHITE for (i=0; i<255;i++){ redVal=i;greenVal=i;blueVal=i;pulse(); } for (i=255; i>-1;i--){ redVal=i;greenVal=i;blueVal=i;pulse(); } //WHITE for (i=0; i<255;i++){ whiteVal=i;pulse(); } for (i=255; i>-1;i--){ whiteVal=i;pulse(); } } void pulse() { red = pgm_read_byte(&gamma[redVal]); green = 0.114 / 0.587 * pgm_read_byte(&gamma[greenVal]); blue = 0.259 /0.587 * pgm_read_byte(&gamma[blueVal]); white = pgm_read_byte(&gamma[whiteVal]); analogWrite(redPin, red); // Write current values to LED pins analogWrite(greenPin, green); analogWrite(bluePin, blue); analogWrite(whitePin, white); delay(wait); // Pause for 'wait' milliseconds before resuming the loop }
Recent Comments
Hello, the demo program HKW581.ino... »
Sorry its holiday time. Responded... »
Hi, I am trying to... »