24A, 24B, and 24C Super Sonic Sparks Robot Revealing

Good luck at worlds 24 teams! Was a lot of fun playing against you guys. Unfortunately, 1575 teams just had crappy luck with parts this year else, we would be going too. I do have a question though, how did you integrate the potentiometer to select your autonomous? We tried using and IF Else nestled statement, but for some reason analog values are never read inside the statement. How did you guys do it?

I’m not on 24, but I used a pot to select autonomous as well. I simply used If/Else statements, like so:
pseudo-code


if(pot > 3500)
{
  //auton 1
}
else if(pot > 3000)
{
 //auton 2
}
... etc.

I’m pretty sure I could have used a select-case instead, but I didn’t want to spend the time figuring out how they’re written in C…

Yep, that’s pretty much exactly what our code looks like.

~Jordan