![]() Sometimes, when I was bored, I’d try my hand, but thirteen-year-old me never had the attention span to work on it for more than a couple of minutes. At his fastest, he could complete one in under a minute. However, I really slapped the code together in a mess, since I simply copy and pasted 6 separate windows, with almost identical functions.When my brother was in middle school, he loved solving Rubik’s Cubes - he’d spend hours on the computer watching videos about how to manipulate the colorful squares. Finally I made 5 more windows that would pop up one after the other, and transfer the colours entered into a local array in the script. I also added buttons that would change colour each time they were clicked. Then I turned the 3×3 array of buttons into something resembling a cube and added a few buttons. I needed a better way of entering the cube state than directly typing them into the Arduino sketch, so I got the idea of creating a GUI from this robot: īecause I’m new to making Tkinter GUI’s (Graphical user interface) and didn’t want to make one from scratch, I found a tic tac toe GUI here. ![]() This way, the program can simulate the cube move before it physically executes it. The program reassigns the values in the arrays to simulate and cube rotation. One major breakthrough I had was that I actually simulated the cube’s movements in the program. Here’s a basic overview of the code structure (layers of abstraction):Ĭube Decide functions < Cube Algorithms < Cube Move functions < Servo functions < Move Function ![]() The cube notation and algorithms control the servo functions, such as push_cube() or rotate_one(). Within each stage, such as cube_decide_cross() (solving the cross), the program would check for specific locations of colours in the cube, and if an algorithm was matched with the condition, cube notation like ‘U’ (Up) or entire algorithms, like fix_cross_instance_1() would be run.Ĥ. Using a basic layer by layer method of solving the Rubik’s cube, I made a function, cube_decide(), that goes through each stage or the cube solving process.ģ. There are 6 char arrays represent each face of the cube.Ģ. It basically uses algorithms to manipulate the cube colours:ġ. There are 3 main parts of my code: the algortihm, GUI (enter cube state) and the serial communications So basically the code I wrote uses combinations of pushes, holds and platform rotations to apply algorithms to the cube. Honestly building the physical solver was a lot harder and complex than I expected, so if you have any questions on how I built the solver, just ask. – Glued wooden wheels that act as washers on each end. – I drilled a hole into ends of the popsicle sticks. ![]() Slanted sticks to prevent the cube from snagging. I haven’t documented every step of the build process, but I think you can reproduce the tilted twister design with a few tweaks:ġ. When I first tried to build the solver, I tried to follow building instructions here:īut I was pretty lazy and didn’t follow the instructions, so I made a wooden replica with a few tweaks. So here’s how the mechanism basically works:ġ. I looked at a few designs but settled on the Tilted Twister because it only required 2 servos to operate, which wasn’t as complex mechanically as other robots such as the Cubestormer. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |