Hi , Nooby to Arduino here!
I am currently building a Pepper's Ghost exhibit. This is an old trick used by magicians and illusionists to make objects appear and disappear on stage ( worth Googling if you haven't heard of it before!). Part of this exhibit requires that one light source has to dim in one chamber while another light source has to brighten in another chamber (at the same time). It is my intention to use an Arduino uno to control the dimming and brightening of 2x 12v LED strips in the following manner.
When the system is switched on the following must happen:
LED Strip A dims from bright to off.
LED Strip B brightens from off to bright.
These 2 sequences must happen simultaneously and the cycle must take 90 seconds to complete.
I will connect the uno to drivers(which power the LED strips).
AS I am a newcomer to programming,I was wondering if any of you kind experts/ angels of mercy, could assist me in finding an existing sketch that does more or less the same thing . It seems reasonably uncomplicated but I am a bit lost. some form of direction would be much appreciated. Many thanks
create a simple little loop with a bit of math:
for(x=0 x<256; x=x+1){
brightness1 = x; // 0 to 255
brightness2 = 255-x; // 255 to 0
analogWrite(pwm1, brightness1);
analogWrite (pwm2, brightness2);
delay (352); // 90000 sec/255 steps
}
PWMs control NPN transistors to connect LED - to Gnd, LED+ to 12V
Thank you CrossRoads! I will set up my Prototype today and try the code out on a breadboard with 2 simple LEDs.
Appreciate your quick response,Kind Regards.