diff --git a/README.md b/README.md index f94a1c0..1858a62 100644 --- a/README.md +++ b/README.md @@ -25,6 +25,18 @@ pslab-python can be installed from PyPI: $ pip install pslab +**On Debian/Ubuntu:** + +sudo apt-get install python3 python3-pip + +**On macOS:** + +brew install python3 + +**Other platforms:** + +Visit https://www.python.org/downloads/ + **Note**: Linux users must either install a udev rule by running 'pslab install' as root, or be part of the 'dialout' group in order for pslab-python to be able to communicate with the PSLab device. **Note**: Windows users who use the PSLab v6 device must download and install the CP210x Windows Drivers from the [Silicon Labs website](https://www.silabs.com/developers/usb-to-uart-bridge-vcp-drivers?tab=downloads) in order for pslab-python to be able to communicate with the PSLab device. diff --git a/pslab/README.md b/pslab/README.md new file mode 100644 index 0000000..6a51cc7 --- /dev/null +++ b/pslab/README.md @@ -0,0 +1,52 @@ +##Troubleshooting + +Installation Issues +Error: "ModuleNotFoundError: No module named 'pslab'" + +Solution: Make sure you ran pip3 install -e . (with -e flag for development) + +Error: "Permission denied" on Linux + +Solution: Run pip3 install --user -e . or use sudo + +Error: "python3" command not found + +Ubuntu/Debian: + +sudo apt-get install python3 python3-pip + +macOS: + +brew install python3 + +Windows: + +Download from https://www.python.org/downloads/ + +Run installer and check "Add Python to PATH" + +Connection Issues +"Device not found" + +Ensure PSLab hardware is connected via USB + +Check USB port: ls /dev/ttyUSB* on Linux + +Quick Start Examples +1. Connect to Your PSLab Device +text +from pslab import ScienceLab + +# Connect to the device +I = ScienceLab() +print("✅ Connected to PSLab!") +2. Read a Voltage Measurement +text +# Measure voltage on Channel 1 (CH1) +voltage = I.get_average_voltage('CH1') +print(f"Voltage on CH1: {voltage} V") +3. Generate a Signal +text +# Generate 1kHz sine wave on output W1 +I.set_sine1(1000) +print("Sine wave generated at 1 kHz")