- The microcontroller is the brain of the robot. Just like the brain processes signals from eyes/ears and tells muscles what to do, the MCU processes sensor data and controls motors/grippers.
- It processes sensor inputs, applies algorithms (like PID for line following), and sends control signals to actuators.
- Without the MCU, sensors and actuators would work in isolation with no coordination.
- The MCU reads data from sensors (line sensors, color sensor, proximity sensor, etc.) using its input pins (digital or analog).
- It executes programmed logic (C/C++ or Arduino code) to make decisions.
- A microcontroller is programmed using an IDE (Integrated Development Environment), the most common IDE is Arduino IDE.
- Few sophisticated IDEs are platform.io with VS code, ESP-IDF and STM32CUBEIDE (tailor made for esp and stm respectively).
- Based on logic, it outputs PWM, direction signals, or digital commands to drivers/servos.
- It also handles communication (Bluetooth, UART, I2C, SPI) between modules.
- Arduino is an 8-bit MCU whereas ESP and STM are 32-bit (esp32 stm32).
- Arduino UNO / Nano (ATmega328P): beginner-friendly, cheap, widely used.
- ESP32: dual-core, built-in WiFi/Bluetooth, higher ADC resolution, useful for advanced robots.
- STM32 (e.g., STM32F4 series): powerful ARM Cortex MCUs, used in more professional robots.
ARDUINO 101: Arduino crash course by Mark Rober Arduino explained Arduino in 100 seconds (what is a microcontroller and why does it exist - HIGHLY RECOMMENDED FOR BEGINNERS)
ESP32 101: Arduino to ESP Esp driver fix ESP32 platformIO - VS code
STM32 101: STM32