VEXcode IQ C++ Unofficial documentation for version 3.0.4.1
Loading...
Searching...
No Matches
vex::brain Class Reference
Inheritance diagram for vex::brain:
vex::console

Classes

class  battery
 Use the battery class to see information about the battery. More...
 
class  button
 Use the button class to get values from the brain's buttons. More...
 
class  lcd
 Use this class to write or draw to the brain's LCD screen. More...
 
class  terminal
 Use the terminal class to send text to the brain USB port. More...
 

Public Member Functions

 brain ()
 Creates a new brain object.
 
double timer (timeUnits units)
 Gets the value of the timer in the units specified.
 
void resetTimer ()
 Resets the timer to zero.
 
void setTimer (double value, timeUnits units)
 Sets the timer to a value and time unit.
 
void playSound (soundType sound)
 play one of the predefined sounds on the brain
 
void playNote (int32_t octave, int32_t note)
 play a note in the given octave on the brain
 
void playNote (int32_t octave, int32_t note, int32_t ms)
 play a note in the given octave on the brain and wait for the given time before returning
 
void soundOff (void)
 turn sound off on the brain
 
void programStop ()
 request that vexos stop the running program. The program will stop after approximately 500mS.
 

Public Attributes

button buttonUp = button(0)
 A button that represents the Up/Left button on the brain.
 
buttonbuttonLeft = buttonUp
 
button buttonDown = button(1)
 A button that represents the Down/Right button on the brain.
 
buttonbuttonRight = buttonDown
 
button buttonCheck = button(2)
 A button that represents the Check button on the brain.
 
lcd Screen
 Use the Screen class to write or draw to the screen.
 
vex::timer Timer
 Use the Timer class to obtain the system time.
 
battery Battery
 
terminal Terminal
 

Detailed Description

Definition at line 25 of file vex_brain.h.

Member Function Documentation

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

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

Member Data Documentation

◆ Battery

battery vex::brain::Battery

Definition at line 339 of file vex_brain.h.

◆ buttonCheck

button vex::brain::buttonCheck = button(2)

A button that represents the Check button on the brain.

Definition at line 89 of file vex_brain.h.

◆ buttonDown

button vex::brain::buttonDown = button(1)

A button that represents the Down/Right button on the brain.

Definition at line 84 of file vex_brain.h.

◆ buttonLeft

button& vex::brain::buttonLeft = buttonUp

Definition at line 80 of file vex_brain.h.

◆ buttonRight

button& vex::brain::buttonRight = buttonDown

Definition at line 85 of file vex_brain.h.

◆ buttonUp

button vex::brain::buttonUp = button(0)

A button that represents the Up/Left button on the brain.

Definition at line 79 of file vex_brain.h.

◆ Screen

lcd vex::brain::Screen

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

Definition at line 290 of file vex_brain.h.

◆ Terminal

terminal vex::brain::Terminal

Definition at line 357 of file vex_brain.h.

◆ Timer

vex::timer vex::brain::Timer

Use the Timer class to obtain the system time.

Definition at line 314 of file vex_brain.h.


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