My team is attempting to use the Potentiometer to control how high our reverse double fourbar goes. When programing, using the sample code from Vex Wiki, i keep getting red x’s telling me the constant cant be defined and “arm potentiometer” is assumed as short. I have attatched a screenshot of the program with error messages. Also i have included where we took it from. If you could help us that would be wonderful. Thanks.
hp_pot.pdf (717 KB)
Did you set up your pot using the Motors and Sensors Set up tab? The name you give your pot should show up somewhere in the pragma statements at the top of your program.
As for the BIfiautonomous code… I’ve never seen that before. Maybe it’s something left over from the older Cortexes. What happens if you just comment it out (leave it out of the program)?
The error you are getting on line 67 is because you are calling to a sensor that doesn’t exist, because that name isn’t exactly as it is setup in the pragmas at the top. That PDF gives you instructions on how to set it up.
I’m not really sure what the code on line 62 does, perhaps it’s from an older version of RobotC. I would get rid of it, as there doesn’t seem to be a purpose for it.
Thank you both for the help. I wi make sure everything is set up right and delete the unnecessary code. If anyone else has any suggestions please let me know. Thanks.