I had built a simple robot whose movements can be programmed through four switches a long time ago. I had recently written about it on instructables.
Hello there! When Arduino released its robot I was particularly fascinated by the logobot sketch. I thought, logobot could be used to teach children about robotics and programming and they would also have a lot of fun with the robot. So I decided to build my own version of the logobot.
Step 1: Materials
This build requires:
Step 2: Switches and Circuit
Connect the switches according to the circuit diagram. Use the 5v power supply from the Arduino to power the switches. Next connect the motors to the motor driver. The terminals will be labelled. Do not forget to connect the enable pins to a positive voltage. You can connect the enable pins to the battery powering the motors or the 5v power supply from the Arduino. I would go with the first one.
Step 3: Programming the Arduino
Download the Arduino code and upload it to the Arduino. Make sure that you have made all the necessary connections before testing the robot. For the first time, connect the Arduino to the computer and use the Serial Monitor to debug if the robot doesn't work. If the robot works as it should, use an external power supply for the Arduino.
Step 4: How it works?
The program is simple. Each key press is assigned a unique number and every time a particular key is pressed, the corresponding number is stored in an array. When the execute button is pressed the array is read and the numbers are converted into corresponding movements. Feel free to comment and ask doubts.