Mindstorms and proxy JVM
Mindstorms
MindStorms is a ``Robotics Invention System''
-
A 16-bit computer called the RCX (a 16MHz Hitachi H8/3297),
with 32k RAM
-
The RCX can control 3 motors and read from 3 sensors
-
Additional Lego parts - gears, wheels, sensors, motors
-
Software can be downloaded by an infra-red link on a
serial port
-
Programs can be downloaded and run, or "immediate"
commands can be run
-
Normally programmed from a visual programming environment
or from VB
-
On a PC, interface to RCX is managed by an OCX
-
Low-level machine-code is sent across the IR link
Lego and Java
-
The Mindstorms robot only has 32k of RAM
-
The CLDC configuration (using the KVM) requires 160k
-
Therefore, Mindstorms cannot run as a J2ME device
-
There is a really tiny version of Java that will run in the
Mindstorms
Tiny devices and proxies
Run a proxy on a Java-capable device that "represents" the device
Mindstorms control
-
The Mindstorms robot has a microcontroller that defines an
instruction set as bytecodes, including
Instruction |
Bytecode |
PING
|
0x10
|
SETMOTORPOWER
|
0x13
|
CALLSUB
|
0x17
|
PLAYSOUND
|
0x51
|
SETMOTOR
|
0x21
|
Mindstorms programs
-
Programs can be downloaded to the Mindstorms using the IR link
-
Single instructions can also be downloaded and run immediately,
again by the IR link
Mindstorms proxy
A proxy for the Mindstorms robot is built using the following components
-
Native code serial port DLL
-
Java CommAPI
-
Proxy on top of this
RCXPort
Dario Laverde has defined a proxy class
Example use of RCXPort
Jan Newmarch (http://jan.newmarch.name)
jan@newmarch.name
Last modified: Mon Mar 31 04:29:33 EST 2003
Copyright ©Jan Newmarch