## Hardware Design
#### Counting Principle
This device is placed inside the skipping rope handle. The counting principle is that when skipping, the rotation of the rope drives a magnet to rotate. The switching of the N and S polarity of the magnet will cause a groove on the left side of the PCB board. The changes in the output pin levels of the Hall sensors at both ends are checked by the microcontroller at both ends, and the number of laps of the skipping rope is counted. As shown below:
![image.png]

#### In the power control part,
in order to reduce power consumption and optimize user experience, this platform adopts a set of hardware solutions from the hardware perspective, using two MOS tubes, and through the microcontroller software The cooperation achieves the effect of long-pressing the power on and off by reusing a button. The specific hardware implementation is shown in the figure below.
![image.png]

#### Battery charging circuit
![image.png]

This platform uses the LTH7R. power management chip to charge and discharge the battery power. The schematic diagram is as follows:
## Bluetooth serial port debugging
The interaction between this device and the mobile APP is realized through the serial port. A Bluetooth serial port chip is used. With the serial port transparent transmission function, the interaction is carried out through the serial port pins of the microcontroller. Data is realized through this interface. Statistics, device reset, and other functions. The APP is developed using Android Studio and uses JAVA language to simply realize the search, connection, and information sending and receiving of Bluetooth adapters. The interface is as shown below, please see the attachment for the source code. ![WeChat picture_20230321171405_iQiyi_iQiyi.jpg]

## Implemented functions
This model code implements three functions:
1. Counting function
2. Countdown function
3. Historical statistics function The
button on the lower right is responsible for To switch functions, the left button is responsible for switching submenus. Responsible for uploading data in the counting function. Responsible for switching time in the countdown function, which is divided into three gears by default, 60s, 120s, and 180s. The function has not been added in the historical statistics mode, and it can be added later according to the needs. {For example, it is responsible for the archiving function, writing to the EEPROM of the microcontroller, etc. . . }.