Subject:
|
Just wrote my first program in LeJOS
|
Newsgroups:
|
lugnet.org.ca.rtltoronto
|
Date:
|
Sat, 1 Dec 2001 00:55:41 GMT
|
Viewed:
|
391 times
|
| |
| |
Just wrote my first program in LeJOS. Its pretty cool for a very tiny
Java VM. Haven't done much with it yet. Turn motor on, turn motor off,
kind of things. But it should be a handy language for my Project X
robot.
Speaking of my Project X robot. How is "Fang" for a name. It seems
appropriate since it sinks its teeth into the blocks to pick them up.
Or maybe there is something with fangs that would make a more
appropriate name.
Derek
ps for those that are interested here is the wonderful source to my
first LeJOS program:
package robot;
import java.lang.System;
import josx.platform.rcx.Motor;
public class Test {
public static void main(String[] args) {
Motor.A.setPower(7);
Motor.B.setPower(7);
Motor.A.forward();
Motor.B.forward();
try {
Thread.sleep(2000);
}
catch(InterruptedException e) {
}
Motor.A.flt();
Motor.B.stop();
try {
Thread.sleep(9000);
}
catch(InterruptedException e) {
}
}
}
|
|
Message has 1 Reply:
2 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|