GPIO INPUT/OUTPUT CONTROL

Good evening, I state that I am not very expert in codes. I would like to be able to configure three relays to control the enclosure light, a light that indicates that the printer is working (green light) and one that indicates that there is an anomaly or problem in the system (red light). Can anyone help me? Thank you

Comments

  • Depends on your definitions and where lights are connected and who needs to switch lights and how to detect your states. E.g. problem - if server can not connect it can not control over firmware. And what is a problem? It might prevent switching lights. And what is ok? Printing is easy as you have start/end gcodes where you can add logic to switch light. But then it gets problematic. And which software are you using? You posted same for host?
  • Good morning, I also posted to the host but I was wrong. The printer has marlin as firmware. The relays are connected to PINs 17,22,24 of the raspberry. I tried to configure the command in extcommands.xml with their script but I can't get them to work. They would then be controlled by the touchscreen (I saw the video on youtube of a user who controlled the relays in that way)
  • Rhe problem with scripts is often that users forget that they get executed as user repetierserver and not as serve pi like you do while testing. So best is to copy them to "/var/lib/Repetier-Server/scripts" give them permission 777 using
    chmod 777 filename
    then they should be executable by repetierserver which has gpio permission I think. There is even the possibility to write a lua monitor as described here: https://www.repetier-server.com/monitoring-plugins/ which can access GPIO pins directly and has also direct access to server status, so you could check it every second and update outputs.
  • null

    Hi, thanks for the reply. I took a look at what you wrote but it's a bit too comolicate. I leave you the link of a user article where it follows these steps and works perfectly ... regards

    http://3dmodelist.com/how-to-turn-off-your-3d-printer-from-repetier-server-part-2
Sign In or Register to comment.