While the arduino microcontroller is technically a computer, it doesn’t feel like one when using it. We want to change that by attaching a 64x32 retro display, as well as joystick integration for user input. The inspiration behind this project was our desire to make the Arduino more user friendly. We were also interested in the various protocols used to communicate with displays, and how a microcontroller can be used to display information in real-time on a large display. We were curious about the process of writing a library from scratch to communicate with an LED RGB matrix.
- Write a library to allow the Arduino to communicate with our 64x32 retro LED display
- Implement a joystick to allow the user to interact with the LED display and move a cursor around
- Allow the user to make complex drawings on the LED display
- Allow the user to add text to the LED display
- Allow the user to erase pixels they have drawn
- Use timers to detect various durations of presses of the joystick to embed a variety of functionality in the simple user interface of the joystick
- Short press to change colors
- Medium press to enter text mode
- Long press to clear the display
What it does
The Fake Computer features an 64x32 retro LED display connected to an ATMega2560, with a joystick used for all user input. The user can move the joystick (up, down, and diagonally!) to create drawings and text on the large LED display matrix. The joystick also acts as a multi-function button. If the user presses the joystick down quickly, they can cycle through the color of the "marker"; there are 7 color options: red, green, yellow, blue, magenta, turquoise, and white. Pressing the joystick down quickly for an eighth time will bring the user to a cursor mode, in which they can move around the screen without drawing, as well as erase individual pixels that they have previously drawn. If the user presses the joystick down for a medium amount of time (slightly longer than the quick press used for changing color), they can enter text mode; once in text mode, the user can move the joystick left and right to select a letter and press the joystick down again to draw that letter. This allows the user to write messages on the screen without needing to manually draw each pixel in each letter of the message. Finally, a long press of the joystick allows the user to quickly clear the screen.
Challenges we ran into
The board works by drawing only two rows of pixels at a time, which made drawing to the board a nontrivial exercise. Nonetheless, were able to devise a method in which we draw the matrix of pixels by scanning down the panel two rows at a time, where each row is spaced 16 pixels apart (we start with row 0 and row 15, then move down to row 1 and row 16, etc. until we've drawn the whole board).
Another major challenge was figuring out how the board worked, and which inputs pins did what. The datasheet for the panel wasn’t very helpful, and the individual components soldered to the back of the panel (mostly shift registers) had datasheets that were only written in Chinese. In order to solve this problem, we read about similar panels online and deduced how they work through a lengthy process of trial and error.
Accomplishments that we're proud of
We are most proud of the library that we wrote to allow the Arduino to communicate with the LED display. As explained above, this was not easy at all. We also were able to make this library very robust by abstracting and modularizing the code for complex tasks like drawing text, drawing lines (including diagonal lines), clearing the board, and lighting the board up to be one color. We also wrote code to draw simple shapes like rectangles on the board, but we ultimately decided not to give the user access to this functionality in order to avoid overcomplicating the user interface and user experience. Finally, we are proud of the user interface that we designed. We feel that we were able to design a user experience that is simple, powerful, and intuitive by making use of only a single joystick. We put a great deal of thought into how the joystick could best be used to give the user fine control over their drawings, and we believe we succeeded in this respect.