Search found 9 matches

by nick2price
Tue Dec 29, 2009 8:27 pm
Forum: NXJ Software
Topic: Robot behaviour
Replies: 0
Views: 919

Robot behaviour

Sorry for another question, just trying to understand everything better. I am looking at robot behaviour. Can I just make a load of different classes which extend Behavior, and define a different behaviour in each class (e.g. detect object, walk etc). And then when it comes to my main class, I can j...
by nick2price
Mon Dec 28, 2009 4:09 pm
Forum: NXJ Software
Topic: GPS navigation
Replies: 0
Views: 971

GPS navigation

Hi. I am looking to make an autonomous robot using gps navigation. However, a lot of the example I look at seem to place points on a map for the robot to reach using some mathematic formulars. Can this be done a different way? I wanted to have an onboard gps device which constantly updates its posit...
by nick2price
Sun Dec 27, 2009 11:04 pm
Forum: NXJ Software
Topic: UltraSonic Sensor issue
Replies: 10
Views: 8703

Hi. I am using the second latest version of LeJOS, think it is 0.8. Strangly enough, when I run sonic test, it works fine. And the only real difference I can see from that to my code is that they make a direct call to getDistance inside the drawInt method, whereas I assign it to a variable first. I ...
by nick2price
Sun Dec 27, 2009 2:31 am
Forum: NXJ Software
Topic: UltraSonic Sensor issue
Replies: 10
Views: 8703

UltraSonic Sensor issue

Hi. Hopefully this is quite a simple problem. Basically, I have the code public class ObjectDistance { public static void main(String[] args) throws InterruptedException{ UltrasonicSensor us = new UltrasonicSensor(SensorPort.S1); while(true){ int value = us.get...
by nick2price
Fri Dec 25, 2009 2:41 am
Forum: NXJ Software
Topic: LRDataBridge
Replies: 1
Views: 843

LRDataBridge

Hi. I am following some code which uses somthing called LRDataBridge, but this is not a class in my LeJOS, or a few other versions I have seen. Apparantly, its used to exchange data objects. Was this class created in any version of LeJOS?

Thanks
by nick2price
Thu Jul 16, 2009 8:31 pm
Forum: NXJ Software
Topic: Error with classes
Replies: 6
Views: 1370

Thank you all for your help. Everything seems ok now.
by nick2price
Thu Jul 16, 2009 7:56 pm
Forum: NXJ Software
Topic: Error with classes
Replies: 6
Views: 1370

kool. So I have uploaded my sound file to my nxt. I have uploaded my class file to the java file import lejos.nxt.Sound; import java.io.*; public class sound{ public static void main(String[] args) { final File soundFile = new File("middlec.wav"); Sound.playSample...
by nick2price
Thu Jul 16, 2009 7:36 pm
Forum: NXJ Software
Topic: Error with classes
Replies: 6
Views: 1370

ah ok, that makes sense. Now everything compiles fine and can upload to my brick. When i run the above program on my brick, it makes the lejos beeps, sort of restarts, and then goes back to the main menu.
As my sound file is not on my brick, where would i have to place it in order to get it there?
by nick2price
Thu Jul 16, 2009 6:15 pm
Forum: NXJ Software
Topic: Error with classes
Replies: 6
Views: 1370

Error with classes

I am making a simple program which plays a sound. import lejos.nxt.Sound; import lejos.nxt.Button; import lejos.nxt.LCD; import java.io.*; public class sound{ public static void main(String[] args) { final File soundFile = new File("test.wav"); Sound.playSample...

Go to advanced search