Press J to jump to the feed. Press question mark to learn the rest of the keyboard shortcuts
7.9k

# My first project at 19 years old, took me about 4 months to code and design from scratch

7.9k
Posted by7 months ago
Archived
311241111

# My first project at 19 years old, took me about 4 months to code and design from scratch

Play
0:00
0:00
Settings
Fullscreen
97% Upvoted
Sort by
level 1

That’s cool as hell, is that pre programmed movement or will it solve a cube in any pattern?

290
level 2
Original Poster7 months ago

Kind of both, the user has to give the colour for each cubie in the form of a string, then the program calculates the moves from there.

I designed a UI on a touchscreen that shows a folded out cube where u can click through the colours on each face

Kociemba Library

This is the library i used to do this, the next step to the this project is to implement some kind of automatic recognition whether it be colour sensors or cameras

181
level 2
7 months ago · edited 7 months ago

I want to believe it's not pre-programmed but I don't see cameras so I'll assume it is (and still seriously impressive). I'd love to see a "thinking" version too!

Also we need some "tell" to go with this "show".

82
level 2

Probably it's using kociemba algorithm.

9
level 2

It's actually just a reversed gif of a robot built to shuffle up a Rubik's Cube. /s

Seriously though, cool project.

6
level 2

I'm not the OP, but there step by step solutions to solving a rubik's cube, and I'm almost positive that a pre-programmed set of movements will solve a cube in any pattern. I think the important part of it is always having the middle color of a face in the same spot...so if the middle white square is up it will always solve it. Part that could all be wrong, I'm only going of the little bit of solving a rubik's cube that I remember.

19
level 1

This is impressive as fuck OP! Give yourself a huge pat on the back, I can’t solve a Rubik’s cube to save my life, let alone program a fucking machine to serve no other purpose than to solve said Rubik’s cube.

48
level 2

Check out this video. There are many videos that claim to be beginner tutorials, but this one actually is. Only two basic moves to learn (and one is the reverse of the other), and very straightforward explanations of each step.

https://youtu.be/1t1OL2zN0LQ

19
level 2

solving rubicks cubes is actually way easier than it looks (especially if you learn the beginners algorithm). My friend taught me how to do it in a few hours

9
level 1

Okay this is fucking baller

I assume if it's initialized in a known orientation there is no need to sense the colors?

37
level 1
Original Poster7 months ago

Thank you all for the positive comments! I’m immensely proud of this project and have big plans for it.

This is the library I used for finding the moves to solve the cube. There is currently no automatic colour recognition so this is done manually. I designed a UI using Tkinter which displays a “flat” cube which allows to set the colours for each face with minimal effort.

The motors and drivers came from aliexpress for very little cost.

The step and direction pin on each driver is driven off the same GPIO pin from the pi and the enable pin for each driver is unique, allowing me too disable and enable motors as needed.

The frame was designed in Fusion 360. The plastic parts where printed and the aluminium extrusion ordered from Slotpro

I hope this answers the majority of questions

28
level 2
Comment deleted by user7 months ago
level 2

Do you have your code somewhere public? I'd be interested in seeing how you did this!

2
level 1

That's a superb job of hard/software engineering. Congraulations.t

17
level 1

Can I mail you my cube to be solved? even online solvers cannot solve it.

18
level 2

It was probably put together wrong at some point. If two edges or corners are swapped, or one corner twisted, or two corners twisted the same way, it's unsolvable. There's not a great way of knowing until you get close enough to the solved state to recognize one of those cases.

28
level 2

Take it apart and reassemble it solved! You can usually rotate the top layer 45 degrees and pop out one of the edges straight up with some force. Then removing the rest of the pieces is easy.

Don’t break it if it’s not coming apart though.

7
level 2

Just heat gun the stickers off and put them back on in the correct order. Done! Ez.

10
Continue browsing in r/raspberry_pi
A subreddit for discussing the Raspberry Pi ARM computer and all things related to it.
2.3m

Members

541

Online

Created Oct 10, 2011