In this lesson, we will use the Espro Board  to make an object follow project.

Hardware:
Espro Robot Control board
Chassis and motor system same as lesson 1
Two IR object sensors


Pre-Connected GPIO pins between ESP32 and I/O devices

L293 Pin ESP32 GPIO Function
IN1 23 Motor A Direction 1
IN2 25 Motor A Direction 2
IN3 26 Motor B Direction 1
IN4 27 Motor B Direction 2
ENA 16 Motor A Speed (PWM)
ENB 17 Motor B Speed (PWM)
Ultrasonic Sensor Slot
Object Sensor VCC GND Left Out Right Out
ESP32 GPIO 3V3 GND GPIO 15 GPIO 14

Software Installation Guide:

Step 1)Install ESP32 Arduino Board 
Connect the Espro Board to Desktop or Laptop computer with Type-C USB cable.
In Arduino Setting->Preference, please copy and past following link into Board Manager Url field:
https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json
After you select OK, then in Tool->Board->board Manager, Search ESP32 and Add ESP32 into Board Manager.
then in Tool->Board, select esp32 ->ESP32 Dev Module

Then Select correct port which matches ESP32 board.

Step 2) Download Correct Sample Code and Upload to Arduino.

Sample Code:
https://github.com/osoyoo/espro_objectfollow/blob/main/objectfollow.ino

 

Left Sensor Signal VCC GND
Espro GPIO 15 3.3V GND
Right sensor Pin Signal VCC GND
Espro GPIO 14 3.3V GND