So this weekend the genie buckled down, determined to finish the project he had started. His heart was delighted to see that he had finally finished all the wiring to his house! Now all that need to be done was furnishing and some aesthetics!


#include <TimeAlarms.h>
#include <infineonrgb.h>
#include <Wire.h>
#include <Time.h>
#include <stdlib.h>

InfineonRGB LEDS;

void setup() {
     // put your setup code here, to run once:
     LEDS.begin();   
     LEDS.SetDimmingLevel(0x0000);
     setTime(5,41,0,5,24,14); // set time to Saturday 5:41:00am May 24 2015
     Alarm.alarmRepeat(5,41,05, Light);  // 5:41:05am every day

}

void loop() {
     // put your main code here, to run repeatedly:
     Alarm.delay(1000);
}

void Light() {
     LEDS.SetIntensityRGB(0x01FF, 0x0000, 0x0000);
     LEDS.SetDimmingLevel(0x01FF);
     delay(3000);
     LEDS.SetDimmingLevel(0x03FF);
     delay(3000);
     LEDS.SetDimmingLevel(0x07FF);
     delay(3000);
     LEDS.SetDimmingLevel(0x0FFF);
     delay(3000);
     LEDS.SetDimmingLevel(0x07FF);
     delay(3000);
     LEDS.SetDimmingLevel(0x03FF);
     delay(3000);
     LEDS.SetDimmingLevel(0x01FF);
     delay(3000);
     LEDS.SetDimmingLevel(0x0000);
}

 

Above is the code that I used for the video, this will be implemented in the final code, but not using the TimeAlarm library. Also I would like to give Inderpreet Singh a huge thanks. His library infineonrgb.h was very useful. You can find it here.

 

                                                                                                    

 

Stay tuned to see what magic the genie preforms next!