|
Re: Understanding the Autonomous.vi
I'd definitely suggest erasing what they have and using it as a refrence to how to wire things. The way to do it is to write what exactly you want each motor to do when each combination of light sensors are pressed. From there, it's quite easy to wire up a few case structures to make it happen.
Note: Instead of stacking a bunch of case structures for all the different sensor values, it's much easier to put all the outputs of the digital IO into a build array function. Then put a boolean array to number on that, and wire the number into a single case structure. Then use binary to decimal conversion to figure out which number means which set of sensors -- for example, if the number is a 6, the second and third sensors are pressed (second and third in the array, that is).
However, if you want to use the default, that's fine, but I find that they added a bunch of really confusing things to it, like having options to follow either the left or right lines (who cares?)
|