April 12th
The manager of the physical computing lab, Zach sent me the raspberry Pi 3b for building our project. The first iteration of our work is using Teachable Machine and Open AI to build an interactive device that can help people that cannot be physically together to form a more casual and subtle way of “soft communication”.
We set up the new raspberry pi and installed the latest version of raspberry os on our Pi, and tried to attach the newly bought camera to the pi. But strange things happened. We found that the correctly plugged camera can be detected and loaded, but it cannot capture images after debugging according to various tutorials on the Internet. In this case, we have to use a USB webcam instead, which requires us to install OpenCV and OpenCV-python to make it function normally. Due to unknown reasons, maybe the poor performance of the device or version of the software, we failed to install the OpenCV library.
After rounds of discussion, we found that the previous propositions of the project were too general and had to be narrowed down to deliver our core thoughts of us. Finally, we decide to integrate an old typewriter to produce a sense of ritual and nostalgia in terms of communication. Then we together explored some online shopping platforms and placed an order for an old typewriter. We also started to reach out to find if there were any raspberry pi 4b available for us to use in this final project.
We got a raspberry pi 4b from one of our friends. This performance of raspberry pi 4b is really impressive and the OpenCV library was correctly installed, though it took 5 hours in total to achieve this. But the problem with the camera still existed, we assumed that the problem is related to the camera instead of the raspberry pi 3b. After plugging in the webcam, we wrote some python code to test the functionality of OpenCV to see whether the library worked correctly and it worked.
We received the typewriter. After a long journey from Maine to Pittsburgh, the machine looked good and we spent some time learning how to use it. We started looking for methods about how to transfer the information of the keys typed on the machine to computers, Arduino, or other computing devices. After the research, we found 2 ways to achieve the wanted functionality. The first method is to put a PCB board under the machine. More specifically, since the base bars of the keys on the typewriter will reach the same level after being pressed, we were able to utilize the metal base bars as the conductor to connect two separated resistors on the circuit board. Thus different combinations of key pressing can help us form different circus, which helps to send signals to the computer. The other way is using OpenCV and Tesseract(a machine learning-based text recognizing software). The webcam connected to the raspberry pi will collect the image of texts typed with the machine, and the Tesseract will recognize the texts being typed and parse the texts into lines of meaningful information. Since there were only 12 days before the final exhibition of our projects, nobody could guarantee that the PCB board will be produced and delivered in time. In this case, we began to dive into the implementation of the camera.
Being worried about whether the performance of raspberry pi could install Tesseract software successfully and function as expected, we started our experiment of setting up the runtime environment and testing the functionality. Being a relatively large software, it took half an hour to install Tesseract and the supporting libraries. Though not performing perfectly in the first several trials, we made it clear that the path we selected was totally feasible.
We got our thermal printer. Due to unknown reasons, it kept printing out random characters under the circumstances where we believe we had set up the codes correctly. We thought it to be a problem with our own printer. But when we borrowed another one from IdeAte, it also did not work properly. With the problem unresolved, we decided to complete the code which would be uploaded to particle board first.
The problem with our printer turns out to be the adapter. The old adapter cannot provide enough voltage to power the printer. When we used a 15V adapter to drive it, the printer worked just as expected. Then we started combining the whole system at both sides: particle board and thermal printer, raspberry pi and the typewriter. The system worked fine after several tests.
To make the final product look better, we decide to make wooden shells for all the naked components to create a more natural and warm texture. The work went on smoothly and we were satisfactory about the wooden shells that we created. There was one final step left: setting up button to let user send the message. We were using the GPIO ports on the raspberry pi. When the connected button is pressed, the message will be sent to the particle board on the other side and transfer data for the printer to print.
Install and set up in the exhibition site.