For this week's assignment, I wanted to do something that would help towards my final project. Therefore, I decided to control a servo motor. I took my PCB from last week and didn't need to make any changes. I already had pins for the motor, thankfully. The next thing I needed to do was understand the requirements of the servo. I am using the Miuzei MG90S Micro Servo which has 3 wires: ground, VCC, and control. On the ATTiny 412 on the board, I decided to use PA1.
Since I was pretty set hardware-wise, I wrote up some code to control the servo.
I didn't run into many issues surprisingly. The library issue for the MegaTiny was resolved. I had an issue with the 2.3.3 version of Arduino IDE, so that slowed me down a bit, but I was able to download a new version. I also ran into some coding trouble when it came to calling the pins because for some reason pin 1 is actually pin 4 but you can't even code it as 1 or 4, and instead, it has to be PIN_PA1 which caused some confusion. But alas, I got it working.