• Steve Rayner posted an update 5 years, 4 months ago

    The hardware map indicates we use Arduino pins 22, 24, 27, 28 & 29. However these do not appear to me PWM pins on the Arduino Mega. How does this work?

    • Hello Steve,

      There is a difference between PMW which is used to control a dc motor speed (H-bridge), or a PWM used for servo’s.

      The PWM for controlling the speed for a dc motor, or intensity for a LED, is at some pins hardware-based (internal circuit/timer, to sending a PWM with a fixt frequency in the background.)
      These pins are the pins where you are talking about 🙂

      For servo’s, we can use any output pins (not all pins can be configured as a output)
      See here for more info:
      https://github.com/arduino-libraries/Servo/blob/master/src/Servo.h#L26

      Regards,
      Marten

    • Thanks Marten. I’ve been using Arduino for a few years and I didn’t know that.