GPIO - Custom Serial Command

edited June 2021 in Questions & Answers
Hello,
I've control card fan connected on GPIO 14/15, and I can use serial command to pilot the control card like
timer:Xh/xm; start; pwm:512; pwm:10%; stop; fast;
I've read the documentation but I'm not sure to know which option to select, it seems no one corresponds for custom command.
I would like to control the fan with custom @gcode for example when printing start/stop... Thanks :smile:

Comments

  • The GPIO solution is für digital i/o of pins and PWM if supported. It does not include using the serial pins. If you need them you need to write a external script that sends the command and call it with @execute cmd param. External scripts can be added in /var/lib/Repetier-Server/database/extcommands.xml - more details are in handbook and many examples on the forum here.
  • edited June 2021
    Top ! All is working fine. Thanks for your help.

    So if someone is interesting, it's configured like that :

    extcommands.xml :

            <command>
                    <name>Ventilation 50%</name>
                    <execute>/var/lib/Repetier-Server/alveo/start50%.sh</execute>
                    <confirm>Démarrer ventilation à 50% ?</confirm>
                    <local>true</local>
                    <remote>true</remote>
                    <print-permission>true</print-permission>
            </command>

    script /var/lib/Repetier-Server/alveo/start50%.sh :

    #!/bin/bash
     echo -ne "start;" > /dev/ttyAMA0
    sleep 3
     echo -ne "pwm:50%;" > /dev/ttyAMA0
Sign In or Register to comment.