Programming

FPGA G-Sensor Reading

Video_demonstration.mp4

For the final project in my Embedded Design class, I created a program to display the x-axis value the DE1Soc FPGA on the seven segment displays. The first part of the project involved object oriented programming in C++ to read the x value from the accelerometer. These values ranged from -1000 to 1000. The second part of the project involved using Quartus to convert these x values to angles between 0 and 180 degrees. The angles displayed were in multiples of 9 which was not precise. Given more time, I would've liked to experiment with Quartus to see if there was a better equation I could've used. 

Hangman in C++

I created this game in my free time to learn more about C++.  At the time, I had not learned about object-oriented programming, so I researched how to use it to organize this project. I had already learned arrays but had not learned vectors, so I taught myself how to use vectors as well. 

This version of Hangman was meant to be played in the terminal. It featured two game modes: an auto-generated word or a player-made word. The player could choose from easy, medium, or hard for the auto-generated word or input any string consisting of letters, dashes, spaces, or apostrophes. The auto-generated word was randomly chosen from an array using a time-based seed. I used vectors to keep track of and display the characters in the mystery word. Only letters were hidden, and dashes, apostrophes, and spaces were shown to the guesser. The player had the option to guess a letter or enter '1' to guess the whole word. Once the word was guessed, the player got the option to play again. 

The user had many chances to input letters or words into this program, but there was a chance a user could use an invalid input. I programmed it so that any prompt for an input would not move on until a valid input type was put in. The goal was to not have the program throw an error at any time. 

Ultimate Tic-Tac-Toe in Python

This game was created as a final project in my Computing Fundamentals class. I used object-oriented programming to create a more complex version of tic-tac-toe. It is a tic-tac-toe board with a smaller tic-tac-toe board in each square. In order to win a square, the board inside of it must be won. Players must make their move in the larger square that corresponds to the smaller square of their opponent's previous turn.  If the square were full, then it would be a free choice. I created two game modes. One game mode featured a bot that made strategic moves against the player and the other was two-player mode.  

As before, I had to make sure this program did not throw an error at an invalid input. Any input prompts did not move on until the correct input type was entered. I had issues making the bot because there were so many strategies that it was impossible to account for every scenario. In the next version of the game, it might be helpful to research machine learning for that purpose.