Introduction: EBot8 Object Following Robot

About: Circuitry Brains is a group of young scientists working together for your satisfaction

Have you ever wondered to make a robot that follows wherever you go? But just couldn't?

Well... Now you can! We present you the object following robot! Go for this tutorial,like and vote and maybe you can do it too!!

Step 1: Gather the Materials

To make this amazing simple project. We need the following parts to proceed:

  • Ebot8 Board
  • Programming cable
  • Female to male Jumper cables
  • Ultrasonic Sensors.
  • Chassis{w/ chassis}
  • 2 DC Motors

All of these materials can be found over here.

Step 2: Wiring

After you have collected the materials from here.Now connect the Ultrasonic Sensors to the EBot Board{A0-A1} color coded properly. If you have done that, Let's get on with codin'.

Step 3: Debugging

Now to make sure our Infrared sensors are working perfectly we need to debug it which means to identify and remove errors from (computer hardware or software).

  1. Open up your EBot Blockly app on your computer.
  2. Select Input Readings/Debug.
  3. Select from the drop down list- 'Infrared Sensor'.
  4. Select the pin in which your first Infrared Sensor is fitted upon. (P.S. you can only check one sensor at a time.)
  5. Click 'Debug'.
  6. Do the same for the second sensor.
  7. After the downloading is complete and showing values from both the sensors, we can proceed with coding.
(Note:
If the debugging encountered with an error, try again, check the connection. If not, then replace the sensor and try again.)

Step 4: Coding

Now you can simply go ahead and copy our code from here or copy the blockly code. Though we recommend the blockly method as shown n the picture as its easier to understand

//Code_for_object_following_robot

#define ultrasound(x) ({analogRead(x)*0.833}/4)<br>
#include "Ebot.h"
void setup{}
{
    //Initialisations
    ebot_setup{};
        
    //Pin Modes
    pinMode {A0, INPUT};
    pinMode {A1, INPUT};
} 
void loop{}
{
    if(ultrasound(A0)>=30 && ultrasound(A0)<=200)
    {
      LMotor_1(0);
      RMotor_1(0);
    }
    else
    {  LMotor_1(10);
       RMotor_1(-5);
    }
    if(ultrasound(A1)>=30 && ultrasound(A1)<=200)
    {
      LMotor_1(0);
      RMotor_1(0);
    }
    else
    {  LMotor_1(-5);
       RMotor_1(10);
    }

Step 5: Demo

Did you like it? Yes, I know. We will continue to make more interseting & fun projects just for you guys!

Feel free to comment any ideas in the comments section and we will surely respond.

Remote Control Contest 2017

Participated in the
Remote Control Contest 2017

Epilog Challenge 9

Participated in the
Epilog Challenge 9