Motors continue to run without touching the controller


#1

Hello,

We’ve been having this problem for a while now and can’t figure out why our bot keeps running even though we aren’t using the controller. It’s the same two motors that keep running when the controller is not even moving. We even changed the batteries multi times. There are two options that I thought of was one our motors or two the code.

Code: https://hastebin.com/ewuwivaves.cpp

Thanks for your time,
1049D


#2

Which two motors ? If it’s the drive motors then add a dead band to the joystick control (which means if the joystick value is below a certain value, perhaps +/- 15, then send 0 to the motors).