This class allows simple data entry by pressing the NXT buttons. It counts the number of presses of the Left and Right buttons, Pressing Left (or Right) simultaneously with Enter decrements the count.
To start counting, call one of these methods:
These methods exit when the user presses ESC. Then the values can be retrieved by
The complete API for Button Counter is here
This class stores float values in an array and transmits them to the DataViewer application running on a PC. It will use BlueTooth or USB as selected by the user at run time.
The complete API of Data:logger is here.
This class represents an elapsed time stopwatch. You can construct as many instances as you need.
There are only two methods
The API of Stopwatch is here.
This class is used with a Timer Listener, to which it sends timedOut() message periodically. It uses a private thread.
The Timer API is here.
To use the Timer, you need a class that implements this interface. This interface has only one method.
leJOS NXJ supports several of the Java data structures. They are:
It also supports two other Java utilities: