|
Re: Motor/Speed control
There are other threads on this, but let me give an overview.
One common approach is to have little Motor Sets all over the code inside various switch blocks testing buttons. If you are careful this will work, but often, the logic isn't quite right and the code doesn't do what you want. Basically, last update wins, and sometimes it isn't clear how the motor got to the speed it is running at.
Another approach is to do the logic and whatnot, but all the code does is to output numbers. LV will help remind you to produce numbers in all cases. Then, in only one location on your teleop diagram, you update that motor. This makes it much easier to trace the logic and debug.
Greg McKaskle
|