Hello, this is my Lego Vending Machine. It took me less than a week to make it. Here is where you insert one Lego gear and you get one Lego brick. In here, there is a light sensor that detects if you’ve inserted a gear. Here is a RCX touch sensor which tells the NXT to
open the door which is controlled by this motor. This is where all the Lego gears are stored. Another motor gives you your Lego brick. The screen right now says: “Status: Ready,” which means you can insert a Lego gear. It also says: “Stock” and it is seven bricks currently. When I push this it says: “Status: Not
Ready.” So I can’t insert another gear. When I insert this, it says: “Status: Not Ready, Please Wait.” Now it says: “Status: Not Ready, Thank you for your purchase.” The stock number keeps updating, so now there is only four bricks left. Once the last brick has been sold, it says:
“Status: Out of Stock, Sorry for the inconvenience.” A few seconds later, the program ends.