pimoroni / enviro

MIT License
101 stars 79 forks source link

enviro grow - How to disable led when it wakes up from rtc or gets power? #177

Closed notsource closed 1 year ago

notsource commented 1 year ago

Hi, the white led is turning on for a sec or two when the device gets power or wakes up from rtc. Is it possible to disable the led when it wakes of from RTC? And even if not can someone explain please. I came to the conlusion this is build in the hardware itself?

I'm running v0.0.2

Thank you in adance

sjefferson99 commented 1 year ago

I recommend you install at least v0.0.9 as there was much done since v0.0.2 that makes a lot of things work correctly. Ideally you would then copy down the files from the main branch and overwrite using Thonny as I believe there are more useful additions not yet captured in a release.

The pulsing white light is designed to show the board is working, but it is defined in software, specifically the function to generate it is in enviro/init.py and it is called on startup in the same file.

If you are using the latest code from the main branch it's on line 495 ("pulse_activity_led(0.5)") and I suspect you could simply comment that line out to stop the white light showing. The red warning light would still show, but that should be exceptional and is worth retaining unless you're after a stealth weather station.

You could perhaps put a new option in the config file using the template and defaults files along the lines of disable_white_led = True and then wrap line 495 in an appropriate if statement to make that more accessible.

notsource commented 1 year ago

hi jeff, thank you for your reply. I've tried 0.0.9 and the wifi is very unstable and the light goes on 1sec when it turns on. I already managed to turn everything off, except the start up light.

update got a step further in building the uf2 image with help of git by creating a fork of pimoroni pimoroni pico repo and enable the workflows from the origin. After a commit you can find the artifacts in in the micropython workflow when you selected a workflow run. Now I'm to change anything I want.

cheers

notsource commented 1 year ago

This Issue can be closed. I used some plado like gum to isolate the light. Can easily be removed if I want to check the status. Went back to 0.0.2 firmware and the wifi is stable again.