robowordle_demo.mov
- Precise 3D printer movement
- 3D printed stylus holder and camera mount for keypresses and image acquiration
- Fiducial detection and dewarping to make system robust against suboptimal camera position / angle
- Image processing with OpenCV for color identification
This project is not designed for widespread use, but if you do want to make it, here are the setup instructions.
opencv-python
printrun
numpy
pyserial
- Print out the fiducial sheet (must be original size, otherwise the scale will be wrong) and attach to 3D printer
- Attach stylus to the print head (I designed this mount, but it will differ depending on the printer and stylus you use). Note that the stylus must be in contact with a sufficiently large conductive object for the capacitive touch to work (I used an alligator clip attached to the printer frame)
- Mount the camera (placement does not need to be precise as long as all four fiducials are clearly visible).
- This step is only necessary if you are calibrating for a device that has dimensions different from my iPhone 6.
- Place the phone on the fiducial sheet and run
dewarp.py
; this will produce a dewarped image like this: - Run
testing/marker.py
to determine the location of each key. Click each key on the in order to mark the position; once all 27 keys (delete key is not used) are selected, copy-paste the positions toconfig.py
- Run
testing/grid_finder.py
- click the top-left and lower-right corners of the Wordle grid, then copy-paste the positions toconfig.py
as well.
- Place the phone on the fiducial sheet and run
- Connect the 3D printer to your laptop and run
printer_control.py
. This will allow you to directly interface with the printer via G-code commands. Slowly control the printer until the stylus head is exactly positioned over the lower-left corner of the lower-left fiducial. Make note of the X and Y values of the printer, and edit the respective values inconfig.py
. - Cross your fingers and run
main.py
.
- automatic end-of-game detection
- more robust color detection
- support for more devices