lejos.util
Class Datalogger

java.lang.Object
  extended by lejos.util.Datalogger

public class Datalogger
extends Object

Datalogger class; stores float values then then transmits via bluetooth or usb
works with DataViewer in pctools. Default size is 512. Capacity is limited only by the available ram.

Author:
Roger Glassey - revised 1/12/08 for large arrays

Constructor Summary
Datalogger()
          buld a Datalogger with default size 512
Datalogger(int size)
          build a new Datalogger with capacity = size;
 
Method Summary
 void reset()
          Clears the log; next write is at the beginning;
 void transmit()
          transmit the stored values to the PC via USB or bluetooth;
Displays " ESC for BT".
 void transmit(boolean useUSB)
          obsolete - older version API.
 void writeLog(float v)
          write a float value to the log
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait
 

Constructor Detail

Datalogger

public Datalogger()
buld a Datalogger with default size 512


Datalogger

public Datalogger(int size)
build a new Datalogger with capacity = size;

Parameters:
size - the capacity of the Datalogger
Method Detail

writeLog

public void writeLog(float v)
write a float value to the log

Parameters:
v -

reset

public void reset()
Clears the log; next write is at the beginning;


transmit

public void transmit()
transmit the stored values to the PC via USB or bluetooth;
Displays " ESC for BT". Press the escape key to use BlueTooth; any other to use USB.
Then displays "wait for BT" or "wait for USB". In DataViewer, click on "StartDownload" When finished, displays the number values sent, and asks "Resend?". Press ESC to exit the program, any other key to resend.
Then start the download in DataViewer.


transmit

public void transmit(boolean useUSB)
obsolete - older version API. calls transmit();

Parameters:
useUSB -