-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Traffic Light Ws2812b LED #21
Comments
Hey, thanks for your input. Your idea is for sure interesting, and not to difficult to implement from a SW point of view. May be for HW is a bit more difficult: adding a Neopixel is going to complicate the DIY build. |
the hardware side should be less of a problem, 5v, gnd and one gpio. Single LED are now quite easy and cheap to get, I've tinkered with them a bit, but the system freezes when I try to control the led, but I'm a complete beginner when it comes to programming and not skilled enough to debug it Great project |
I think I can add something by using the on-board LED of the standard Pico board: SOLID GREEN = All OK (which is ON by default at starup) |
I tinkered a bit and found a quick and dirty solution based on NeoPixelConnect. https://github.com/MrYsLab/NeoPixelConnect My code is totally experimental and not professional, I don't know if it affects other functions. according to my tests everything seems to work so far. I have used a single WS2812B. In order not to contaminate the whole code, I only modified the printout(), which is not so nice, but quick and dirty. Initialization
modified printout()
|
Thanks for your proposal. I think your code is good, but it can be simpler in our case. It should work fine (I didn't tried it), but instead of using strings function to check the printout buffer it should be enough to check the booleans used to report anomalies:
Also, the logic you are using is a bit strange: you are setting yellow for I'm not sure I'm going to add this to the main branch, since I'd like to keep the HW build as simple as possible (and as I said I'll add something with the on-board led), but if you are going to work on it and create PCB and other things, I can create a dedicated branch for it, if you wish. |
thank you very much, i am new to coding, i belong more to the 3d printing and soldering section. i'll keep tinkering with the idea for myself, it's a good opportunity to learn. if it ever works exactly the way i want it to, i will let you know and of course make it available to everyone. Thank you very much for your help and suggestions. |
Thanks to you!! |
I have taken the liberty to customize the code a bit to suit my needs, I made all display output quickly configurable with json as I see the use of other languages in my environment. On top of that I have built a traffic light system. Blue=something is plugged in , Green= all fine , Orange=caution, Red=bad things happen All changes are documented in the code and can be found via TryBreakFixAgain and tbfa_. I use ArduinoJson 7.0.4 from Benoit Blanchon Of course I make the idea and my changes available for adoption into the main code and for general use. |
Thanks a lot for sharing your work! As I anticipated, I'd like to keep the build as simple as possible, so I'm happy to keep your mods here if someone wants to use them, but I'd like just to make a super simple mods on the main code to use the on-board led. Thanks again for sharing this! |
Would it be possible to integrate a single Neopixel or Ws2812b control to make it easier to read for older or less tech. people?
I am thinking of:
Off = nothing connected
Blue = Something connected
Green = everything ok
Yellow = Attention
Red = something bad found
The text was updated successfully, but these errors were encountered: