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

How do you actually control NEOPixels?

Scheduled Pinned Locked Moved
Using Duet Controllers
2
4
348
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
    Stephen6309
    last edited by Stephen6309 21 Feb 2021, 16:25

    M150 B155 P128 S10 F0 X1 lights them all up

    M150 U155 P128 S1 F0 does set first one green on intial startup, then
    M150 R155 P128 S3 F1 -- don't work after the first, but if i change F1 to F0, three light up red.

    But it stops changing with F1 after the first time.
    I want to have 4 each show red when the bed and hotend are ho.

    How do you access the heater temps?
    heat.heaters.0.current isn't valid.

    Object module doesn't show how to use it.

    undefined 1 Reply Last reply 22 Feb 2021, 13:41 Reply Quote 0
    • undefined
      dc42 administrators @Stephen6309
      last edited by 22 Feb 2021, 13:41

      @Stephen6309 said in How do you actually control NEOPixels?:

      M150 B155 P128 S10 F0 X1 lights them all up

      M150 U155 P128 S1 F0 does set first one green on intial startup, then
      M150 R155 P128 S3 F1 -- don't work after the first, but if i change F1 to F0, three light up red.

      But it stops changing with F1 after the first time.

      With NeoPixels it's necessary to program the entire strip in one go. So when you use F1, RRF buffers the data until you send a command witn F0.

      How do you access the heater temps?
      heat.heaters.0.current isn't valid.

      heat.heaters[0].current

      Duet WiFi hardware designer and firmware engineer
      Please do not ask me for Duet support via PM or email, use the forum
      http://www.escher3d.com, https://miscsolutions.wordpress.com

      undefined 1 Reply Last reply 22 Feb 2021, 20:40 Reply Quote 0
      • undefined
        Stephen6309 @dc42
        last edited by 22 Feb 2021, 20:40

        @dc42 I knew it would be something simple. 🤔

        1 Reply Last reply Reply Quote 0
        • undefined
          Stephen6309
          last edited by Stephen6309 28 Feb 2021, 17:02

          This finally works. 🙂
          Lights up 4 red leds when above 40C, green <=40
          Bed and T0 heater are set to 4 leds each.

          Make sure each if and elif M150 conmmend has a beginning space

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

          This is in my config.g to make sure the NEOPixels are off

          M150 R0 U0 B0 P5 S8 F0 ; shut off neopixel
          1 Reply Last reply Reply Quote 3
          1 out of 4
          • First post
            1/4
            Last post
          Unless otherwise noted, all forum content is licensed under CC-BY-SA