The source code follows, and is attached in a text file:/********************************************************************* follow.c ** -------- ** runs on Create Command Module ** cover all but small opening on the ...
This Instructable shows how to use the iRobot Create to make a moving bellhop. This was lifted entirely with permission from carolDancer's instructions, and I put it up as a sample entry for our contest.
Robo-BellHop can be your own personal assistant to carry your bags, groceries, laundry, etc., so you don't have to. The basic Create has a bin attached to the top and uses two on-board IR detectors to follow its owner's IR transmitter. With very basic C software code, the user can secure heavy groceries, a large load of laundry, or your overnight bag onto Robo-BellHop and have the robot follow you down the street, through the mall, down the hall or through the airport -- wherever the user needs to go.
Basic Operation 1) Hit the Reset button to turn on command module and check sensors are engaging 1a) the Play LED should go on when it sees the IR transmitter to follow you 1b) the Advance LED should go on when the robot is at very close range 2) Hit black soft button to run Robo-BellHop routine 3) Attach IR transmitter to ankle and make sure it's turned on. Then load up the basket and go! 4) The logic of Robo-BellHop is as follows: 4a) As you walk around, if the IR signal is being detected, the robot will drive at max speed 4b) If the IR signal goes out of range (by being too far or too sharp an angle), the robot will traverse a short distance at slow speed in case the signal is picked up again 4c) If the IR signal is not being detected, the robot will turn left and right in an attempt to find the signal again 4d) If the IR signal is being detected but the robot hits an obstacle, the robot will attempt to drive around the obstacle 4e) If the robot gets very close to the IR signal, the robot will stop to avoid hitting the owner's ankles
Hardware 1 iRobot virtual wall unit - $30 1 IR detector from RadioShack - $3 1 DB-9 male connector from Radio Shack - $4 4 6-32 screws from Home Depot - $2.50 2 3V batteries, I used D 1 laundry basket from Target - $5 1 extra wheel to onto the back of the Create robot Electrical tape, wire and solder
Step 1: Covering the IR Sensor
Attach electrical tape to cover all but a small slit of the IR sensor on the front of the Create robot. Dismantle the virtual wall unit and extract the small circuit board at the front of the unit. This is a bit tricky because there are lots of hidden screws and plastic mounts. The IR transmitter is on the circuit board. Cover the IR transmitter with a piece of tissue paper to avoid IR reflections. Attach the circuit board to a strap or elastic band that can wrap around your ankle. Wire up the batteries to the circuit board so that you can have the batteries in a comfortable place (I made it so that I could put the batteries in my pocket).
Wire up the 2nd IR detector to the DB-9 connector and insert into Cargo Bay ePort pin 3 (signal) and pin 5 (ground). Attach the 2nd IR detector to the top of the existing IR sensor on Create and cover it with a couple of layers of tissue paper until the 2nd IR detector doesn't see the emitter at a distance that you want the Create robot to stop to keep from hitting you. You can test this after you've hit the Reset button and watch the Advance LED to go on when you're at the stop distance.