Method for waking up smart magic cube and smart magic cube
AssigneeGancube Ltd.
InventorGanyuan Jiang
Life of this patent
Estimating the term…
Abstract
A method for waking up smart magic cube and a smart magic cube are provided. An accelerometer is arranged on the smart magic cube. When the smart magic cube is in a dormant state, an acceleration of the smart magic cube in any direction of the three axes is detected by the accelerometer. When detecting that an acceleration value of the is acceleration greater than a preset awakening threshold, the smart magic cube is wakened up and enters a normal working mode. The method for waking up smart magic cube and the smart magic cube provided by the embodiment of the present disclosure can greatly save an energy consumption of the smart magic cube when it is in the dormant state, thus improving a battery life of the smart magic cube, and giving users a better and more intelligent experience.
Claims13
A method for waking up smart magic cube, comprising:
- step S10, detecting acceleration values of an X-axis, a Y-axis, and a Z-axis of the smart magic cube by an accelerometer arranged in the smart magic cube;
- step S20, obtaining the acceleration values of the X-axis, the Y-axis, and the Z-axis of the smart magic cube when detecting that an acceleration is generated in any one of directions of the X-axis, the Y-axis, and the Z-axis of the smart magic cube;
- step S30, comparing the acceleration values of the X-axis, the Y-axis, and the Z-axis of the smart magic cube with an awakening threshold, and when one of the acceleration values of the X-axis, the Y-axis, and the Z-axis of the smart magic cube is greater than the awakening threshold, sending an awakening signal to a micro control unit of the smart magic cube by the accelerometer;
- step S40, restarting a system of the smart magic cube by the micro control unit to enable the smart magic cube to enter a normal working mode;
- step S50, starting a firmware program of the smart magic cube, and starting the accelerometer;
- step S51, configuring an output data rate of the accelerometer;
- step S52, configuring a range of the accelerometer;
- step S53, configuring an X offset, a Y offset, and a Z offset of the accelerometer;
- step S54, configuring the awakening threshold;
- step S55, configuring an awakening interrupt to drive to an interrupt pin;
- step S56, when the smart magic cube enters a dormancy mode, executing the step S10;
- the step S56 further comprises:
- step S561, obtaining a connection information between a wireless communication module of the smart magic cube and terminal devices;
- step S562, when the wireless communication module is not connected to any one of the terminal devices, starting a timer, and continuously detecting a connection state of the wireless communication module;
- when the wireless communication module is not connected to any one of the terminal devices within a preset timing time, and the acceleration values of the X-axis, Y-axis, and Z-axis of the smart magic cube detected by the accelerometer are all less than the preset acceleration activity threshold, enabling the smart magic cube to enter the dormancy mode;
- and
- when the wireless communication module is connected to one of the terminal devices within the preset timing time, or when one of the acceleration values of the X-axis, the Y-axis, and the Z-axis of the smart magic cube detected by the accelerometer is more than the preset acceleration activity threshold, keeping the smart magic cube work in the normal working mode;
- and
- step S563, comparing the acceleration values of the X-axis, the Y-axis, and the Z-axis of the smart magic cube with a preset acceleration activity threshold, when one of the acceleration values of the X-axis, the Y-axis, and the Z-axis of the smart magic cube is less than the preset acceleration activity threshold, controlling the smart magic cube to enter the dormancy mode.
A smart magic cube, comprising:
- a ball shaft;
- six central blocks;
- eight corner blocks;
- and
- twelve edge blocks;
- wherein the ball shaft is arranged at a center of the smart magic cube, the ball shaft defines a micro control unit, an HP filter, and an accelerometer, and the accelerometer is connected to the micro control unit by the HP filter;
- wherein each of rotating shafts in the ball shaft defines one of the six central blocks, one of the twelve edge blocks is arranged between every adjacent two of the six central blocks, and one of the eight corner blocks is arranged between every adjacent three of the twelve edge blocks;
- the accelerometer and the micro control unit of the smart magic cube are caused to execute to:
- detect acceleration values of an X-axis, a Y-axis, and a Z-axis of the smart magic cube by the accelerometer arranged in the smart magic cube;
- obtain the acceleration values of the X-axis, the Y-axis, and the Z-axis of the smart magic cube when detecting that an acceleration is generated in any one of directions of the X-axis, the Y-axis, and the Z-axis of the smart magic cube;
- compare the acceleration values of the X-axis, the Y-axis, and the Z-axis of the smart magic cube with an awakening threshold, and when one of the acceleration values of the X-axis, the Y-axis, and the Z-axis of the smart magic cube is greater than the awakening threshold, sending an awakening signal to a micro control unit of the smart magic cube by the accelerometer;
- restart a system of the smart magic cube by the micro control unit to enable the smart magic cube to enter a normal working mode;
- start a firmware program of the smart magic cube, and starting the accelerometer;
- configure an output data rate of the accelerometer;
- configure a range of the accelerometer;
- configure an X offset, a Y offset and a Z offset of the accelerometer;
- configure the awakening threshold;
- configure an awakening interrupt to drive to an interrupt pin;
- obtain a connection information between a wireless communication module of the smart magic cube and terminal devices;
- when the wireless communication module is not connected to any one of the terminal devices, starting a timer, and continuously detect a connection state of the wireless communication module;
- when the wireless communication module is not connected to any one of the terminal devices within a preset timing time, and the acceleration values of the X-axis, Y-axis, and the Z-axis of the smart magic cube detected by the accelerometer are all less than the preset acceleration activity threshold, enable the smart magic cube to enter the dormancy mode;
- when the wireless communication module is connected to one of the terminal devices within the preset timing time, or when one of the acceleration values of the X-axis, the Y-axis, and the Z-axis of the smart magic cube detected by the accelerometer is more than the preset acceleration activity threshold, keep the smart magic cube work in the normal working mode;
- and
- compare the acceleration values of the X-axis, the Y-axis, and the Z-axis of the smart magic cube with a preset acceleration activity threshold, when one of the acceleration values of the X-axis, the Y-axis, and the Z-axis of the smart magic cube is less than the preset acceleration activity threshold, control the smart magic cube to enter the dormancy mode.
A computer-readable storage medium, having stored thereon instructions that, when executed by a micro control unit and an accelerometer of a smart magic cube, causes the micro control unit and the accelerometer to execute to:
- detect acceleration values of an X-axis, a Y-axis, and a Z-axis of the smart magic cube by the accelerometer arranged in the smart magic cube;
- obtain the acceleration values of the X-axis, the Y-axis, and the Z-axis of the smart magic cube when detecting that an acceleration is generated in any one of directions of the X-axis, the Y-axis, and the Z-axis of the smart magic cube;
- compare the acceleration values of the X-axis, the Y-axis, and the Z-axis of the smart magic cube with an awakening threshold, and when one of the acceleration values of the X-axis, the Y-axis, and the Z-axis of the smart magic cube is greater than the awakening threshold, sending an awakening signal to a micro control unit of the smart magic cube by the accelerometer;
- restart a system of the smart magic cube by the micro control unit to enable the smart magic cube to enter a normal working mode;
- start a firmware program of the smart magic cube, and starting the accelerometer;
- configure an output data rate of the accelerometer;
- configure a range of the accelerometer;
- configure an X offset, a Y offset and a Z offset of the accelerometer;
- configure the awakening threshold;
- configure an awakening interrupt to drive to an interrupt pin;
- obtain a connection information between a wireless communication module of the smart magic cube and terminal devices;
- when the wireless communication module is not connected to any one of the terminal devices, starting a timer, and continuously detecting a connection state of the wireless communication module;
- when the wireless communication module is not connected to any one of the terminal devices within a preset timing time, and the acceleration values of the X-axis, Y-axis, and Z-axis of the smart magic cube detected by the accelerometer are all less than the preset acceleration activity threshold, enabling the smart magic cube to enter the dormancy mode;
- and when the wireless communication module is connected to one of the terminal devices within the preset timing time, or when one of the acceleration values of the X-axis, the Y-axis, and the Z-axis of the smart magic cube detected by the accelerometer is more than the preset acceleration activity threshold, keeping the smart magic cube work in the normal working mode;
- and
- compare the acceleration values of the X-axis, the Y-axis, and the Z-axis of the smart magic cube with a preset acceleration activity threshold, when one of the acceleration values of the X-axis, the Y-axis, and the Z-axis of the smart magic cube is less than the preset acceleration activity threshold, control the smart magic cube to enter the dormancy mode.
Dependencies are inferred from the claim text.