Map serial commands to PWM levels and LED indicators while maintaining a fail-safe off command.
Read Hardware safety before wiring a motor.
| Signal | Uno pin |
|---|---|
| Low / medium / high LEDs | 3 / 5 / 6 |
| Driver PWM or enable | 10 |
| Driver direction input | 11 |
The exact motor, supply, driver outputs, and flyback protection depend on the driver datasheet. Pins 10 and 11 connect only to logic inputs.
A = off, B = on at PWM 120, C = low at 170, D = medium at 200, and
1 = high at 255. Unknown input also stops the motor.
Test first with the motor supply disconnected and measure the PWM/logic response.
Then secure the motor, connect its rated supply, and start with A. Record driver
temperature and supply behavior; stop immediately if either is abnormal.
Replace the fixed levels with a table containing command, PWM, LED mask, and label, while preserving the off-on-unknown behavior.