Programming‎ > ‎RobotC‎ > ‎

Built in Variables

  • bIfiAutonomousMode - boolean - Boolean variable to indicate whether robot is currently in autonomous or competition mode. In autonomous mode, the robot can be freely "controlled" by software whether or not the robot's RF channel to base transmitter (VEX) is operational.In competition mode, the robot software is configured for a two phase robot competition: an initial autonomous operation phase where joystick values are masked followed by a 'user control' phase where the robot is controlled by the base station joysticks.
  • bIfiAutonomousPhase - boolean - Boolean variable that indicates during a robot competition whether robot is in the 'autonomous' or 'user controlled' phase. This variable is only valid when the variable 'bIfiAutonomousMode' is 'false'.
  • nAvgBatteryLevel - int - Read Only - The average battery level in millivolts. (A value of 9458 represent 9.458 volts.) It's the average of 20 recent samples and smooths out sudden voltage transients.
    • // Assigns variable 'batteryAvg' the average battery level in millivolts.
      int batteryAvg = nAvgBatteryLevel;
      
  • nImmediateBatteryLevel - int - Read Only - The last sampled battery level in millivolts. (A value of 9458 represent 9.458 volts.)
    • // Assigns variable 'batteryLevel' the current battery level in millivolts.
      int batteryLevel = nImmediateBatteryLevel;
      
  • version - int - Contains the firmware version number.


Comments