stephanschulz
Well-known member
I am using DmxReceiver successfully for a 20 channel DMX dimmer.
The same Teensy 3.1 is used to do AC Light Dimming but i see flicker once i a while in the lights.
There is no flicker if i command out all the DMX stuff.
So, i am guessing the interrupt routine in the DMX library prevents the Teensy from noticing the zero cross interrupt ?
Pin2 listens to the zero crossing of the AC signal via
when the zero cross interrupt is detected the elapsedMicros timer is set to 0
every 30 ms i check if the elapsedMicros equals the dimming value/time i want and then set the dimming PIN high.
i thought maybe setting the interrupt priorities differently would help???
i know i can set interrupt priorities for interrupt timers but can't find out how to set priotities for interrupt pins.
thanks,
stephan.
here is the code:
https://gist.github.com/antimodular/e4fcc31a1aa951a4b514
The same Teensy 3.1 is used to do AC Light Dimming but i see flicker once i a while in the lights.
There is no flicker if i command out all the DMX stuff.
So, i am guessing the interrupt routine in the DMX library prevents the Teensy from noticing the zero cross interrupt ?
Pin2 listens to the zero crossing of the AC signal via
Code:
attachInterrupt(zeroCrossPin, zero_crosss_int, RISING);
when the zero cross interrupt is detected the elapsedMicros timer is set to 0
every 30 ms i check if the elapsedMicros equals the dimming value/time i want and then set the dimming PIN high.
i thought maybe setting the interrupt priorities differently would help???
i know i can set interrupt priorities for interrupt timers but can't find out how to set priotities for interrupt pins.
thanks,
stephan.
here is the code:
https://gist.github.com/antimodular/e4fcc31a1aa951a4b514
Last edited: