Installation on Windows Platform
- Install Python3. The PinPong library depends on Python, so please make sure Python3 is installed on your computer. If it is already installed, you can skip this step.
- If you have not installed Python3, you need to install it. Python download address: Click to Open.
- For Windows platform, click on Windows, then choose the latest version to download (you can also choose other versions).
- After the download is completed, follow the guide to install. Make sure to tick "add to path" in the final step of the installation to add Python to the environment variables.
- Open the command prompt. Use the win+R shortcut, then type
cmd
.
Install the PinPong library. In the terminal, type
pip install pinpong
and wait a moment for the installation to complete.- Note: If the installation fails due to slow internet, you can specify a domestic source for installation:
pip install pinpong -i http://mirrors.aliyun.com/pypi/simple/
.
- Note: If the installation fails due to slow internet, you can specify a domestic source for installation:
- For help, enter
pinpong
in the terminal to output the current version information, official documentation URL, library list view, and port number.
Starting Your First Program
- Connect the Arduino Uno board to your computer.
- Open the IDLE editor and create a new file (New File).
- Copy the code of the "blink" example program from the "PINPONG Examples" in this document to IDLE, click "RUN > Run Module" or press F5 on your keyboard to run the code.
- The Python Shell window will display the PinPong logo and running status, the Uno board's LED will start to blink, indicating a successful run. You can stop the code from running by pressing the Ctrl+C keys on your keyboard.
- Next, please check out other tutorials or run other example programs to further your learning.