Wifi Controlled Robot is done as a mini project (Lab4) for ECE 4180 class (Georgia Tech). Robot is assembled in Sparkfun's Shadow chasis robot kit. This robot takes the command from the webpage to move forward, reverse without colliding. The distance sensor is used as a mechanism for collision detection and play a short beep sound. It turn 90 degree with magnetometer when the turn command is sent.

Dependencies:   Motordriver mbed

/media/uploads/pkoirala3/capture.jpg Showing the setup and calibration: Part1 In this part the Wifi setups and attains an IP address so we can control it through a webpage on our phone/PC. After it obtains an IP address it calibrates the IMU so we can have accurate compass headings for precise turns.

The parts that we use are as follows:

  • Mbed
  • 2 DC motors
  • H-Bridge (to drive the DC motors)
  • Speaker
  • Class D Amp (to drive the Speaker)
  • IMU (use the magnometer for compass headings)
  • Wifi card (ESP8266)

Showing webpage functionality and Robot Functionality: In this part we demonstrate the functionality of the robot and the webpage to control it.

Final Code

[Repository '/teams/Prana-Koirala/code/Wifi_controlled_Robot_ECE4180/docs/tip/main_8cpp_source.html' not found]

Committer:
pkoirala3
Date:
Mon Mar 13 17:53:47 2017 +0000
Revision:
4:166570fa7fda
Child:
5:e9f1030a5bbb
Fixed minor bugs. Added speaker library

Who changed what in which revision?

UserRevisionLine numberNew contents of line
pkoirala3 4:166570fa7fda 1 #include "mbed.h"
pkoirala3 4:166570fa7fda 2 // a new class to play a note on Speaker based on PwmOut class
pkoirala3 4:166570fa7fda 3 class Speaker
pkoirala3 4:166570fa7fda 4 {
pkoirala3 4:166570fa7fda 5 public:
pkoirala3 4:166570fa7fda 6 Speaker(PinName pin) : _pin(pin) {
pkoirala3 4:166570fa7fda 7 // _pin(pin) means pass pin to the Speaker Constructor
pkoirala3 4:166570fa7fda 8 }
pkoirala3 4:166570fa7fda 9 // class method to play a note based on PwmOut class
pkoirala3 4:166570fa7fda 10 void PlayNote(float frequency, float duration, float volume) {
pkoirala3 4:166570fa7fda 11 _pin.period(1.0/frequency);
pkoirala3 4:166570fa7fda 12 _pin = volume/2.0;
pkoirala3 4:166570fa7fda 13 wait(duration);
pkoirala3 4:166570fa7fda 14 _pin = 0.0;
pkoirala3 4:166570fa7fda 15 }
pkoirala3 4:166570fa7fda 16
pkoirala3 4:166570fa7fda 17 private:
pkoirala3 4:166570fa7fda 18 PwmOut _pin;
pkoirala3 4:166570fa7fda 19 };