leJOS Utilities
|
leJOS Utilities
ButtonCounterThis 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 DataLoggerThis 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 default size of the array is 512, but this can be set to any value, limited by available memory, by a constructor. Methods:
The complete API of Data:logger is here. StopwatchThis 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. TimerThis class is used with a Timer Listener, to which it sends timedOut() message periodically. It uses a private thread. Methods:
The Timer API is here. Timer ListenerTo use the Timer, you need a class that implements this interface. This interface has only one method.
Java UtilitiesleJOS NXJ supports several of the Java data structures. They are: It also supports two other Java utilities: |