I'm a veteran computer teacher, but a newbie to robotics and RobotC. We are trying to program our Cortex controllers using the code in the sample programs and in the Robot C curriculum for the squarebot 2.0 and 3.0.

We are able to program autonomously without issues (we came from Parallax Basic Stamps so coding in RobotC is a simple translation).

We are able to program in "Radio Control" mode using the Vexnet controllers by just plugging in the VexNet keys and going.

The problem is that we cannot get in or out of autonomous mode in the same program. bIfiAutonomousMode is mentioned in the curriculum. I think it's an error and we are supposed to use bVexAutonomousMode (which is indicated in the sample programs). But NEITHER works at all when we try to compile a program. We get a "Can't assign to read only const variable" if we try to switch modes.

What's up with this? If the variable is hard switched based on whether the VexNet keys are plugged in, how do we get out of that mode?

Thanks...hope this is a simple question and I just missed something somewhere...

Gary

Tue Mar 01, 2011 12:35 pm

jbflot

Site Admin

Joined: Tue May 15, 2007 9:02 amPosts: 409

Re: Cortex/VexNet Autonomous Mode Switching --- Newbie question

Hi Gary,

the bIfiAutonomousMode and bVexAutonomousMode variables are only needed for the older VEX PIC platform, not the VEX Cortex. When you want the robot to perform an autonomous operation in a program, just include autonomous code; when you want it to perform remote control operations, include remote control code. If your robot is synced over VEXnet, there's no extra hurdles to switch from one mode to another.

Who is online

Users browsing this forum: No registered users and 1 guest

You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum