You are reading a single comment by @Gordon and its replies. Click here to read the full conversation.
  • Just to add - yes, analogWrite uses the hardware by default, and the CPU isn't involved at all. Having said that, it uses the high speed oscillator, so it'll still end up using a bit of power (even if the CPU is totally free to do something else).

    You can use {soft:true} to force software PWM though - it's occasionally useful if you want more PWM pins (for example on the LEDs), or if you can't get the combination of PWM frequencies you want.


Avatar for Gordon @Gordon started