Clueless for Auto

Okay, not totally clueless. We have switch auto that hits 100% of the time (yay, go us for the first time ever).

My Problem:
I’m trying to get a scale auto going. Especially if we’re partnered with someone who can hit the switch. I have the code working as it should to be able to score, but I can’t get it to read the right game data. No matter what I put in there, it always goes to the side of the scale that our robot is on. I guess I just need to know what value to use when reading from Game Data.

This was the very basic code I used from FIRST to get our auto working. Would I just have to change the value of the 1 to a 2 to read the 2nd value? Because I kept trying that and it just loops back to the same code no matter what. I can post screenshots of our code tomorrow.

Never mind! I found 358’s programming book online and see EXACTLY where I went wrong.

Posting for anyone else that needs

For anyone else that reads, the 1 is the length rather than the element. If you change that to 2, you get the first two characters.

Instead, you need to wire a 1 into the unwired input. That will grab letters starting at the 2nd letter with a length of 1 (zero-indexed). Then, you’ll have the letter for the scale and it should take you to the L/R appropriately.