Page 439 - ARM Based Microcontroller Projects Using MBED
P. 439
17.14 PROJECT 3—BRUSHED DC MOTOR SPEED CONTROL USING A POTENTIOMETER 425
where 0 corresponds to 0V and 1.0 corresponds to the ADC reference voltage of +3.3V. Variable
pot is multiplied with 100 to convert it into Duty Cycle between 0% and 100%. This value is then
used to control the speed of the motor such that as the potentiometer arm is rotated the motor
speed changes from 0% to 100%. Make sure that you compile for the Nucleo-L476RG
development board.
FIG. 17.20 Program listing.
(Continued)

