Hi all, im having some slight issues with my program which im guessing is software related. Im using a arduino pro micro 5V to control my LED fixture i built but im having some small problems with some alarms aswell as comparing startup values.
The full program can be found at http://rugland.se/ledcontroller.html (its the v2.0 sketch) A report is also available there for the LED fixture i built.
When starting up the led fixture the program automatically gets the current time from my DS3231, it then starts the alarms aswell as comparing the Alarm times to see if any of the 5 PWM's should be ON.
The problems im having is that when starting the program for instance at 20.00 in the evening (i got some other alarm times saved in the EEPROM than the ones in the sketch) PWM 1 and PWM 2 is supposed to be ON and the rest OFF, but many times ALL PWM channels except PWM 4 is OFF (And PWM 4 shouldnt even be on at that time).
Is there posssible a error when comparing the values in the "AlarmCheck" function which im not aware off which makes the PWM4 to be ON but the PWM1 and PWM2 to be off (when it should be the opposite) ?
Im using the timerOnce function to Dimmer the PWM's, but when the PWM has reached the End value the last alarm seems still be there, why is this? (Im able to see the amount of alarms on my LCD by the Alarm.count() function). Does "todays" alarm.repeat still linger until the next day ?
Im using both the lcd.nodisplay aswell as putting the LCD backlight VCC to zero to be able to close down the LCD when not using it (ive tried using both one at a time as well) since i dont want the backlight on when im not using the display, but sometimes when it powers up again when moving the potentiometer or pushing the button there is not text, only backlight. Anyone knows why?
Alot of code but would be helpful if anyone could give any tips on the bugs ive encountered, maybe im implementing something wrong ?
thx for any help or improvements!