Reef Tank lighting project
hi guys,
i've got marine fishkeeping , have started small reef tank small fish coral.
i went out looking lighting unit suit tank , ended getting 1 suitable larger tank @ right price - large led fitting £30!!
i've decided i'm going add dimmer functionality it, , i've decided might well have timer controlled @ same time.
logical option arduino.
i've got arduino nano, rtc module, , 2 ldd-500h meanwell dimmable current-limited drivers.
i'm planning drive white leds using 1 ldd, , blue leds another.
i'm wanting use pwm on arduino, , commands based on real time clock adjust light intensity, can me started on code? i'm wanting start fading lights on gradually, peaking in middle of afternoon, , fading them out. haven't used rtc before appreciated!
thanks,
steve
p.s. arduino i'm using arduino nano, £3 china! there 1 £1.50 had buy module connect usb , programme £1.50 (although if have lot of projects save few £!
i've got marine fishkeeping , have started small reef tank small fish coral.
i went out looking lighting unit suit tank , ended getting 1 suitable larger tank @ right price - large led fitting £30!!
i've decided i'm going add dimmer functionality it, , i've decided might well have timer controlled @ same time.
logical option arduino.
i've got arduino nano, rtc module, , 2 ldd-500h meanwell dimmable current-limited drivers.
i'm planning drive white leds using 1 ldd, , blue leds another.
i'm wanting use pwm on arduino, , commands based on real time clock adjust light intensity, can me started on code? i'm wanting start fading lights on gradually, peaking in middle of afternoon, , fading them out. haven't used rtc before appreciated!
thanks,
steve
p.s. arduino i'm using arduino nano, £3 china! there 1 £1.50 had buy module connect usb , programme £1.50 (although if have lot of projects save few £!
i started tank never finished. here have far. delays need replaced millis() or rtc.
the way written fade led full power in hour stay on 6 hours fade down off.
-ruli00
the way written fade led full power in hour stay on 6 hours fade down off.
code: [select]
int ledone = 9; // pin led attached to
int ledtwo = 10;
int ledthree = 11;
int brightness = 55; // how bright led is
int fadeamount = 1; // how many points fade led by
// setup routine runs once when press reset:
void setup() {
// declare pin 9 output:
pinmode(ledone, output);
pinmode(ledtwo, output);
pinmode(ledthree, output);
}
// loop routine runs on , on again forever:
void loop() {
// set brightness of pin 9:
analogwrite(ledone, brightness);
analogwrite(ledtwo, brightness);
analogwrite(ledthree, brightness);
// change brightness next time through loop:
brightness = brightness + fadeamount;
if (brightness == 255){
delay(25200000);
}
// reverse direction of fading @ ends of fade:
if (brightness == 55 || brightness == 255) {
fadeamount = -fadeamount ;
}
// wait 30 milliseconds see dimming effect
delay(18000);
}
-ruli00
Arduino Forum > Using Arduino > Project Guidance > Reef Tank lighting project
arduino
Comments
Post a Comment