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

    M150 with NeoPixels

    Scheduled Pinned Locked Moved
    Documentation
    3
    6
    356
    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.
    • DonStaufferundefined
      DonStauffer
      last edited by DonStauffer

      This statement, coupled with some wrong information out on the internet which uses the word "scroll" incorrectly, creates a confusing situation. It took me about a day to sort it out:

      "The specified RGB values will be sent to the number of LEDs in the LED strip as specified by the S parameter, pushing the existing colours along the strip. To set all the LEDs the same colour, make the S parameter equal to or a little longer than the number of LEDs in the strip."

      Strictly speaking, it is not correct that anything "pushes existing colors along the strip". That doesn't happen, ever.

      What happens is: After an M150 F0 command, the M150 commands append to one another, in order, not changing what's displayed, until another M150 F0 is reached. Then the whole string of appended new LED values (including the ones in the new M150 F0) get displayed, starting at the beginning of the strip. Only as many LEDs as those statements specified get changed, leaving any LEDs further along the strip with their prior values.

      There is no "scrolling" or "pushing existing colors along". The new values simply "overwrite" existing ones, from the beginning of the strip, and only as far as they "need" to, and it doesn't happen visibly until the M150 F0.

      A chaser, first lighting LEDs in a line, then darkening them in the same direction, would look like this (tested on 10 LED NeoPixel stick):

      M150 P0 S10 F0 E0	;	Turn entire strip off
      
      while iterations < 10
      	M150 R255 U0 B0 P32 S{iterations+1} F0 E0
      	G4 P20
      
      while iterations < 9
      	M150 R0 U0 B0 P0 S{iterations + 1} F1 E0
      	M150 R255 U0 B0 P32 S{9 - iterations} F0 E0
      	G4 P20
      
      M150 R0 U0 B0 P0 S10 F0 E0	;	Turn entire strip off
      
      

      433262322_7201834966538170_4235366852098968886_n.mp4

      T3P3Tonyundefined droftartsundefined 2 Replies Last reply Reply Quote 2
      • T3P3Tonyundefined
        T3P3Tony administrators @DonStauffer
        last edited by

        @DonStauffer thanks for reporting this. I am sure @droftarts will pick it up when he can.

        www.duet3d.com

        1 Reply Last reply Reply Quote 0
        • droftartsundefined
          droftarts administrators @DonStauffer
          last edited by

          @DonStauffer Thanks. I've updated the M150 Gcode entry, including a 'Usage' section, to make it clear how the M150 command works. I also updated the Notes to clarify which pins can be used, and their capabilities. https://docs.duet3d.com/en/User_manual/Reference/Gcodes#m150-set-led-colours

          Ian

          Bed-slinger - Mini5+ WiFi/1LC | RRP Fisher v1 - D2 WiFi | Polargraph - D2 WiFi | TronXY X5S - 6HC/Roto | CNC router - 6HC | Tractus3D T1250 - D2 Eth

          DonStaufferundefined 1 Reply Last reply Reply Quote 0
          • DonStaufferundefined
            DonStauffer @droftarts
            last edited by DonStauffer

            @droftarts I'll let you know if this NeoPixel driver works. I think there's a good chance, since it seems like exactly what it's made for. If it does work, I'd recommend a brief mention of it in the docs since it will be a much better solution that just a TTL buffer, and actually cheaper.

            DonStaufferundefined 1 Reply Last reply Reply Quote 0
            • DonStaufferundefined
              DonStauffer @DonStauffer
              last edited by

              @DonStauffer I'd like to report a successful proof of concept.

              I've set up the NeoDriver and used M260 to communicate with it, and set up daemon.g and some supporting macros. My G29 command now successively lights 10 LEDs, effectively graphing progress of the bed probing.

              After I do a small amount of fine-tuning, I'm going to set it up for heating processes, and the overall print job.

              T3P3Tonyundefined 1 Reply Last reply Reply Quote 1
              • T3P3Tonyundefined
                T3P3Tony administrators @DonStauffer
                last edited by

                @DonStauffer Thanks for that!

                @droftarts ping for documentation update.

                www.duet3d.com

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