Yeah, put your autonomous code in the user control part of your code, and connect to the robot like you usually would. The joystick doesn’t have to be used, it just has to connect to the robot
If you are using ROBOTC, then you should be able to add the “Competition Control” window to your Debug Windows. Check out this PDF to see how to do that, as well as how to use it: http://www.robotc.net/support/cortex/testing.pdf
Ohh, sorry about that! I completely missed that part of your post. :o In that case it does sound like the method Hason explained is the only way you could test your Autonomous code.
For testing purposes, you could use the controller to “switch modes.” In the user part of the code, you have your normal driver code. Then under that, you have an if command that runs your autonomous using a controller button. Like this (pseudocode):
This way, pressing Button 5 runs your autonomous program, and then the robot will immediately switch back into driver mode. This makes it much easier to test multiple times, since you can just drive back to your start position and run again.