|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectch.aplu.nxt.NxtRobot
public class NxtRobot
Class that represents a NXT robot brick. Parts (e.g. motors, sensors) may be assembled into the robot to make it doing the desired job.
| Field Summary |
|---|
| Constructor Summary | |
|---|---|
NxtRobot()
Creates an instance of NxtRobot continues execution normally. |
|
NxtRobot(boolean waitStart)
Creates an instance of NxtRobot and and delays execution until the user presses the ENTER button. |
|
| Method Summary | |
|---|---|
void |
addPart(Part part)
Assembles the given part into the robot. |
void |
exit()
Calls cleanup() of all sensors, stops any running motor and terminates the running program. |
double |
getBatteryLevel()
Returns the battery level. |
static java.lang.String |
getVersion()
Returns library version information. |
void |
playTone(int frequency,
int duration)
Plays a tone of given frequency (in Hz) for the given duration (in ms). |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public NxtRobot(boolean waitStart)
waitStart - if true, the execution is stopped until the ENTER button is hit.public NxtRobot()
| Method Detail |
|---|
public void addPart(Part part)
part - the part to assemblepublic double getBatteryLevel()
public static java.lang.String getVersion()
public void exit()
public void playTone(int frequency,
int duration)
frequency - the frequency in Hertzduration - the duration in milliseconds
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||