|Bluetooth motor stutter
|Page 1 of 1|
|Author:||Etparty [ Wed Jan 28, 2015 12:32 pm ]|
|Post subject:||Bluetooth motor stutter|
In RobotC 3.0, ive been building a remote out of one brick that sends instructions to another brick via bluetooth. The problem ive been having is that the motors movement is choppy/stuttering. This shows with all directions of movement except for the movement right before the "Else" statement. I cant seem to find any way to stop the stuttering. Any help would be appreciated.
|Author:||JohnWatson [ Wed Jan 28, 2015 12:44 pm ]|
|Post subject:||Re: Bluetooth motor stutter|
Looking at the receiver code specifically:
Let's assume the variable 'forward' receives a value of 12. The if statement will return true, and the motors will turn on for 100 ms (0.1 second). Next, the program checks to see if the variable forward contains a value of 13. It doesn't, so the 'else' statement runs and turn the motors off.
This happens for every iteration of the value in forward *except* 13. To resolve this, try putting everything in one if/else if/else block:
|Page 1 of 1||All times are UTC - 5 hours [ DST ]|
|Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group