You are reading a single comment by @user52526 and its replies. Click here to read the full conversation.
  • 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 and digitalPulse) but for things like PWM using the hardware wherever possible is preferable.

  • The reason why I'm not using setInterval is because it would work for LED's but when I tried using it with a toy motor, it would turn on but not off... setTimeout works for the motor and LED's so I've just been using that

    In case it's not obvious, lol, I'm super new and just learning as I go.

About

Avatar for user52526 @user52526 started