/esp-buggy

Line Following Robot

Primary LanguageCMIT LicenseMIT

Embedded Systems Project 2021/2022

Line Following Robot (LFR) 🚓

Build GCC_ARM Style Check C++ Syntax Check Doxygen Action
Documentation for this project can be accessed through this link.

Dependencies 📌

Mbed OS 6.15.1
QEI by David Smart and Aaron Berk
PID by Aaron Berk

Installation 📋

  1. Install the latest Mbed Studio or use the online Arm Keil Studio.

  2. Import this repository.

    git clone https://github.com/nazmi/esp-buggy
  3. Compile main.cpp using the compiler.

  4. Upload the binary file to the NUCLEO-F401RE through USB.

NOTE: You need to replace some of the MACROS values, and PID parameters based on your specifications.

Run on Docker 🐋

Follow the steps below (run in bash/cmd/terminal)

# Pull the latest image
docker pull nazmiropi/esp-buggy:latest

# Run the image in a container
docker run -d -it nazmiropi/esp-buggy:latest

# Get containerID
docker ps

# (Optional) Copy projects files into the host machine
docker cp <containerID>:root/esp-buggy <relativePath> 

# Two known issues
# (cmd/PowerShell) Attach to containerID
docker attach <containerID>
# (git-bash) Attach to containerID
winpty docker attach <containerID>

# Compile to check any problem
mbed compile -t GCC_ARM -m NUCLEO_F401RE --profile release

# Docker image has reduced version of mbed-os with removed targets.
# If you want to compile for other targets, you must deploy mbed-os again.
mbed deploy

NOTE: Attach to the running container in VSCode, navigate to /root/esp-buggy and start developing.

Troubleshooting 🩺

  1. Mbed Studio 1.4.3 has linter problems when using GCC_ARM, but it can compile the program. Use MbedStudio 1.4.1 or compile with ARMC6 toolchain to solve this problem.
  2. Some of the libraries might not work if you want to import and use them on Mbed OS 6, I have made modifications to some of them to replace the deprecated functions from Mbed 2. This can be done by referring to the latest API list from Mbed OS 6 documentation.

NOTE: You can use the joystick, potentiometer, and LCD on the application shield to help debug your program.

Components 🛒

You can buy any component you like, but the table below will help if you want to build the robot without thinking about the selection of the parts.

Component Quantity
NUCLEO-F401RE 1
RS Pro DC Motor 2
Broadcom Magnetic Incremental Encoder 2
Motor Driver Board 1
TCRT5000 1
HM-10 BLE 1

Contributing 👨‍💻

Contributors are welcome. Please create a pull request and raise any issue to discuss.

Contributors 👷‍♂️

Special thanks to my supervisor and every group member that helped in this project (in no particular order).

Dr Subhasish Chakraborty
Ibrahim, Euan, Joseph, Zech, Eric