Rubik's Cube Alarm Clock banner

Rubik's Cube Alarm Clock

6 devlogs
12h 8m 5s

Essentially, an alarm clock that forces you to solve a scrambled rubiks cube to turn it off.
Please read the readme file for instructions!

Loading README...

Sebastian Wu

woo it works! almost ready to ship! (havent tested on raspberry pi YET), HOWEVErRRRRRR the code now can detect if the cube is a quadrilateral , and correclty identifies all colours, and it somehow actually works on a mildly saturated background!

Attachment
0
Sebastian Wu

More robust testing to check if it’s solved. If there are opposite sides on the cube that are detected (e.g. blue & green at the same time), and are both over 5000 pixels in area (the threshold value), it will not detect it as solved, since there are impossible colours.

2

Comments

Sebastian Wu
Sebastian Wu 22 days ago

guys why is the video sideways

toderodavi
toderodavi 21 days ago

why is the video sideways

Sebastian Wu

Figured out the logic for detecting sides! And also integrated it into the alarm. Now all that’s left is to further add some more verification for detecting if it’s solved or not, and then migrating it to raspberry pi :)

output is attached below when i run the detection:

  • cube sensed: true
  • sides solved are listed
  • number of faces solved = 3; hence cube is solved
Attachment
Attachment
Attachment
Attachment
0
Sebastian Wu

First ~2h30m is mostly finishing the freecodecamp tutorial (https://www.youtube.com/watch?v=oXlwWbU8l2o).
Next ~1h was spent making the detection file, where it creates masks and detects if there are three or more colours shown in the picture. If there are, it returns True. trying to find the right upper and lower bounds killed me :(

Attachment
Attachment
Attachment
0
Sebastian Wu

Today (and the following ones) will probably be largely just learning the basics of OpenCV.
The code can currently detect edges & contours, but will probably need to be modified VERY heavily cuz… well… you can see the image… but progress is progress!
Today’s progress - I can now:

  • Read images & Video
  • Resize images & video
  • Draw shapes & add text
  • Manage essential functions (grayscale, blur, edge cascading)
  • Contour Detection
Attachment
1

Comments

kashsuks
kashsuks 27 days ago

It’s so peak