4. EMBEDDED PROGRAMMING
For this week, our global and local teachers asked us to research microcontrollers, their advantages and disadvantages by comparing them using the microcontrollers' datasheets. Then we must write a program for the chosen microcontroller and simulate its operation to interact (input and output); as well as communicate (remote wired or wireless).
- MCU´S -
After reviewing the microcontrollers' datasheets, I narrowed it down to 3 options; I will give you some points from the datasheets of these 3, and I will tell you the advantages and disadvantages of each of them, and which one I considered to be the best option to then create a program with this week's requirements.

Features | ESP32-WROOM |
---|---|
CPU: | Tensilica Xtensa LX6 dual-core processor clk spd - 240MHz |
Storage: | Up to 4MB Flash memory, 520KB SRAM |
Power: | 3.0V -3.6V |
ADC: | 18 channels of 12 bits |
DAC: | 2 channels of 8 bits |
PWM: | 16 channels |
Timers: | 4 timers of 64 bits |
Wifi and Bluetooth: | Both integrated |
Datasheet: | ESP32-WROOM |
After searching different sites, I was able to decide which is the best option for the project. I had to take into account some considerations that are necessary to complete the project. The specifications I took most into account to make a decision were the following:
- NECESSARY´s SPECIFICATIONS -
- 0. FOR LOCKER CONTROL
- - PWM:
- A channel per servo of the locker
- - GPIO :
- 2 pins for servo (signal and power)
- Extra pins for door sensors
- Status indicator LED´s
- 01. FOR VOICE RECOGNITION
- - CPU:
- Voice pattern processing needs high speed
- Compare voice with stored patterns in real time
- - Storage:
- Needs a good storage size
- 02. FOR USERS INTERFACE
- - I2C (SDA, SLC):
- Show system status
- Acces indicators
- - Additional pins:
- Presence senso
- Compare voice with stored patterns in real time
- 03. CONNECTIVITY
- - Wifi/Bluetooth for:
- Control app
- Access logs
- 04. FUTURE EXPANSIONS
- - Free pins for:
- Biometric sensors
- Backup keypad
- - Additional RAM for :
- More users
- New functions
In summary, the best option for the locker project is the ESP32-WROOM microcontroller. That's why this week I created this program simulating an exercise with the microcontroller that I consider is the best option for my final project. This code is in C++ language - it turns on an LED with a button and I can change its brightness using the potentiometer. This code meets the requirements for the week. I'm including the video of how it works, along with its code
Here you can see the code and connections: WOKWI.COM