This is a beginner-level robotics design project in which I modified an Ottobot by adding new sensors to its prototype. Otto is a simple interactive robot based on Arduino programming language. Basically, this instructables post is about letting robot respond to several sensors in different ways so that it does things based on which sensor is stimulated. The final product should be, when a button is pressed, the ottobot plays a short melody or flaps its feet or turns on light-emitting diode.
Step 1: Material Assembly and Software Installation
The following electronic components and computer application are required:
- Otto DIY robot
- Open-source IDE for Arduino (mine was version 1.8.5 on Macbook Pro)
- 1 breadboard
- 8 jumper wires (male to female)
- 3 jumper wires (female to female)
- 2 LEDs of any colour
- 2 push buttons
- 1 HW-483 touch sensor
Step 2: Placement of Pushbuttons
Place a pushbutton in the breadboard, across the ravine for Dual in-line Package (DIP) ICs. All four legs of the button must be fixed tightly so that electric current could flow unimpededly along the terminal strips of the breadboard. Similarly, place the other pushbutton at a different location.
Connect one leg of the button through a jumper wire (male to female) to the voltage (V or +) pin of analog 0 (A0) on your Arduino Nano IO shield. Also wire that leg to the signal (S) pin of A0. On the opposite end connect the hole in the same column as the leg to the ground pin (G or GND) of A0. Repeat the steps for the second button except for using A1 this time.
Step 3: Multiple LED Setup
Plug LED 1 to the breadboard, legs buried in two seperate terminal strips. Place the long leg of LED 2 adjacent to the short leg of LED 1 in the same terminal strip. The short leg of LED 2 can go anywhere so long as it is not in the used columns on the board. Finally, to complete a series circuit, I connected the long leg of LED 1 to the signal (S) pin of A4 and the short leg of LED 2 to the G pin of A4.
The current proceeds in a loop according to one path from start-to-finish, with the Anode (positive) of LED 2 joined to the Cathode (negative) of LED 1. Moreover, the voltage output from the analog pin connects to the positive long leg of LED 1, and from that LED a further connection is made from the negative to the positive of LED 2 in the DC circuit, from which electricity goes from the negative end to the ground output pin.
Step 4: Touch Sensor Connection
Three legs of the touch sensor have different functions. The middle one accepts voltage. One of the side prongs with an uppercase letter S written next to it is responsible for signal input, and the other one marked by a minus symbol is an earthing electrode. Therefore, connect the side pins to S and G of digital 7 (D7), the middle leg to V.
Step 5: Program Upload
I attached a .ino text file of my ottobot code to this step for your reference. I acknowledge the flaws in my program, especially the LED section. I only managed to let the lights blink simultaneously despite my relentless effort to make them fade in and out. I apologise for the ambiguity in my communication and, hopefully, readers of my post are able to follow those procedures above with ease.