Lejos SensorTest

I got tired of having a small program for each sensor, so I made a program that can give me data from the following sensors:

  • ColorlightSensor (lejos.nxt.ColorLightSensor)
    Slightly modified version of the sample that comes with the lejos installation. Changed so it would fit in within my class.
  • TouchSensor (lejos.nxt.TouchSensor)
  • UltrasonicSensor (lejos.nxt.UltrasonicSensor)
  • LightSensor (lejos.nxt.LightSensor)
  • SoundSensor (lejos.nxt.SoundSensor)

The program has a menu that lets you choose which port you want to use and which kind of sensor you want to test. You can go back and choose a new port or sensor type when ever you want. I’m new to Java so if the code looks like a mess or you see a way it can be more efficient then drop me a comment, or feel free to change the code your self.

SourceCode (archived)
SourceCode

Leave a comment

Your comment