Differential Steering
Guys, this is the code I found on the internet. Can I create a differential steering system with this? I am using a fs-ct6b TX
14 Replies
Someone, please help
anybody??
you are trying to drive the left and right motors at different speeds?
yes with channel 1 from my ct6b tx,
and ch 2 will have equal speeds (i.e forward and backward)
so out of your receiver you get a servo signal?
yes, I tried to modify the code but the motors behave abnormally
the tx is programmable so I was able to customise the thing
you can get an Arduino to read a servo signal using
pulseIn
, with that data you can drive your motors appropriatelywell I am using an Arduino uno, with a LN298 motor driver, also in the serial plotter I can see the signals. can it be a hardware issue like the motors?
as I see it you'd use the pulse width to generate a PWM signal for your L298's
yes
so left side 40% duty cycle, right side 60% duty cycle, the robot goes left a bit
as u can see here, with one motor its working perfectly
good, so the inverse of that signal goes to the other motor
analogWrite(LEFT_MOTOR_PIN, value);
analogWrite(RIGHT_MOTOR_PIN, 255 - value);
ohhh
I will try it tomorrow, ty