Arduino from scratch
Hello! Welcome
Today we are going to discover the world of ESP32, from scratch!
What is the ESP32?
The ESP32 is an advanced microcontroller developed by Espressif.
It is known for its ability to connect to WiFi and Bluetooth, making it ideal for IoT (Internet of Things) projects.
Common Models
There are several models of ESP32 available. The traditional ESP32, the ESP32-S2, and the ESP32-S3.
Each model has its own features. But generally, the ESP32-S3 is the current flagship
Additionally, each one is mounted on different development boards. This can be a bit confusing at first!
How does the ESP32 work?
The ESP32 works by executing a program loaded into its memory autonomously.
It is programmed from a computer, and once the code is uploaded, the ESP32 can run it without being connected to the computer.
You’re doing great!
Now let’s talk about the hardware
Inputs on ESP32
The inputs of the ESP32 allow you to collect data from the environment, using sensors to measure things like temperature and light.
The outputs of the ESP32 allow you to control physical devices, such as turning on LEDs or activating motors.
Serial Communication
Serial communication helps you send and receive data between the ESP32 and your computer, useful for monitoring and debugging.
The serial port is very useful for sending and receiving data from the computer and for testing functionality.
WiFi and Bluetooth
The ESP32 has WiFi and Bluetooth built-in, making it easy to connect and communicate with networks and other devices.
This means it can connect to networks or communicate with other devices, enabling IoT projects and wireless communication
Sensors and Actuators
Connect sensors to the ESP32 to capture information from the environment, such as temperature or humidity, and use that data in your projects.
Actuators allow the ESP32 to perform physical actions, such as turning on lights or moving motors.
Powering the ESP32
The ESP32 can be powered with a USB cable or a battery, allowing you to use it in portable projects.
To extend battery life, you can use Sleep modes, which allow us to minimize power consumption!
You’re almost there!
We just need to see how to program your ESP32
Easy Programming
Don’t worry if you’re new to programming. The ESP32 is programmed with Arduino or MicroPython, both accessible for beginners.
With just a few lines of code, you can write programs for your projects.
Install the Software
To program the ESP32, you will need a development environment (IDE).
You can use:
- The Arduino IDE by adding Espressif boards
- Thony IDE for MicroPython
- VS Code + PlatformIO (my favorite option)
Write Your First Code
Start with a simple project, like turning on an LED. This is a good exercise to ensure everything works correctly.
From there, you can start trying more complicated things!
Well done!
You now have the basic knowledge to get started with ESP32! Keep learning and creating.