Input Device
Debugging the Board
I want to have two inputs in my final project's board design: a camera and a keypad. The first step, however, was to realize why my board wasn't reacting to any Arduino code I was trying to flush it with. I met with Anthony over OH and realized that I have been using the wrong microcontroller definition on the Arduino software; ESP32-S3 instead of Xiao ESP32-S3. After trying my embedded code with the correct microcontroller defined, I was able to make the servo motor move and the led light up repeatedly. Until it stopped abruptly. Anthony helped me probe the GPIOs and we realized there's a short circuit in the board. Apparently I fried it because once electricity started running through the board, it was shortened by the chip's bottom conductors touching the copper board. I didn't think about taping the board behind the back of the controller before I soldered it.
Fixing the Board
Next, Anthony taught me how to de-solder, and with some help from him and the hot air table, we got the burnt Xiao ESP32-S3 out without frying the whole board too much. Now, I could use the de-soldering tape to absorb what was left of the soldering material and try again with a new controler. The problem was that the EECS workshop was all out of Xiao ESP32-S3s and I didn't find any in the architecture workshop. I asked on the Gitlab issues and Jen was very helpful in pointing me to the right place in the arch workshop, however it was already too late for me because I had already soldered a Xiao ESP32-C3 as an interim solution for this week. The plan was to get ahead with the keypad input in the meantime (which Anthony said would qualify as this week's assignment), later making a better version of the board (with other corrections I had to make from previous weeks alterations anyhow) - to which I will solder the ESP32-S3 and the camera.
This time around I made sure to tape the board before soldering the ESP32-C3.
Keypad Input Implementation
I got it to work with the draft (repeatedly lighting the led and moving the servo with no input), and then it was time to check it with the actual code integrating the keypad.
At first I had issues with flushing the controller with new software, I tried forced rebooting and restarting of it, disconnecting and reconneting to power, holding the reboot button pressed while uploading the new code, nothing worked. Eventually I came across a good tip over Reddit which suggested using esptool to erase the flash memory of the controller before trying to upload new code. This worked and I was able to upload the code to the controller.
Here's a link to the Arduino code snippet.