EV3RT CXX API Reference [English]
An RTOS-based development platform for LEGO Mindstorms EV3.
Button Class Referenceabstract

Class Button. API for working with general button buttons. More...

#include <ev3cxx_button.h>

Inheritance diagram for Button:
BrickButton TouchSensor

Public Member Functions

virtual int isPressed ()=0
 Get state of touch sensor. More...
 
void waitForPress ()
 Blocks until button is pressed.
 
void waitForRelease ()
 Blocks until button is release.
 
void waitForClick ()
 Blocks until button is clicked (press and release)
 

Detailed Description

Class Button. API for working with general button buttons.

Definition at line 19 of file ev3cxx_button.h.

Member Function Documentation

◆ isPressed()

virtual int isPressed ( )
pure virtual

Get state of touch sensor.

Returns
If is pressed return , else .

Implemented in BrickButton, and TouchSensor.

Referenced by Button::waitForPress(), and Button::waitForRelease().