Hi guys.I wrote the code with for command for both the dc motors, Because I do not know how to use the pwm on the arduino. Please write this code for me with pwm.
test.ino (1.79 KB)
Hi guys.I wrote the code with for command for both the dc motors, Because I do not know how to use the pwm on the arduino. Please write this code for me with pwm.
test.ino (1.79 KB)
Hi,
The command you're looking for is analogWrite(pin, value) (link to reference page). That outputs a PWM signal with a defined duty cycle to the specified pin.
How you utilise it in your code will depend on the motor controller you're driving your motor(s) with.
Cheers ! Geoff
Thanks a lot.