Learning Embedded
Being Lost Together
We had a lot of luaghs in the architecture section trying to feel our way as to how to start this week's assignment. Luckily we got some very kind help from the CBA team and with some terminology baseline (and a little help from ChatGPT - "what is the difference between a microcontroller and a processor? Are all microcontrollers processors?"), we managed to assemble our group assignment looking into different options for embbeded programming architectures.
Xiao ESP32S3
Since I have zero experience in embedded programming architectures and it was Saturday night, I had to have a short chat with my digital TA. So that on Monday I'd be able to (hopefully) come to the human TA's office hours with more informed questions.
After ChatGPT suggested some microcontrollers which were compatible with my vision for the final project, I looked them up in the class's inventory list. ESP32 was on the inventory as Xiao ESP32S3. Anthony mentioned the Xiao in recitation as a powerful processor with easy loading capabilities, so I reiterated with ChatGPT to make sure the ESP32 and the Xiao ESP32S3 are similar enough and what are the differences between them, eventually deciding to focus on the Xiao ESP32S3.
The image on the left is taken from the microcontroller's data sheet. Here are some other features from the datasheet:
- It incorporates the ESP32-C3 32-bit RISC-V chip, operating up to 160 MHz, mounted multiple development ports
- There are 400 KB SRAM & 4 MB Flash on the chip
- It is 21 x 17.5mm big (which is very cool!)
- Provide 4 working modes as low as 44μA in deep sleep mode, while supporting lithium battery charge management
- It's supported by Arduino / CircuitPython
- pins are not included
Simulating
I started off on the Wokwi website by choosing an ESP32-C3 template. After reading the simulation manuals for the chip and the Servo, I was able to connect the components to the right pins. Then, I used the tutorial from Wokwi to understand the logic of writing code for the Servo engine, and ChatGPT to help me get the syntax right for my controller. And eventually it worked!
For the last step I added a keypad as an iput, moving the servo with the right code
Here's a link to the Wokwi project.