Total Pageviews

Pages

Saturday, April 17, 2010

This is my NXT Scanner that I am very happy that it works so well. I've been trying to make an NXT scanner on and off for about the last 2 months but what finally made me able to do it was that I bought some gear tracks from lego education that helped tremendously. It uses 2 motors, a light sensor, and a touch sensor. Motor A moves the light sensor over the picture and motor B moves the picture forward. It displays what it has scanned on the nxt screen.

By doing this project I found 3 different ways you can design the program. The first is you can take a value from the light sensor every 140 milliseconds while the light sensor moves across the picture until it takes 64 samples and then it brings the light sensor back a designated number of degrees and repeats 100 times. My first program did this but I wasn't satisfied because it was hard to find the right number of degrees to bring the light sensor back. The second is you can take a sample from the light sensor every designated number of degrees while motor A is moving until it takes 64 samples and then the light sensor goes back a designated number of degrees and repeats 100 times. I tried to do this but I couldn't get it to work. The third and final way I discovered is you can take a value from the light sensor every 140 milliseconds until it hits the touch sensor and then it brings the light sensor back a designated degrees and repeats 100 times. I found this way to be the best.