You are reading a single comment by @user52526 and its replies.
Click here to read the full conversation.
-
I just found this page
http://www.espruino.com/Waveform
which says espruino can only go up to .5KHtz with analogWrite()
I just found this page
http://www.espruino.com/Waveform
which says espruino can only go up to .5KHtz with analogWrite()
I'm not 100% sure on the highest frequency, but I believe it is over 1MHz.
My guess is that based on Espruino's execution speed, your code might struggle to run at 1KHz.
You can definitely do a bit better with software if you need to (using
setInterval
anddigitalPulse
) but for things like PWM using the hardware wherever possible is preferable.