The FollowMeBot follows the user based on the color of his or her shirt. The device hosts a webcam on a servo to find the object and orient the robot. The color is chosen through the user interface with push buttons. Currently, the MATLAB code supports red and green detection. The purpose of FollowMeBot is to be able to follow the user in order to be helpful for daily tasks.

Dependencies:   Rectangle Servo TextLCD mbed

Fork of FollowMeBot by richard choy

Committer:
dhamilton31
Date:
Mon Nov 11 19:22:13 2013 +0000
Revision:
0:3ed56271dd2d
FollowMeBot

Who changed what in which revision?

UserRevisionLine numberNew contents of line
dhamilton31 0:3ed56271dd2d 1 #ifndef __IROBOT__
dhamilton31 0:3ed56271dd2d 2 #define __IROBOT__
dhamilton31 0:3ed56271dd2d 3
dhamilton31 0:3ed56271dd2d 4 #include "mbed.h"
dhamilton31 0:3ed56271dd2d 5
dhamilton31 0:3ed56271dd2d 6 class iRobot
dhamilton31 0:3ed56271dd2d 7 {
dhamilton31 0:3ed56271dd2d 8
dhamilton31 0:3ed56271dd2d 9 public:
dhamilton31 0:3ed56271dd2d 10
dhamilton31 0:3ed56271dd2d 11 iRobot(PinName tx, PinName rx);
dhamilton31 0:3ed56271dd2d 12 void start();
dhamilton31 0:3ed56271dd2d 13 void forward();
dhamilton31 0:3ed56271dd2d 14 void reverse();
dhamilton31 0:3ed56271dd2d 15 void left();
dhamilton31 0:3ed56271dd2d 16 void right();
dhamilton31 0:3ed56271dd2d 17 void stop();
dhamilton31 0:3ed56271dd2d 18 void playsong();
dhamilton31 0:3ed56271dd2d 19 void charger();
dhamilton31 0:3ed56271dd2d 20
dhamilton31 0:3ed56271dd2d 21 private:
dhamilton31 0:3ed56271dd2d 22
dhamilton31 0:3ed56271dd2d 23 // Create Command // Arguments
dhamilton31 0:3ed56271dd2d 24 static const char Start = 128;
dhamilton31 0:3ed56271dd2d 25 static const char SafeMode = 131;
dhamilton31 0:3ed56271dd2d 26 static const char FullMode = 132;
dhamilton31 0:3ed56271dd2d 27 static const char Drive = 137; // 4: [Vel. Hi] [Vel Low] [Rad. Hi] [Rad. Low]
dhamilton31 0:3ed56271dd2d 28 static const char DriveDirect = 145; // 4: [Right Hi] [Right Low] [Left Hi] [Left Low]
dhamilton31 0:3ed56271dd2d 29 static const char Demo = 136; // 2: Run Demo x
dhamilton31 0:3ed56271dd2d 30 static const char Sensors = 142; // 1: Sensor Packet ID
dhamilton31 0:3ed56271dd2d 31 static const char CoverandDock = 143; // 1: Return to Charger
dhamilton31 0:3ed56271dd2d 32 static const char SensorStream = 148; // x+1: [# of packets requested] IDs of requested packets to stream
dhamilton31 0:3ed56271dd2d 33 static const char QueryList = 149; // x+1: [# of packets requested] IDs of requested packets to stream
dhamilton31 0:3ed56271dd2d 34 static const char StreamPause = 150; // 1: 0 = stop stream, 1 = start stream
dhamilton31 0:3ed56271dd2d 35 static const char PlaySong = 141;
dhamilton31 0:3ed56271dd2d 36 static const char Song = 140;
dhamilton31 0:3ed56271dd2d 37 static const char BumpsandDrops = 7;
dhamilton31 0:3ed56271dd2d 38 static const char Distance = 19;
dhamilton31 0:3ed56271dd2d 39 static const char Angle = 20;
dhamilton31 0:3ed56271dd2d 40
dhamilton31 0:3ed56271dd2d 41 int speed_left;
dhamilton31 0:3ed56271dd2d 42 int speed_right;
dhamilton31 0:3ed56271dd2d 43 Serial device;
dhamilton31 0:3ed56271dd2d 44 };
dhamilton31 0:3ed56271dd2d 45
dhamilton31 0:3ed56271dd2d 46 #endif