Ok, I feel very stupid. It was the freaking 1ms delay.
I knew they could interfer with the code, but come on, it's just 1ms >:(
Thanks to all of you.
However I'll try to do what @PaulS has said. Because I'm at 96% capacity on my arduino nano...
One last question...
To change the number of alarms I have to modify the .h file:
#if defined(__AVR__)
#define dtNBR_ALARMS 6 // max is 255
#else
#define dtNBR_ALARMS 12 // assume non-AVR has more memory
#endif
I have to change the number 6 by the number of alarms I want, but what does the second line (the one with the 12) do?