original:
http://www.pulsar.org/archive/tav/Lego3/Lego.html
archived:
http://web.archive.org/web/*/http://www.pulsar.org/archive/tav/Lego3/Lego.html
JLegoObj
.
Now, let's setup the LegoObj.
First, We have to set the speed and the parity of the COMObj.
Access the PropertyBox by clicking on the lower-right corner of the module.

Change the speed to "2400" and the parity to "odd"
Now, let's setup the LegoObj.
Next, let's change the sensor's type.
by right clicking on the Lego Object, we can change the sensor types.

The range of values for the sensors are as follows:
Reading the sensor and battery values.
By connecting an integer type object and causing an event. One can read the sensor's value
as an output of type integer from the Lego object.
The battery can be read using the same method, the reading is in units of milli-volts.
RCX can be turned off using the RCX Off button.
Note: If deciding to use a timer to ping the sensor ports, please remember that
the sample rate is 2400 baud, so it is easy to clog the com port. If this happens, the
error output tag should change to light red, and if the users waits a few seconds, the
com port will have a chance to clear itself.
For a list of additional functions please see Kekoa's list of Serial OpCodes
For more information, consult Storm Watch , Kekoa's rcx home page and the Offical Lego MindStorm.
Special thanks for Kekoa for his detailed opcodes and references.
return to Tav's work
page