VEXcode Doxygen
Public Member Functions | List of all members
vex::controller::lcd Class Reference

Use this class to write to the controller's LCD screen. More...

#include <vex_controller.h>

Public Member Functions

 lcd (controller *parent)
 
void setCursor (int32_t row, int32_t col)
 Sets the cursor to the row and column number set in the parameters. More...
 
int32_t column ()
 An integer that tracks the current cursor position's column, starting at 1. More...
 
int32_t row ()
 An integer that tracks the current cursor position's row, starting at 1. More...
 
template<class T >
void print (T value)
 Prints a number, string, or Boolean. More...
 
void print (const char *format,...)
 Prints a number, string, or Boolean. More...
 
void print (char *format,...)
 
void clearScreen (void)
 Clears the controller's LCD screen. More...
 
void clearLine (int number)
 Clears the line specified by the parameter. More...
 
void clearLine (void)
 Clears the current line. More...
 
void newLine (void)
 Moves the cursor to the next line. More...
 

Detailed Description

Use this class to write to the controller's LCD screen.

@prog_lang{block|cpp|pro}

Member Function Documentation

◆ clearLine() [1/2]

void vex::controller::lcd::clearLine ( int  number)

Clears the line specified by the parameter.

@prog_lang{cpp|pro} @drawer_cat{action} @block_sig{clearLine(1);}

Parameters
numberThe line number to be cleared.

◆ clearLine() [2/2]

void vex::controller::lcd::clearLine ( void  )

Clears the current line.

@prog_lang{block|cpp|pro} @drawer_cat{action} @block_sig{clearLine();}

◆ clearScreen()

void vex::controller::lcd::clearScreen ( void  )

Clears the controller's LCD screen.

@prog_lang{block|cpp|pro} @drawer_cat{action} @block_sig{clearScreen();}

◆ column()

int32_t vex::controller::lcd::column ( )

An integer that tracks the current cursor position's column, starting at 1.

@prog_lang{block|cpp|pro} @drawer_cat{sensing} @block_sig{column()}

Returns
Returns an integer that tracks the current cursor position's column, starting at 1.

◆ newLine()

void vex::controller::lcd::newLine ( void  )

Moves the cursor to the next line.

@prog_lang{block|cpp|pro} @drawer_cat{action} @block_sig{newLine();}

◆ print() [1/2]

void vex::controller::lcd::print ( const char *  format,
  ... 
)

Prints a number, string, or Boolean.

@prog_lang{cpp|pro} @drawer_cat{action} @block_sig{print("Hello");}

Parameters
formatThis is a reference to a char format that prints the value of variables.
...A variable list of parameters to insert into format string.

◆ print() [2/2]

template<class T >
void vex::controller::lcd::print ( value)
inline

Prints a number, string, or Boolean.

@prog_lang{block} @drawer_cat{action} @block_sig{print("Hello");}

Parameters
valueInformation to display on the screen. @parameter_defaults_overrides{"Hello"|1|true} @parameter_type_overrides{string|number|boolean} @parameter_identifier_overrides{value|value|value}

◆ row()

int32_t vex::controller::lcd::row ( )

An integer that tracks the current cursor position's row, starting at 1.

@prog_lang{block|cpp|pro} @drawer_cat{sensing} @block_sig{row()}

Returns
Returns an integer that tracks the current cursor position's row, starting at 1.

◆ setCursor()

void vex::controller::lcd::setCursor ( int32_t  row,
int32_t  col 
)

Sets the cursor to the row and column number set in the parameters.

@prog_lang{block|cpp|pro} @drawer_cat{setting} @block_sig{setCursor(1,1);}

Parameters
rowSets the row number for where the cursor is placed.
colSets the column number for where the cursor is placed.

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