home
Embedded Programming Group assignment:
- demonstrate and compare the toolchains and development workflows for available embedded architectures

For the group assignment look at this page for the architecture sections work.

Embedded Programming Indiviudal Assignment:
- browse through the data sheet for a microcontroller

I read the documentation for the the Arduino Mega 2560 Rev3. I chose this microcontroller, because I use it in MIT Motorsports, so it would also be useful for me to learn more about it. One fun fact I learned about this board is that it can process algorithms for 3d printing.

- write and test a program for an embedded system using a microcontroller to interact (with local input &/or output devices) and communicate (with remote wired or wireless connections)

I found this website to be the most helpful for learning about microcontrollers and much of the information needed to understand this project. I chose to work with the QPAD21" which was of medium soldering difficulty. I spent a total of ~3 hours soldering the board with the first hour and a half being me just figuring out how to solder. Once I got the hang of it, the soldering went quickly. I struggled the most with the tack solder. I’m right handed and ended up holding the iron with my left hand as I used tweezers in my right hand to place the component on the board. I also SMD soldered the microcontroller, X, and Y. After I soldered the board, Quentin fixed my soldering on the microcontroller because I didn’t get all the pins, on the screen because I didn’t use enough solder, and on the LED as I soldered it backwards (I found the circuit diagram after I soldered). Then I was able to push code to my arduino and I saw it flash “hello world”. My screen has a chip in it, probably from touching the solder iron to it, but it works and that's enough for me.

For coding my embedded system I started off by combining the example code that Quentin provided on the documentation for the board to connect the button and screen controls. I made it so when the button is pressed, the screen flashes hello world. After that I asked chat gpt to make me the chrome dinosaur game. After that I was ready to “write” my own code. I was inspired by videos I’ve seen of bad UI/UX design to make a phone number entry game. I wanted it to represent bad UI/UX design, but also be a little bit of fun. I started off by writing a plan for my code on paper and was too confident in my ability to code in a language that I’ve never coded in before and as someone who is not a programmer. Here is my conversation with chatgpt which quickly devolved into chatgpt writing the program for me. Though, I would’ve liked to write the code myself, debugging with chatgpt helped me understand how the arduino works and gave me familiarity with some of the functions.

making the pcb
pcb is done!
pcb works

The concept for my program was making it hard for someone to give you their number. I think it’s quite funny to imagine someone asking if they can give you their number and then you take out a pcb board where they need to play a game to enter their number. The game works by flashing 9 digits in a cycle in the form of a phone number. Starting with the first digit, when you see your digit you touch one of the four pads on the left and this freezes that digit and only the digits after it continue to cycle. Which one of the four pads freezes the digit is random. You continue doing this until you type in your number. If at any point you mess up, there is a reset button. However, the reset button will make you start from the beginning.

loading screen
starting game play
game play

Phone Number Game Code

After my disappointment in having chatgpt write the program for me, I decided to write my own program albeit a lot simpler. I made a “disappointment counter” where a counter goes up when you hit a button. This is inspired by a physical disappointment counter that exists in motorsports shop. The code for this was based off the code I wrote where I combined Quentin’s code.

inspiration
disappointment on board

Disappointment Counter Code