Getting Started¶
1. What is a Microcontroller?¶
A microcontroller is a compact integrated circuit designed to perform specific tasks within an embedded system. Unlike general-purpose computers, microcontrollers are optimized for controlling devices, sensors, and actuators in real-time applications. Key characteristics:
- Low power consumption
- Real-time processing capabilities
- Integration of CPU, memory, and peripherals on a single chip
Microcontrollers are widely used in automation, robotics, IoT devices, and industrial control systems.
2. Course Hardware and Tools¶
In this course, we will use the following components and tools:
2.1. ESP32 Microcontroller¶
The ESP32 is a powerful and versatile microcontroller featuring:
- Dual-core processor
- Built-in Wi-Fi and Bluetooth
- Multiple GPIO pins for sensors and actuators
- Support for various communication protocols (I2C, SPI, UART)
2.2. Wokwi Simulator¶
Wokwi is an online simulator that allows you to:
- Prototype circuits without physical hardware
- Test and debug Arduino, ESP32, and other microcontrollers projects
- Visualize sensor and actuator behavior in simulated real-time
2.3. Arduino IDE¶
The Arduino Integrated Development Environment (IDE) will be our main programming tool. It provides:
- A simple interface for writing and uploading code
- Extensive libraries for sensors, displays, and communication
- Cross-platform compatibility (Windows, macOS, Linux)
2.4. M5Core2 Development Kit¶
The M5Core2 is an ESP32-based device with:
- A touchscreen display
- Built-in sensors and expansion ports
- A modular design for rapid prototyping
3. Additional Programming Material¶
If you don't feel confident enough to follow the content of this course due to lack of programming knowledge, or maybe you've taken a course on coding before but it's been a while since since then and don't remember well how to do it, here you have some extra material that could help you.
In this course we'll code ESP32-based microcontrollers in C/C++ usign the Arduino IDE.
There are several sources of information in the internet you could use for free. Here are the ones I find the most useful for the purpose of this course:
3.1. Learn C++¶
In this website you have all the necessary information on how to program in C++. Including many elements that go beyond the content of this course.
3.2. Luis Llamas' Introduction to Programming Course¶
This is a course that covers general topics of programming (you can find it in Engish and Spanish). In many of the entries you can find examples in different languages (don't forget to select C/C++). The list below shows:
- The Minimum concepts you should know before taking this course. Without this knowledge, it'd be hard for you to follow this course.
- The Desired concepts to have before taking this course. It completes the previous list and if you have them, you'll be able to follow the course without any problem.
- The Advanced concepts. It completes the two preivious lists. If you have the, your code knowdlege exceedes the required for this course.
3.2.1. Minimum concepts¶
-
Introduction
-
Fundamentals
-
Frequent Concepts
-
Tools
-
Program Structure
-
Expressions and Operators
-
Variables
-
Data Types
-
Common types
-
Control Flow
-
Conditionals
-
Loops
-
Functions
3.2.2. Desired concepts¶
-
Fundamentals
-
Tools
-
Variables
-
References
-
Conditionals
-
Loops
-
Functions
-
Collections
-
Data Structures
3.2.3. Advanced concepts¶
-
Fundamentals
-
Tools
-
Variables
-
Data Types
-
Common types
-
References
-
Control Flow
-
Conditionals
-
Loops
-
Functions
-
Collections
-
Data Structures
-
Asynchrony
4. Additional ESP32 Material¶
More material about how to program microcontrollers (ESP32, in particular) can be found in Luis Llamas' website, here and here. Some of this material will be covered in our course.