Changing values used to start a new cog.
DonRacz
Posts: 13
in Propeller 1
I am running a few cogs used for blinking lights on an ws2811 RGB string.
cognew(color_chase3(@Colors1, 13, color_chase3_delay, color_chase3_start, color_chase3_len),@stack4)
Is it possible to change these values ie. color_chase3_start and color_chase3_len while the cog is running or do I need to stop the cog and restart with new values.
I have multiple cogs driving differnt sections of one string and it works great.
Comments
Can you share your color_chase3 code? You'd probably want to pass a pointer to a structure (DAT table) that includes all those parameters, that way you could change them from your main code and the background would pick them up without having to be restarted.
Never mind I figured it out.
Jon, I attached some before and after code.
Thanks