Lego Mindstorms Calculator

by ALogan97 in Circuits > Robots

9164 Views, 4 Favorites, 0 Comments

Lego Mindstorms Calculator

IMG_1444.JPG
This calculator uses a modified version of one of the Mindstorms tutorial's code to add how many times you press one touch sensor to how many times you press another touch sensor. To subtract, you have to add negative numbers.

Oh and sorry for the poor picture quality, I took everything on an iPhone camera :P

Parts

IMG_1436.JPG
Parts:
Two touch sensors
8 black pegs
2 "L" bars
Mindstorms NXT brick
2 connector cords for sensors

Add the L Bars

IMG_1441.JPG
IMG_1438.JPG
Attach the L bars to the NXT with the little peg things.

Add the Sensors

IMG_1443.JPG
IMG_1442.JPG
Attach the sensors to the L bars with the leftover peg things.

Plug the Sensors Into the NXT

IMG_1444.JPG
Plug the left sensor into port 1 and the right sensor into port 2. I put two longer pegs in the NXT to keep the wires in place, but it won't affect anything if you leave them out.

Download Code

Download the 2 files on this page and sync "add.rbt" to your NXT brick.

http://www.filedropper.com/addcalculator
http://www.filedropper.com/add_4