ECRobot C++ API for LEGO MINDSTORMS NXT
1.0.10
|
NXT intelligent block class. More...
#include <Nxt.h>
Public Types | |
enum | eButton { RUN_ON = 0x01, ENTR_ON = 0x02, RUN_ENTR_ON = (RUN_ON | ENTR_ON), BUTTONS_OFF = 0x00 } |
NXT Button enum. More... | |
enum | eNxtButton { ORANGE_RECT = 0x01, LEFT = 0x02, RIGHT = 0x04, GRAY_RECT = 0x08 } |
NXT Button enum. More... | |
Public Member Functions | |
Nxt (void) | |
Constructor. | |
eButton | getButtons (void) const |
Get NXT buttons status. | |
eNxtButton | getNxtButtons (void) const |
Get NXT buttons status. | |
S16 | getBattMv (void) const |
Get battery voltage in mV. | |
void | shutdown (void) |
Shutdown (Power off) the NXT. | |
void | restart (void) |
Restart the running application. | |
void | execNXTBIOS (void) |
Execute NXT BIOS. |
NXT intelligent block class.
NXT Button enum.
Note that left triangle and gray colored rectangle buttons on the NXT are reserved for stopping and shutdown application program. To use these buttons for an application, define NO_RUN_ENTER_STOP_EXIT compile switch macro while compiling the application.
ecrobot::Nxt::Nxt | ( | void | ) |
Constructor.
- |
void ecrobot::Nxt::execNXTBIOS | ( | void | ) |
Execute NXT BIOS.
Note that this API works only when NXT BIOS is used. Otherwise, it does nothing.
Note that NXT BIOS 1.0.4 or later is required.
- |
S16 ecrobot::Nxt::getBattMv | ( | void | ) | const |
Get battery voltage in mV.
- |
eButton ecrobot::Nxt::getButtons | ( | void | ) | const |
Get NXT buttons status.
Note that this API is kept for backward compatibility. Recommend to use getNxtButtons API instead of getButtons API.
- |
eNxtButton ecrobot::Nxt::getNxtButtons | ( | void | ) | const |
Get NXT buttons status.
- |
void ecrobot::Nxt::restart | ( | void | ) |
Restart the running application.
- |
void ecrobot::Nxt::shutdown | ( | void | ) |
Shutdown (Power off) the NXT.
- |