Welcome! Log In Create A New Profile

Advanced

Problem in turn on and off PIN 9 and 10. thumbs up

Posted by paulo.pinda 
Problem in turn on and off PIN 9 and 10. thumbs up
May 18, 2015 03:16PM
I'm trying to create a new command in the firmware of Repetier. I'm using the firmware on a RAMPS 1.4. Using the test script RAMPS, I can turn on and off the PIN 9 and 10. But when I implement the code in the firmware of Repetier, the relay turns on, but turns off automatically.


Following codes:

        Commands :: setRelay void () {
             pinMode (10, OUTPUT);
             digitalWrite (10, HIGH);
        }

        9998 case: // M106 Fan On
             setRelay ();
             break;
            

I did something similar using the speed of the fan and that worked just right, follows the command:

         case 106: // M106 Fan On
             setFanSpeed (com-> Hass () com-> S: 255, com-> hasp ());
             break;
            
         case 107: // OFF Fan M107
             setFanSpeed (0, com-> hasp ());
             break;

Does anyone know why the relay off alone? Since I sent a command to only call?

thank you
Sorry, only registered users may post in this forum.

Click here to login