Friday 1 January 2010

TriBot Test Code

I've writtten some test code for the Tribot (uploaded to the repository). It's just basic test code in a class with a main method, nothing special at the moment.

For the Ultrasonic sensor we have an output to the screen based on readings taken from the surrounding environment.

For the Touch sensor, whilst the sensor is pressed again an output to the screen and same for the colour sensor whilst a reading can be detected an output is displayed to the LCD screen on the brick.

For the motors, the results are physically visible so it's a combination of forward and backwards movement with output to the screen.

The touch, light and motors work fine but I'm a bit worried as the Ultrasonic sensor doesn't seem to be doing much. Maybe it's a coding or LeJos problem. I might use the mindstorms software to test it. I hope it's not faulty  :( I don't want to fork out £22 for a new one.

1 comment:

  1. I'm such a n00b! It was all to do with the sensor being in the wrong port!

    ReplyDelete

Search This Blog