• Tags
  • Documentation
  • Order
  • Register
  • Login
Duet3D Logo Duet3D
  • Tags
  • Documentation
  • Order
  • Register
  • Login

How to read mainbord status on GPIO

Scheduled Pinned Locked Moved
Duet Hardware and wiring
2
3
131
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • undefined
    Rodrigue Richalland
    last edited by 2 Feb 2023, 22:28

    Hello everyone,
    I want to know if it's possible to read the mainbord status on GPIO pin ?

    I want to manage a RGB LED whith this variable.

    1bfb0642-b9ff-4e19-962c-591bd97ae411-image.png

    If somebody have already try to do it, i'm interrested.

    Thanks for your precious help😁

    undefined 1 Reply Last reply 2 Feb 2023, 22:49 Reply Quote 0
    • undefined
      OwenD @Rodrigue Richalland
      last edited by OwenD 2 Feb 2023, 22:50 2 Feb 2023, 22:49

      @Rodrigue-Richalland

      You need to monitor the object model and look at state.status
      The possible values are here
      https://github.com/Duet3D/RepRapFirmware/wiki/Object-Model-Documentation#statestatus

      Then you can use daemon.g to change the led.
      Something like this will update every 2 seconds

      while true
      if state.status = "idle"
      ; do code to set LED white
      elif state.status = "processing"
      ; do code to set LED green
      elif state.status = "halted"
      ; do code to make led red
      else
      ; do code to make led yellow for any other state
      G4 S2
      undefined 1 Reply Last reply 3 Feb 2023, 07:44 Reply Quote 2
      • undefined
        Rodrigue Richalland @OwenD
        last edited by 3 Feb 2023, 07:44

        @OwenD
        Thanks for you quick reply. I will try.

        1 Reply Last reply Reply Quote 0
        1 out of 3
        • First post
          1/3
          Last post
        Unless otherwise noted, all forum content is licensed under CC-BY-SA