This week, I continued to work on the Arduino code to process data and accordingly spin the motors a specific number of steps. First, Yujun and I worked to find a .txt file reader library for Arduino to import the encoding outputs from the Python translation program. However, I later found it was buggy as these libraries were not very sophisticated. So, I researched and updated our Python program, translation.py, with pyserial for serial communication directly with Arduino. I also built onto our Arduino code (stepper motor control and I/O) to also interface with the translation.py code. With this new mode of communication and processing, translation.py sends the binary encodings one cell at a time to the Arduino, which then processes the encodings, moves the two motors for a cell to actuate the pattern, and then sends a signal to translation.py when “next word” button is clicked. The reason for one cell at a time is that we are first finalizing functionality for only one cell before manufacturing and assembling the other nine cells for our final device. The code will meanwhile be updated to process and display one word at a time instead of one cell, as desired. My progress is now on schedule. For next week, I aim to:
– Move the serial communication between the web app Python programs and Arduino to wifi with our ESP32 board. Will work with Yujun on this step.
– I also aim to finalize fitting the motors and linear gear to our pending 3D printed housing parts. This step is crucial to then properly advance to manufacturing and assembling the physical hardware of the device.