This repository holds the code for the WisBlock Smart Cube Companion. A BLE device to be used with Smart Magic Cubes like GAN 356 i3, GoCube, Giiker and Xiaomi cubes, that also supports an analog timer connection or good old fingertip start/stop.
- Support for GAN, Giiker i3, Giiker i2 and GoCube smart cubes (tested with GAN 356 i3, original Giiker cubes and GoCubeX cube). Should work with Xiaomi (Giiker), Monster (GAN) and Rubik's Connected (GoCube) cubes as well.
- Support for StackMat timer using an stereo male-to-male audio cable.
- Support for manual interface (swipe to move from menu to menu, tap to start/stop timer)
- Cube actions
- 4U to go to scramble page, 4U again to start inspect without scrambling
- Any movement after solving the cube to see stats
- Stores statistics for 4 different users (PB, Ao5, Ao12 and last 12 individual solves) and 6 different puzzles (3x3x3, 2x2x2, Pyraminx, Skweb, Megaminx and Megaminx2)
- Reset user/puzzle stats (long tap on the screen while at the user's stat page)
- Visual representation of the cube state in 2D and 3D (only for smart 3x3x3 and 2x2x2 cubes)
- 20 movements scramble generation (9 movements for 2x2x2) following WCA rules
- Automatic start/stop timer for smart cubes
- Built-in LiPo battery for several hours of usage
These are the components required for this project:
- RAK19007 WisBlock Base Board 2nd Gen
- RAK4631 Nordic nRF52840 BLE Core
- RAK14014 230x320 Full Color TFT Display
- RAK18001 Buzzer module
- Custom 3D printed enclosure (soon available for purchase)
- Small LiPo battery (I'm using a 1000 mAh nominal)
The whole list is between $60 and $70 at the moment (but you should also consider shipping and customs costs). On top of that you will need a smart cube if you want to use the smart cube link. Mind right now it only supports GAN, GoCube and Giiker/Xiami cubes like these ones (these are affiliate links):
- GAN 356 i3 3x3 Magnetic Magic Cube
- GAN i3 Carry Smart Magic Cube
- Giiker i3 Smart Cube
- Giiker i2 Smart Cube
- XiaoMi Bluetooth Magic Cube
- GoCube Connected
- Rubik's Connected
Or you can use a StackMat like the QiYi Timer Magic Cube Speed Timer (also affiliate link) with a regular cube.
There is very little complexity in the setup. Read about the WisBlock platform to know more. You only need to know that the code expects the buzzer to be on slot A and the audio jack is connected to the secondary hardware serial in the J10 header. This is optional, of course, but it will require some soldering if you want support for a StackMat.
The firmware has been prepared to be compiled using PlatformIO (https://platformio.org/), but the WisBlock RAK4631 is not yet supported by default so you will first have to add support for it manually after installing PlatformIO. You can follow the instructions to do so here: https://github.com/RAKWireless/WisBlock/tree/master/PlatformIO.
Once PlatformIO and RAK4631 support installed you will only have to build the firmware (from the VSCore extension or using the command line: pio run
).
To flash the WisBock connect it to your computer and select build & flash on the IDE or type pio run -t upload
on the command line.
A small gallery to know more about the project.
Copyright (C) 2023 by Xose Pérez (@xoseperez)
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.