Rubik’s Cube Solving Robot

vindar has created S.A.R.C.A.S.M: a Slightly Annoying Rubik’s Cube Automatic Solving Robot! This self-contained Teensy 4.1-powered machine is compatible with any standard Rubik’s Cube and requires no external computation to solve cubes.

Designed as an over-the-top desk toy, S.A.R.C.A.S.M. is charged and programmed via USB-C. vindar’s Teensy port of Kociemba’s algorithm computes the solution after the board decodes the JPEG received from the ESP32-CAM.

vindar frequently uses Teensy for his projects, but says that for once, using a Teensy 4.1 does not feel like overkill. The Teensy not only runs the Kociemba algorithm to solve the cube, it’s driving the display, running real time audio, driving 2 servos and 1 stepper motor, driving RGBW LEDs,and delivering real-time 2D/3D graphics.

The large codebase for this project uses many different libraries to bring together many functions such graphics, audio, lighting, image capture moves computation, and motor control and movement to create a slightly annoying, but remarkably charming robot that excels at solving any standard Rubic’s Cube. The real-time feedback paired with the over 900 dialogs and 100 songs make SARCASM feel alive.

A custom PCB and 3d-printed enclosure hold it all together. Code and schematics are available on GitHub, and you can see it in action in the video below!