**Mouse clicking system brings up**
please download the main scritp folder at following lick first:
https://drive.google.com/file/d/1fhpsBdfjPs49D-kpvISlDC_IFj4hRa5Y/view?usp=sharing
:::info
**Hardware**
:::
1.the overview of the hardware

2.The connection between arduino board and servo motor
*red line <---> 5V
*brown line <---> GND
*Yellow line <---> pin 3

3.Fix the servo motor in place so that the mouse can be touched lightly while it rotates

:::info
**Firmware**
:::
1.Download the Arduino IDE from below link:
https://www.arduino.cc/en/software

2.Install the Arduino IDE

3.After installing, open Arduino IDE and load the mouse_and_sleep_click.ino script


4.Insert Arduino usb cable to the laptop and select "Arduino Uno" board



5.Click the upload button, burning the mouse clcik script to the arduino board

:::info
**Software**
:::
ps. Please remove other version python before install a python **3.13.x**
1.Install the **python ver 3.13.9**, here is the link of the python download page:
https://www.python.org/downloads/
2.Please make sure clicking the two item which are marked in below picture when installing and click the Customize installation

3.click "next"

4.Please click the "Install Python 3.13 for all users" and click "install"

5.Go to the mouse_sleep_click_20250116 folder and execute below command to install necessary python package:
`pip install -r requirements`

6.After installing python package, make sure you are already plug the Arduino usb cable to the laptop usb port and click execute.bat

7.You will see a window cmd jumps out like below picture if all steps are setted appropriately:

:::info
**How to use**
:::
**Please connect the Bluethooth mouse with DUT before you start testing!**
**please execute the "execute.bat" with cmd window and **don't use** the administrator role**
1. There are 4 different mode user can choose,
please enter 0~4 to choose the mode:
`mode 0 = mouse will clcik randomly and DUT will in S0 status`
`mode 1 = First, The mouse click continuously for 2 minutes in S0 status,and then laptop will enter S3 sleep mode, and after 3 minutes, the mouse will automatically click to wake laptop up and start click continuously for 2 minutes again`
`mode 2 = just like mode 1 , but laptop will sleep 6 min`
`mode 3 = just like mode 2 , but laptop will sleep 30 min`
`mode 4 = just like mode 0 , but user can set the click frequency through the cmd window`
(ps. make sure your laptop won't go to the S4 hibernate if you want to use mode 1~3 )
(you can use following command to turn off the hibernate mode in laptop
1. Open the Start menu
1. Search for Command Prompt
1. Right-click Command Prompt and select Run as administrator
1. Select Yes in the User Account Control prompt
1. Type powercfg.exe /hibernate off and press Enter
1. Type exit and press Enter to close the Command Prompt
(ps2. mode 1~3 **cannot be performed remotely**. If you remotely control the DUT, it will get stuck on the login screen after you log off, preventing the laptop from entering sleep mode)
2. Input the mode you want to use and press enter, the test will start

3. the test log will automatically created in the folder after testing:
