Skip to content

PWMMotorControl

  • Software
  • Microcontrollers and firmware tools
  • Library

An Arduino library for controlling brushed DC motors via PWM, with optional encoder support for driving fixed distances and control of two-motor robot cars.

Source on GitHub: github.com/ArminJo/PWMMotorControl (opens in a new tab). Facts read at commit ea02606 (opens in a new tab).

Licenses

Code
GPL-3.0-only (opens in a new tab)

Read by Robotheca from LICENSE.txt (opens in a new tab) (GPL-3.0-only) at commit ea02606 (opens in a new tab), on 22 Oct 2026.

Commercial use
Yes

Copyleft: Modified source must be published.

What it does

  • Drives brushed DC motors through PWM using common full-bridge driver ICs such as the L298 and TB6612.
  • Optional encoder and photo-interrupter support enables driving a specified distance.
  • Controls two motors at once for robot cars, including turning and rotation by degrees.
  • Per-motor speed compensation values can offset differences between motor characteristics.
  • Supports mecanum four-wheel car movements with extended directions.
  • Includes example sketches such as line following, IR remote control and obstacle avoidance.

Written by Robotheca from the project's README (opens in a new tab) at commit ea02606.

Getting started

Difficulty
Beginner
Hardware it needs, as the project states it
Arduino-compatible board with brushed DC motors and a full-bridge driver such as L298 or TB6612 (or an Adafruit Motor Shield V2); optional encoder discs with slot-type photo interrupters and an MPU6050 IMU, plus TCRT 5000 or IR/ultrasonic sensors for the examples.

Maintenance

Status
Active: a commit in the last 90 days
Newest commit
16 Oct 2026 on master
Latest release
Improved mecanum car support (8 Oct 2026)

Checked on GitHub on 22 Oct 2026.

Robots that can run it

No robot on Robotheca is linked to it yet. Links come from a robot's robot.yaml, from its dependency files read as text, or from Robotheca's editors.

Robotheca lists software as a reference: nothing is hosted or run here, and every fact links to where it was read.