-
Notifications
You must be signed in to change notification settings - Fork 6
Add ESP32 hardware fading and vtask based blink #7
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
base: master
Are you sure you want to change the base?
Conversation
|
hi Mark thanks for contributing. a number of comments:
|
|
This PR breaks ESP8266 builds, unless some platform conditional compilation is implemented. |
|
Hi guys, I've been fixing some watchdog issues. ...incidentally, what do you do for local development so you don't need to update a github repo and then reference that repo in your mos.yml? That's why there are the 'another brick' commits.. I've added on/off delays per Rojer's request. I'll give some thought to ESP32 implementation. I can split mgos_pwm_rgb_blink_* in the respective implementation files. I don't have a 8266 to test on, but will give it a go. |
|
Ignore my PWM github repo question, that was pretty stupid. I thought the libs/xxx folders were getting overwritten, but I can simply edit there as it won't be overwritten (unless I change the library location..) |
|
Interesting date changes. Tried squashing commits. Key thing is this library has some worthwhile new features for hardware led fading, led blinking via exec process, common anode/cathode flag, etc. |
|
Also latest commit fixes the IDF change to the ledc_fade_func_uninstall() function, they removed the argument. |
Been working on a statuslight library to emulate how Particle do their status light with a glowing/fading light when the device is happy.
The pull request contains the code required to get it to smoothly work using the hardware functions on ESP32.
It has a goodie bag of mgos_pwm_fade_direction flags.
One key thing with ESP32 is knowing what pwm channels a pin was assigned. And for some reason I seemed to only be able to listen to the events in user code land. Anyways, have added MGOS_PWM_CHANNEL as an event.
Some user code for initialisation
Some examples on how to change the LED:
Let me know any questions, and if you are interested in the concept of a statuslight library for MOS.