cp2004 / OctoPrint-WS281x_LED_Status

Add some RGB LEDs to your printer for a quick status update!
https://plugins.octoprint.org/plugins/ws281x_led_status
GNU Affero General Public License v3.0
112 stars 27 forks source link

Motion sensor with WS281x Plugin? #55

Closed dtdor closed 4 years ago

dtdor commented 4 years ago

Currently I've been controlling my 2812 LEDs with an arduino on my printer. The lights and arduino are powered by the same 5v power supply that I used to recently set up octoprint (supplies up to 10 amps). I have a PIR motion detector connected to the arduino to turn on the lights when I walk into the kitchen at night and it works well but it's pretty basic. I think this plugin sounds awesome and clearly adds a lot more function to the LEDs but I also don't want to lose the motion detector. Is there a reasonably simple way I can use both? I'm pretty bad with coding except for arduino (where I'm basic but functional).

Thanks!

cp2004 commented 4 years ago

This is a good idea, makes quite a lot of sense. Motion detection is not a feature I would want to implement myself into the core of the plugin, since it makes it quite complicated where it could be easily solved externally. Some possible solutions for you:

I think external is the way to go with this, I did have a request to use a GPIO button for on/off, but don't want to put it into the plugin myself. Maybe I will think about a more stable way of external scripts interfacing, to cover whatever people may want to add themselves.

dtdor commented 4 years ago

That’s a great idea, thanks. I think I will wire in the mosfet. I would be interested in a feature that adds this into the plug-in so that the lights can be animated somewhat to turn on gradually (2-3 seconds) to help nighttime eyes adjust a tad. But maybe I can do that in the arduino code with the mosfet by gradually increasing voltage from the forward voltage up to 5v to get a smoother “on.”

I’ll let you know how it goes.

Thanks!

cp2004 commented 4 years ago

I would be interested in a feature that adds this into the plug-in so that the lights can be animated somewhat to turn on gradually

Interesting... I could agree, this would be cool. Will put it on the list for next release 🙂

cp2004 commented 4 years ago

Somehow forgot to close this issue, since you got it worked out. Will implement fading in and out at some point, but since its not related to this issue I can close.

dtdor commented 4 years ago

Sounds good.

On Sun, Nov 29, 2020 at 2:37 PM Charlie Powell notifications@github.com wrote:

Somehow forgot to close this issue, since you got it worked out. Will implement fading in and out at some point, but since its not related to this issue I can close.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/cp2004/OctoPrint-WS281x_LED_Status/issues/55#issuecomment-735461468, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKWGJPZXT3HZRBHCVQI4GD3SSK5JNANCNFSM4TRRE4YA .