Getting Started
Welcome!
Thank you for choosing PYCO. This guide will help you quickly set up your development environment and run your first program on the PYCO development board.
Preparation
Hardware:
- PYCO development board
- USB A cable
- 24V DC power supply (Applicable only to PYCO WIFI and PYCO ETH)
- Computer (Windows, Linux, or macOS)
Software:
- WPC Stand-Alone Python Editor (Recommended) or any Python IDE
Step 1: Install Software
- Download the WPC Stand-Alone Python Editor.
- Extract the downloaded file to a folder of your choice.
- Double-click the executable file to open the editor.
Step 2: Connect Hardware
- Connect the 24V DC power supply to your PYCO development board (Applicable only to PYCO WIFI and PYCO ETH).
- Connect the PYCO development board to your computer using the USB A cable.
- Wait for the computer to recognize the device (drivers should install automatically).
Step 3: Run Your First Example
- Open the WPC Stand-Alone Python Editor (or your preferred IDE).
- Download the sample code from the Official Examples Page.
- Open the sample file in the editor.
- Ensure your PYCO development board is selected as the target device (check the device menu in the editor).
- Click the "Run" button to execute the code on the development board.
Congratulations!
You have successfully set up the development environment and executed your first program on the PYCO development board. Explore more examples and start building your own projects!
Minimalistic AI Data Reading Example: AI on demand once
"""
AI - AI_on_demand_once.py.
This example demonstrates how to read AI data in on demand mode.
"""
# 1. Import the pywpc library
import pywpc
## Read data acquisition
# 2. Call AI_readOnDemand() to get the raw AI data instantly!
ai_data = pywpc.AI_readOnDemand()
# 3. Print the data
print(ai_data)
This example is designed to demonstrate the extreme simplicity of reading Analog Input (AI) data using the pywpc library.
You don't need complex configurations or channel settings. Just call a simple function and get the data immediately.
More Examples
👉 Check out more sample code PYCO Series Sample Code