Ok I'll try that with the code from now on, thanks.
At first I was just testing using my hand in front of the sensor but I also tried running it up to some hard wood furniture and they both would give the same random results.
Search found 4 matches
- 21 Aug 2011, 20:46
- Forum: Mindstorms Hardware
- Topic: Ultrasonic Sensor Not Working?
- Replies: 4
- Views: 5489
- 21 Aug 2011, 18:11
- Forum: Mindstorms Hardware
- Topic: Ultrasonic Sensor Not Working?
- Replies: 4
- Views: 5489
Re: Ultrasonic Sensor Not Working?
I thought of that but my code seemed pretty straight forward. Here it is though, maybe I missed something... package rover; import lejos.nxt.*; import lejos.robotics.navigation.*; public class Rover { static UltrasonicSensor us = new UltrasonicSensor(SensorPort.S4); static DifferentialPilot sc = new...
- 21 Aug 2011, 16:00
- Forum: Mindstorms Hardware
- Topic: Ultrasonic Sensor Not Working?
- Replies: 4
- Views: 5489
Ultrasonic Sensor Not Working?
I'm trying to make a simple robot that drives around a room without running in to obstacles by using its ultrasonic sensor but the sensor is giving me completely random readings. When I have it only print out its readings on the LCD screen it seems to work well but when I use it in my program the ro...
- 01 Aug 2011, 19:17
- Forum: Mindstorms Software
- Topic: leJOS Downloading error
- Replies: 1
- Views: 2618
leJOS Downloading error
Hey everyone, I've been using the NXT-G software for about a year but I wanted to get into the leJOS programming so I bought a book called Maximum Lego NXT Building Robots with Java Brains by Brian Bagnall. Using Eclipse I've made tools to compile and download my java code. The compile tool works fi...