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
SireSirol
SireSirolOP3mo ago
Someone, please help anybody??
AnonEngineering
AnonEngineering3mo ago
you are trying to drive the left and right motors at different speeds?
SireSirol
SireSirolOP3mo ago
yes with channel 1 from my ct6b tx, and ch 2 will have equal speeds (i.e forward and backward)
AnonEngineering
AnonEngineering3mo ago
so out of your receiver you get a servo signal?
SireSirol
SireSirolOP3mo ago
yes, I tried to modify the code but the motors behave abnormally the tx is programmable so I was able to customise the thing
AnonEngineering
AnonEngineering3mo ago
you can get an Arduino to read a servo signal using pulseIn, with that data you can drive your motors appropriately
SireSirol
SireSirolOP3mo ago
well 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?
AnonEngineering
AnonEngineering3mo ago
as I see it you'd use the pulse width to generate a PWM signal for your L298's
SireSirol
SireSirolOP3mo ago
yes
SireSirol
SireSirolOP3mo ago
AnonEngineering
AnonEngineering3mo ago
so left side 40% duty cycle, right side 60% duty cycle, the robot goes left a bit
SireSirol
SireSirolOP3mo ago
as u can see here, with one motor its working perfectly
AnonEngineering
AnonEngineering3mo ago
good, so the inverse of that signal goes to the other motor analogWrite(LEFT_MOTOR_PIN, value); analogWrite(RIGHT_MOTOR_PIN, 255 - value);
SireSirol
SireSirolOP3mo ago
ohhh I will try it tomorrow, ty

Did you find this page helpful?