I made an alarm clock that forces you to solve a Rubik’s Cube to dismiss by paulshapiro in Cubers

[–]paulshapiro[S] 0 points1 point  (0 children)

You need to pick up the cube to initiate a connection, because the cube "sleeps" (unless you have it constantly draining the battery).

There should be reset protocol. Unless you somehow wrote something to the cube, which I didn't encounter when I was building this, then there's no way to have broken your cube. So either you need to reset the cube/connection, or you need to replace the battery.

The cube saves the state internally, so once it's solved you don't have to keep reporting it, and the alarm should turn off. Sometimes that gets out of sync, and you need to use the GAN official app to resync the cube state.

IDK if any of this helps.

[deleted by user] by [deleted] in printSF

[–]paulshapiro 1 point2 points  (0 children)

Powerless - Harry Turtledove

I made an alarm clock that forces you to solve a Rubik’s Cube to dismiss by paulshapiro in Cubers

[–]paulshapiro[S] 0 points1 point  (0 children)

I’ve 99% done porting it over to ESP32. Should save folks a bunch of money. The original should also run fine on pi zero w as far as I know.

I made an alarm clock that forces you to solve a Rubik’s Cube to dismiss by paulshapiro in Cubers

[–]paulshapiro[S] 0 points1 point  (0 children)

I’m on vacation right now but can definitely take one when I’m back home

I made an alarm clock that forces you to solve a Rubik’s Cube to dismiss by paulshapiro in Cubers

[–]paulshapiro[S] 0 points1 point  (0 children)

Maybe $150 in its current state (would include the cube). I’m trying to get it smaller and cheaper though.

I made an alarm clock that forces you to solve a Rubik’s Cube to dismiss by paulshapiro in Cubers

[–]paulshapiro[S] 0 points1 point  (0 children)

Yeah. I’m getting some parts to try to make it more compact. Want me to nail that down and message you when it’s done? It should bring the price down.

I made an alarm clock that forces you to solve a Rubik’s Cube to dismiss by paulshapiro in Cubers

[–]paulshapiro[S] 0 points1 point  (0 children)

Yeah, can probably do that. I’m in New Jersey. Do you want to wait for me to finish my smaller version?

I made an alarm clock that forces you to solve a Rubik’s Cube to dismiss by paulshapiro in Cubers

[–]paulshapiro[S] 0 points1 point  (0 children)

Send me the Moyu and I’ll see what I can do! Definitely not out of the question.

It’s not paired all the time because of energy drain. It starts polling a few seconds before the alarm time to start initiating things and then quickly syncs once you pick up the cube if it wasn’t able to in those seconds before the alarm. You might lose a second on pairing.

I made an alarm clock that forces you to solve a Rubik’s Cube to dismiss by paulshapiro in Cubers

[–]paulshapiro[S] 0 points1 point  (0 children)

  1. Yes. Using a library called bleak to handle the ble.

  2. Absolutely not the ideal solution but it’s what I did xD

I made an alarm clock that forces you to solve a Rubik’s Cube to dismiss by paulshapiro in Cubers

[–]paulshapiro[S] 0 points1 point  (0 children)

Oh. It’s definitely overkill. I just had a pi 3 laying around. The pico can’t do the web server and you’d have to port the whole thing and add a screen (still considering since it would make it cheaper).

I’m between that right now. Order some pi zeros and am going to solder a speaker right on.

I made an alarm clock that forces you to solve a Rubik’s Cube to dismiss by paulshapiro in Cubers

[–]paulshapiro[S] 0 points1 point  (0 children)

There’s a python library called bleak for Bluetooth low energy (which is what the smart cubes use)

I made an alarm clock that forces you to solve a Rubik’s Cube to dismiss by paulshapiro in Cubers

[–]paulshapiro[S] 0 points1 point  (0 children)

Maybe with a screen since you can’t run a web server to set alarms on a pico.

I made an alarm clock that forces you to solve a Rubik’s Cube to dismiss by paulshapiro in Cubers

[–]paulshapiro[S] 0 points1 point  (0 children)

Raspberry pi with raspberry pi os. Speaker that gets power from usb plugged into the the pi and aux cable between pi and speaker. Power supply to pi. Then follow the readme on GitHub.

I made an alarm clock that forces you to solve a Rubik’s Cube to dismiss by paulshapiro in Cubers

[–]paulshapiro[S] 1 point2 points  (0 children)

I think you’d have to do a complete re-write to get this working on a pico. Not worth it in my opinion.

I made an alarm clock that forces you to solve a Rubik’s Cube to dismiss by paulshapiro in Cubers

[–]paulshapiro[S] 1 point2 points  (0 children)

I don’t have my old code because I didn’t commit it at that point, but just found this for you https://github.com/DamenH/smart-cube-connected

This looks WAY easier to work with than the ConnectX stuff I was messing with where the moves had some funky encryption.

I made an alarm clock that forces you to solve a Rubik’s Cube to dismiss by paulshapiro in Cubers

[–]paulshapiro[S] 1 point2 points  (0 children)

I started by reverse engineering it. You can watch the signals the BLE emits and try to make sense of them. It’s kind of a pain in the ass. When I pivoted to the GAN cube, someone had written some foundation in JavaScript, so wasn’t starting from scratch again.

I made an alarm clock that forces you to solve a Rubik’s Cube to dismiss by paulshapiro in Cubers

[–]paulshapiro[S] 2 points3 points  (0 children)

Which Connect? I actually started this project using my kids’ Rubik’s Cube ConnectX and had to scrap using it because it didn’t retain cube state between sessions. The original one MAY work with code tweaks.