|
Re: Reading Driver Station Input to select Autonomous Routine
Sorry, I haven't conveyed exactly whats going on as well as I should. That code generates seq=0 when in autonomous. So that would imply to me that all of the switches read 1 during auto making the comment in the code incorrect. (thanks for the code tag idea too, I'll try to go back and edit that)
When I get time with the robot again, I'll look over the wiring and do some experiments to re-test the assumptions we're making. If I recall correctly the switch is wired to simply connect the digital inputs to ground so we're assuming there are pullup resistors on the DS board. That would be consistent with reading all 1's and also consistent with the way the code is inverting each bit before adding everything up.
Thanks very much for your brain cycles! It was a pleasure working with 365 a couple of years ago in Atlanta! You guys have a terrific team.
We do use the line sensor and encoders to know when to move to the next state. Thanks for the compliments. My son (8th grade) wrote most of the code for the robot. He's really picking up programming; he's already published an indie xbox 360 game too (its named "Phat Fly" if you want to look it up).
|