Maintenance notice: These forum archives are read-only, and will be removed shortly. Please visit our forums at their new location, https://www.evilmadscientist.com/forums/.

Art Controller Programming

Hi All

I am only new to this and I have purchased a art controller, I am happy with all the current functions but I am wanting to know if anyone can help me in programing the controller to have a 3 second delay before the timer circuit operates the relay.

Comments

  • Please see our wiki page on programming, for the "getting started" guide:  http://wiki.evilmadscientist.com/Art_Controller_Firmware

    Look for this part of the code, where the trigger is issued:

                        if (PINB & 1)  // Make sure that cancel pin is HIGH (not active):

                        {

                            resetTimer();

                            StopTime = calculateStopTime();

                            TurnCoilOn();

                            Triggered = 1;

                            CoilOn = 1; 

                        }  




    What you will want to do is to add the three-second delay at this point, maybe like so:




                        if (PINB & 1)  // Make sure that cancel pin is HIGH (not active):

                        {

                            resetTimer();

    StopTime = 3;

    while ( seconds() < StopTime)

    {}


                            resetTimer();

                            StopTime = calculateStopTime();

                            TurnCoilOn();

                            Triggered = 1;

                            CoilOn = 1; 

                        } 




    (Keep in mind that this is untested code, but it might point you in the right direction.)
Sign In or Register to comment.