Hello all
I have a program that runs in a loop, and issues DMX values as required, depending on the state of 5 buttons. Pretty simple.
The DMX values are set up to either switch on and off immediately to preset levels, or ramps up and down over a set period of time in seconds.
These adjusted DMX values are adjusted and send every 100ms using a millis() timer.
It all worked fine until I added some other code to the loop that checks some serial data from another sensor. This has now thrown that timing out the window and the ramping of the values takes a third longer than it should, and I assume this will only get worse as I add more code to the main loop.
I have never used threads on the Teensy before. Is this a possible use for threading? As in, could I allocate that serial DMX data to be sent on it's own thread?
Or, am I totally mis-understanding how that would work.
Also, if the DMX data is sent on Serial1, but my other main loop data is read on Serial3, am I going to run into conflicts?
Thanks!
I have a program that runs in a loop, and issues DMX values as required, depending on the state of 5 buttons. Pretty simple.
The DMX values are set up to either switch on and off immediately to preset levels, or ramps up and down over a set period of time in seconds.
These adjusted DMX values are adjusted and send every 100ms using a millis() timer.
It all worked fine until I added some other code to the loop that checks some serial data from another sensor. This has now thrown that timing out the window and the ramping of the values takes a third longer than it should, and I assume this will only get worse as I add more code to the main loop.
I have never used threads on the Teensy before. Is this a possible use for threading? As in, could I allocate that serial DMX data to be sent on it's own thread?
Or, am I totally mis-understanding how that would work.
Also, if the DMX data is sent on Serial1, but my other main loop data is read on Serial3, am I going to run into conflicts?
Thanks!