Leçon 1, Chapitre 1
En cours

Robot intelligent : Contourner les obstacles – Circuit

Yann KIDSHAKER 18 mars 2026

Like in your previous mission, here as well you have little relief. The motors remain connected as they were when you made you made your first ever Smartphone controlled robot. Therefore, we can straight get to connecting the sensor assembly.

Ultrasonic Sensor

We’ll begin by connecting the sensor. Our ultrasonic distance sensor has 4 pins:

  • VCC
  • TRIG
  • ECHO
  • GND

Let’s connect them to evive one by one:

  1. First, connect the VCC pin to the 5V pin on evive using a red male-to-female jumper wire.
  2. Next, connect the GND pin to this GND pin on evive using a black male-to-female wire.
  3. Take another male-to-female jumper wire, say green, and connect the TRIG pin with pin number 3 below the breadboard.
  4. Next, using another wire, say orange, connect the ECHO pin to pin number 4.

Obstacle avoidance with motors without Servo_bb

Calibrating Servo Motor

The servo is in place. It’s time for the servo. But first, we must set the servo angle as 90° using evive’s inbuilt menu to make sure the sensor and the servo are perfectly aligned together so that the sensor works in the same range as that of the servo motor, i.e. 0°-180°. For this, you need to upload the evive firmware to evive. Follow the steps given below to do so:

  1. Open mBlock; if already open and working on a project, save that project. Then, click on New.
  2. From the Robot palette, drag and drop the evive Program block, available under evive Inbuilt Tools extension in the Scripting Area. Then place the upload firmware block, available under the same extension, under the evive Program block.
  3. Once you do this, upload this script to evive by switching to Arduino Mode and selecting the appropriate port, as done in the previous missions.
  4. Next, navigate through the menu as follows: Controls → Servo → Servo 1.
  5. Using the potentiometer knob (the lower knob, next to the TFT screen) set the servo angle at 90°.Servocontrols_menuservo_screen
  6. Once everything is in place, attach the holder to the servo using the servo horn at its base.

Connecting the Servo Motor

Now, it’s finally time to connect the servo. You need three separate male-to-male jumper wires to connect it to evive.

Take three wires – one brown, one red, and one orange. Insert the brown jumper wire in the slot corresponding to the brown servo motor wire; Then, insert the red wire in the slot corresponding to the red servo motor wire. Finally, insert the orange wire in the slot corresponding to the orange servo wire.

Now, we’re going to connect the second end of these wires to evive.

  1. First, take the free end of the brown wire and insert it in GND.
  2. Next, take the red wire and insert its free end into 5V.
  3. Last but not the least, the orange wire goes in pin number 2, below the breadboard.

That’s all agents. Everything is now in place.