Inspiration
This idea stemmed from our prior experiences. Within the four of us, there were two strong backgrounds present; Akhil and I had a strong engineering background, whereas Jason and Deven were weathered and experienced coders. We sought to build a hardware hack, and this inspiration combined with our strengths and the theme led us to pursue a physical device to play Wordle(the theme of this hackathon) on!
What it does
This device is a physical prototype of an offline and simplistic Wordle device. Ideally, A button system is used to input words into the machine, and the wordle interface is displayed within two lines on an LCD display. However, in a last minute time crunch due to a faulty LCD, we had to use a typed input method using a keyboard to reduce complexity. To display which letters are correct, or which letters are correct but not in the correct slot, there are yellow and green LEDs. These are meant to mimic the yellow and green within Wordle. For what would be the gray letters in Wordle, or those letters which are not in the word at all, the LEDs don’t flash at all.
How we built it
There are two structures built for this project. One interface is the programming interface, and the other is the physical handheld prototype. We first began with extensive brainstorming, writing all of our ideas on the walls and conceptualizing what we wanted to do. Our basis was the Hardware hack, so with whatever materials we could scrounge from around the school, we began the design process
For the handheld prototype, we wired up a simple prototype handheld, including 5 buttons, 3 LEDs, and an LCD. We wired these using wires, a breadboard, an Arduino Uno, LEDs, and an LCD.
The hard part of this invention was the programming. Our two coders had to code the entirety of Wordle in C++ and port it to Arduino, all within the given hours. They began coding it within vscode, and then put that code into Arduino and debugged it. This was the hardest part of the project.
Challenges we ran into
Of course, when programming there are many challenges to overcome. The initial brainstorming phase took a few hours, as we had to plan out the entire project before initial coding to save time and stop any confusion. We then began to actually code, and a few of the problems we came across were the amount of memory in the arduino chip itself. When using our word picking array of words to pick from, the same array that the official Wordle uses, we found that the amount of memory needed was about 280% of what the arduino could handle. To solve this, we decided to shorten the array by randomly picking about 100 words. Another error we encountered was the conversion between strings and characters in the actual code. Our arduino was only able to process a single type of variable at a time, instead of printing a string that was made by combining multiple different data types. We solved this by splitting up the lcd.Print command into many different lines for each data type. This caused a bit of extra memory to be used, however it was low enough that the arduino could still function optimally. But how do you pick your guess word? ‘In order to reduce complication, we moved the input of words to a computer for the time being via the Arduino serial monitor. Considering we were dealing with a very simple arduino chip with very limited forms of input, this was the most efficient solution we could fabricate within the time window we had. However, then another challenge arised. The LCD display was faulty, it would not respond to any commands we gave it, even the most basic. With whatever time we had left, we worked on a whole new input method, as a prototype. This prototype would be made in TinkerCAD which had some issues of it’s own. TinkerCAD isn’t very fast at simulating arduino code and wiring. This caused the debugging stage to be severely slowed down as it took almost twice as long to do the same thing as 1 second in TinkerCAD took 2 seconds in real life.
Accomplishments that we're proud of
I’m proud of our tenacity and willingness not to collapse from exhaustion while we were trouble shooting the various bugs and syntax errors that always come with a first attempt at coding a program.
I’m proud that through all the obstacles that we encountered, we persisted through them all and made an end product that works and works as intended.
I’m proud that I can safely say that group alone had the collective lack of braincells to try to put wordle on an arduino of all things
What we learned
C++ is annoying and we should have done more research on its syntax before trying to code something with c++ for the first time.
Dr. Chapin was right, whiteboard does help coding but when you whiteboard too much, the walls of the engineering hallway look like an insane asylum.
We also learned that you should wrote code in smaller intervals. When you write a massive amount of code, and had hardware, you have to trust that they both work, and work correctly. Otherwise you don’t know what exactly isn’t working and why.
What's next for Portable Wordle
What is next for Portable Wordle is likely a custom PCB and housing for the system after we finish the physical prototype. We could keep the traditional design with the LEDs, or introduce a colored LCD.
https://drive.google.com/file/d/1UuNzujaiPMRNu12QaDEpUFKqmfVk5Btn/view?usp=sharing
Built With
- arduino
- vscode
Log in or sign up for Devpost to join the conversation.