Home Page of Alberto Lepe Garza
About Computers
About Computers

During my master course, I had the opportunity to use MindStorms from LEGO. With MindStorms you can create many different robots. Even it comes with its own software we used LEJOS (Java) to control the robot. We used 3 sensors and 4 motors.

I created some classes in order to control easily the robotos from a command prompt, if you are interested you can download the main class: Download RCX.java.

Mainly, this is how it is used:

Go(TRUE, 2000); // Move FWD 2 sec. (False = BKWD)
Turn(LEFT, 1000); //Turn 1 sec to the left side (2 motors FWD, 2 motors BKWD)
TurnSoft(RIGHT, 1000); //Turn the right side "softly" (2 motors FWD, the other two slows down)
Break(); // All 4 motors go in opposite direction for a moment to break.
Stop(); // Stop all motors.
Speed(5); //Set speed motor to 5 (values from 0 to 7)
SpeedA(3); // Set speed only in motor A
Beep(); // make sound
SensorOn(); // Turn on sensors
SensorOff(); // Turn off sensors
Sensor1Val(); // get Sensor1 value
ShowNum(100); // show number 100 in screen. Very useful for debugging
ShowTxt("HELLO");// show a text in scree.

Additionally I developed a code to navigate in a matrix. This code will find the fastest route from point A to point B in a X*Y grid that contains obstacles.

Download fastRoute.java

Enjoy :)

Some pictures of my models:











Site Map - CopyLeft 2008 - Powered by Yayahuic Framework - Made by Alberto Lepe G.
Check http header Validate webpage Validate style sheet Check accessibility