Closed tolauwae closed 1 year ago
Out of curiosity is the analogWrite a newly supported function for the ESP32?
I thought so. I'll double check.
If not, that does pose a conundrum. Do all the Arduino primitives need to be supported for the ESP? Ideally, I'd say yes, but the counter argument is that real Arduino devices may want to use this primitives.
That is an annoying decision we will continue to encounter as long as we haven't added a modular system. Don't know on what criteria to decided in those cases.
@tolauwae I think the analogWrite
is indeed new because the reason why I wrote the now-called chip_ledc_set_duty
is also because back in the time I could not compile the VM when using analogWrite
on the ESP32.
That is an annoying decision we will continue to encounter as long as we haven't added a modular system. Don't know on what criteria to decided in those cases.
Agree so maybe for the time being we should ignore this issue since this will naturally resolve when switching to a modular system.
But compilation works this time around. All CI checks are green.
I'll double check if it works for the fade example tomorrow.
@carllocos the primitive works fine on ESP32. I actually used it in code for the MobiSys demo.
Add the
analog_write
primitive.