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

    Duet3 MB6HC, Neopixel changing colors as the hotend temp changes

    Scheduled Pinned Locked Moved
    Gcode meta commands
    4
    10
    507
    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.
    • Quadcellsundefined
      Quadcells
      last edited by

      HI, So I am new to the Duet3 MB6HC and RRF3.3, coming from Duet2 wifi RRF2.x.
      I would like to use the RGBW NeoPixel strip as a visual to the changing hot end temp and maybe the printer condition as "Idle" "Print" "Pause" ect. Is this posiable?
      Do I need some kind of loop statements?
      Could you point me to some documentation on how to do this.
      Always learning something new.
      Thanks in advance

      /quadcells

      Stephen6309undefined 1 Reply Last reply Reply Quote 0
      • Phaedruxundefined Phaedrux moved this topic from General Discussion
      • Phaedruxundefined
        Phaedrux Moderator
        last edited by

        Have you been introduced to conditional gcode yet?

        https://duet3d.dozuki.com/Wiki/GCode_Meta_Commands

        Z-Bot CoreXY Build | Thingiverse Profile

        Quadcellsundefined 1 Reply Last reply Reply Quote 0
        • Quadcellsundefined
          Quadcells @Phaedrux
          last edited by

          @phaedrux said in Duet3 MB6HC, Neopixel changing colors as the hotend temp changes:

          Have you been introduced to conditional gcode yet?

          https://duet3d.dozuki.com/Wiki/GCode_Meta_Commands

          Thank you.
          Reading now.

          /quadcells

          1 Reply Last reply Reply Quote 0
          • Stephen6309undefined
            Stephen6309 @Quadcells
            last edited by

            @quadcells Here what I use to monitor the hotend and bed temp on a Adafruit #1426:

            ; dameon.g
            ; Adafruit #1426 8 led neopixel
            while true
             G4 P500 ; 500ms delay
             if heat.heaters[1].current > 40 ; temp
              M150 R255 P10 S4 F1 ; set second 4 red, and done
             elif heat.heaters[1].current <= 40
              M150 U255 P10 S4 F1 ; set second 4 green and done
             if heat.heaters[0].current > 40 ; temp
              M150 R255 P10 S4 F0 ; set first 4 red
             elif heat.heaters[0].current <= 40
              M150 U255 P10 S4 F0 ; set first 4 green
            
            
            Quadcellsundefined 2 Replies Last reply Reply Quote 1
            • Quadcellsundefined
              Quadcells @Stephen6309
              last edited by

              @stephen6309 thank you for the example.

              /quadcells

              1 Reply Last reply Reply Quote 0
              • Quadcellsundefined
                Quadcells @Stephen6309
                last edited by

                @stephen6309 said in Duet3 MB6HC, Neopixel changing colors as the hotend temp changes:

                @quadcells Here what I use to monitor the hotend and bed temp on a Adafruit #1426:

                ; dameon.g
                ; Adafruit #1426 8 led neopixel
                while true
                 G4 P500 ; 500ms delay
                 if heat.heaters[1].current > 40 ; temp
                  M150 R255 P10 S4 F1 ; set second 4 red, and done
                 elif heat.heaters[1].current <= 40
                  M150 U255 P10 S4 F1 ; set second 4 green and done
                 if heat.heaters[0].current > 40 ; temp
                  M150 R255 P10 S4 F0 ; set first 4 red
                 elif heat.heaters[0].current <= 40
                  M150 U255 P10 S4 F0 ; set first 4 green
                
                

                Hi, is the example you shown, is that a macro that is named "dameon.g" and do you need to call it in the config.g or is it automatically called up by the firmware as stated here: https://duet3d.dozuki.com/Wiki/Macros

                "daemon.g
                From RRF3.1.0 and later the file /sys/daemon.g can be used to execute regular tasks. The firmware looks for the file, if the file exists it executes it and once the end of file is reached it waits. If the file is not found it waits and then looks for it again. In RRF 3.3 The wait time was increased form 1 second to 10 seconds. If you want a shorter update time then put a while loop inside the deamon.g with G4 S1 in it for 1 second repeats."

                /quadcells

                oliofundefined 1 Reply Last reply Reply Quote 0
                • oliofundefined
                  oliof @Quadcells
                  last edited by

                  @quadcells daemon.g is automatically called every 10 seconds when it exists.

                  <>RatRig V-Minion Fly Super5Pro RRF<> V-Core 3.1 IDEX k*****r <> RatRig V-Minion SKR 2 Marlin<>

                  Quadcellsundefined 1 Reply Last reply Reply Quote 0
                  • Quadcellsundefined
                    Quadcells @oliof
                    last edited by

                    @oliof thank you. can you have more than one like this "dameon.g & dameon1.g"

                    /quadcells

                    oliofundefined 1 Reply Last reply Reply Quote 0
                    • oliofundefined
                      oliof @Quadcells
                      last edited by

                      @quadcells no, but you can call other macros from daemon.g

                      <>RatRig V-Minion Fly Super5Pro RRF<> V-Core 3.1 IDEX k*****r <> RatRig V-Minion SKR 2 Marlin<>

                      Quadcellsundefined 1 Reply Last reply Reply Quote 0
                      • Quadcellsundefined
                        Quadcells @oliof
                        last edited by

                        @oliof thanks, that will work.

                        /quadcells

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