VEX V5 C++ API
Classes | Public Member Functions | Public Attributes | Friends | List of all members
vex::brain Class Reference

Use the brain class to see battery information, SD card information, or write to the Screen. More...

Classes

class  battery
 Use the battery class to see information about the battery. More...
 
class  lcd
 Use this class to write or draw to the brain's LCD screen. More...
 
class  sdcard
 Use the SD Card class to load or save files on your SD card. More...
 
class  serial
 

Public Member Functions

 brain ()
 Creates a new brain object. Only one brain instance is required. More...
 
 ~brain ()
 
double timer (timeUnits units)
 Gets the value of the timer in the units specified. More...
 
void resetTimer ()
 Resets the timer to zero. More...
 
void setTimer (double value, timeUnits units)
 Sets the timer to a value and time unit. More...
 

Public Attributes

vex::timer Timer
 Use the Timer class to obtain the system time. More...
 
lcd Screen
 Use the Screen class to write or draw to the screen. More...
 
triport ThreeWirePort = triport( PORT22 )
 The Brain's instance of Three Wire Ports A through H. More...
 
battery Battery
 This is the Brain's instance of the battery. More...
 
serial Serial
 This is the instance of the Serial port class. More...
 
sdcard SDcard
 This is the instance of the SD card class. More...
 

Friends

class competition
 

Detailed Description

Use the brain class to see battery information, SD card information, or write to the Screen.

Constructor & Destructor Documentation

◆ brain()

vex::brain::brain ( )

Creates a new brain object. Only one brain instance is required.

◆ ~brain()

vex::brain::~brain ( )

Member Function Documentation

◆ timer()

double vex::brain::timer ( timeUnits  units)

Gets the value of the timer in the units specified.

Parameters
unitsThe unit of time that will be returned.
Returns
Returns a double that represents the value of the timer.

◆ resetTimer()

void vex::brain::resetTimer ( )

Resets the timer to zero.

◆ setTimer()

void vex::brain::setTimer ( double  value,
timeUnits  units 
)

Sets the timer to a value and time unit.

Parameters
valueThe value that the timer is set to.
unitsThe unit of time that will be returned.

Friends And Related Function Documentation

◆ competition

friend class competition
friend

Member Data Documentation

◆ Timer

vex::timer vex::brain::Timer

Use the Timer class to obtain the system time.

◆ Screen

lcd vex::brain::Screen

Use the Screen class to write or draw to the screen.

The LCD screen has a resolution of 480x240 pixels

◆ ThreeWirePort

triport vex::brain::ThreeWirePort = triport( PORT22 )

The Brain's instance of Three Wire Ports A through H.

◆ Battery

battery vex::brain::Battery

This is the Brain's instance of the battery.

◆ Serial

serial vex::brain::Serial

This is the instance of the Serial port class.

◆ SDcard

sdcard vex::brain::SDcard

This is the instance of the SD card class.