pwm.setup(pin,1000,1024)
This is very good for changing duty cycle if you stay below 1000Hz, but I would like go go higher in frequency. Maybe as high as 4KHz. I do not need 10 bits for duty cycle. 8 is more that I need.
Is it possible to make a "private" version that got pwm.setup(pin,4000,256) as max?
What fiels do I need to change? I am new to NodeMCU. I use Windows 8.1
Regards
Svein Utne
svein_utne@hotmail.com
Coroutine is a nice feature but given my reading of the PiLv3 section on this, the event driven nature of the nodeMCU implementation (e.g. all event routines are lua_called from the firmware, and you've got to return control to avoid PANICs) means that coroutining isn't usable except in silly / trite examples. So why not consider a build option to drop this library as well?
I'll test this out and report back.
TerryE wrote:Coroutine is a nice feature but given my reading of the PiLv3 section on this, the event driven nature of the nodeMCU implementation (e.g. all event routines are lua_called from the firmware, and you've got to return control to avoid PANICs) means that coroutining isn't usable except in silly / trite examples.
That remembered me on something I wanted to discuss:
Why not "lua_pcall" more stuff so that at least we can provide a better error message possibly including debug
stacktrace before panicing (is that a word?).
I did that in the net area and it helped me.
I couldn't make my mind if there is a case for not panicing.
Cal