Skip to content
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

Output connect status on RGB LED #37

Open
viper4gh opened this issue Feb 1, 2023 · 3 comments
Open

Output connect status on RGB LED #37

viper4gh opened this issue Feb 1, 2023 · 3 comments

Comments

@viper4gh
Copy link

viper4gh commented Feb 1, 2023

I have a M5Stack Atom Lite, which has an addressable RGB LED (SK6812) built in.
Because of that I added some code based on the FastLED Library, which shows some connection states on it.
I added the complete code conditionally, that means as long as USE_FASTLED is set to false in the config.h you don't need the FastLED library in the lib dependencies.
The logic behind: On startup of the device you see then the colors for successful connection of WiFi, MQTT, Bluetooth and sending data to the MQTT server.
The color codes and the GPIO PIN are defined in the config.h.
Further if all is working and one of these colors will be active again, it shows a connection problem with the connection which is assigned to the color.
If it is ok I could open a Pull Request.

@matthewhadley
Copy link

As someone also using M5Stack Atom Lites for this purpose, I'd be interested to see the PR

@viper4gh
Copy link
Author

@matthewhadley
As long as the PR is not requested, you can use my Fork.
My fork is in sync with the main repository and only the LED feature is additionally.
Simply enable the FastLED lib dependency in the platformio.ini, set USE_FASTLED to true in config.h and maybe change the BLUETTI_TYPE in config.h.

@matthewhadley
Copy link

Thanks @viper4gh, I will check it out.

I have my own fork with some additions:

  • define device name using a build flag
  • separate MQTT topics for device status vs a json string

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants