VEXcode Doxygen
Classes | Public Types | Public Member Functions | Public Attributes | Static Protected Member Functions | 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...

#include <vex_brain.h>

Inheritance diagram for vex::brain:
vex::console

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...
 

Public Types

enum  tEventType { EVENT_LCD_PRESSED = 0, EVENT_LCD_RELEASED = 1 }
 

Public Member Functions

 brain ()
 Creates a new brain object. More...
 
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...
 
sdcard SDcard
 This is the instance of the SD card class. More...
 

Static Protected Member Functions

static int32_t _getIndex ()
 

Friends

class competition
 

Detailed Description

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

@prog_lang{block|cpp|pro}

Constructor & Destructor Documentation

◆ brain()

vex::brain::brain ( )

Creates a new brain object.

@prog_lang{cpp|pro} @drawer_cat{constructor} @block_sig{vex::brain Brain = vex::brain();}

Member Function Documentation

◆ resetTimer()

void vex::brain::resetTimer ( )

Resets the timer to zero.

@prog_lang{block|cpp|pro} @drawer_cat{setting} @block_sig{Brain.resetTimer();}

◆ setTimer()

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

Sets the timer to a value and time unit.

@prog_lang{block|cpp|pro} @drawer_cat{setting} @block_sig{Brain.setTimer(10, seconds);} @cpp_sig{Brain.setTimer(10, vex::timeUnits::sec);}

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

◆ timer()

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

Gets the value of the timer in the units specified.

@prog_lang{block|cpp|pro} @drawer_cat{sensing} @block_sig{Brain.timer(seconds);} @cpp_sig{Brain.timer(vex::timeUnits::sec);}

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

Member Data Documentation

◆ Battery

battery vex::brain::Battery

This is the Brain's instance of the battery.

@prog_lang{block|cpp|pro} @drawer_cat{instance} @block_sig{Brain.Battery}

◆ Screen

lcd vex::brain::Screen

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

@prog_lang{block|cpp|pro} @drawer_cat{instance} @block_sig{Brain.Screen}

◆ SDcard

sdcard vex::brain::SDcard

This is the instance of the SD card class.

@prog_lang{pro} @drawer_cat{instance} @block_sig{Brain.SDcard}

◆ ThreeWirePort

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

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

@prog_lang{pro} @drawer_cat{instance|none}

◆ Timer

vex::timer vex::brain::Timer

Use the Timer class to obtain the system time.

@prog_lang{cpp|pro} @drawer_cat{instance} @block_sig{Brain.Timer}


The documentation for this class was generated from the following file: