Art Controller Programming

Home Evil Mad Scientist Forums Other kit and product support Art Controller Programming

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #20133
    bafaction
    Participant

    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.

    #21011
    Windell Oskay
    Keymaster

    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.)

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.