whatisgithub

What is pslab-python?

fossasia/pslab-python — explained in plain English

Analysis updated 2026-08-04 · repo last pushed 2025-07-17

1,632PythonAudience · researcherComplexity · 2/5StaleSetup · moderate

In one sentence

A Python library that controls the Pocket Science Lab, a small USB hardware device that works as an oscilloscope, waveform generator, and other lab instruments so you can run electronics experiments from code.

Mindmap

mindmap
  root((repo))
    What it does
      Controls Pocket Science Lab
      Measures capacitance
      Generates waveforms
      Drives servo motors
    Tech stack
      Python
      USB communication
      Desktop GUI app
    Use cases
      Classroom science demos
      Student lab projects
      Hobbyist robotics control
      Low-cost lab equipment
    Audience
      Teachers and students
      Scientists
      Hobbyists and makers
    Setup
      USB drivers vary by OS
      Connect device via USB
      Install Python library

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Demonstrate waveforms and electronics concepts in a classroom.

USE CASE 2

Measure capacitance or other properties for a student project.

USE CASE 3

Control a small robot using the servo motor outputs.

USE CASE 4

Replace expensive bench instruments with a single pocket-sized device.

What is it built with?

PythonUSB

How does it compare?

fossasia/pslab-pythonkarpathy/arxiv-sanity-litebigdawnghost/wenyi
Stars1,6321,6371,647
LanguagePythonPythonPython
Last pushed2025-07-172023-06-19
MaintenanceStaleDormant
Setup difficultymoderatemoderatemoderate
Complexity2/52/53/5
Audienceresearcherresearcherdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 30min

Requires a physical Pocket Science Lab device connected via USB, and driver/permission setup varies by operating system.

Open source, you can freely use, inspect, modify, and extend both the software and the hardware design.

So what is it?

The pslab-python library lets you control a small hardware device called the Pocket Science Lab using simple Python scripts. The device itself is a pocket-sized gadget that bundles together several measurement instruments you'd normally need a full electronics bench for, an oscilloscope, a waveform generator, a logic analyzer, a programmable voltage and current source, and even servo motors for controlling robots. Instead of buying each of these tools separately, you plug in the device, write a few lines of Python, and start taking measurements or generating signals. At a high level, the library acts as the communication bridge between your computer and the physical device. You connect the Pocket Science Lab via USB, import the library in Python, and call functions to read sensor data or send signals out. The README includes a short example where you plug in the device, create a ScienceLab object, and call a method to measure capacitance, basically asking the hardware to run a specific test and hand you back the result. The same library also powers the project's graphical desktop app behind the scenes, so if you prefer a point-and-click interface over writing code, there's a separate app you can install. This is built for teachers, students, and scientists who want to run hands-on experiments without spending thousands on dedicated lab equipment. A physics teacher could use it to demonstrate waveforms in class, a student could measure capacitance for a project, or a hobbyist could control a small robot using the servo outputs. The fact that it's open source, both the hardware and software, makes it appealing for schools and makers who want to inspect, modify, or extend everything. One practical note: setup differs slightly depending on your operating system and which version of the device you have, particularly around USB drivers and permissions. But once installed, the library is straightforward to use.

Copy-paste prompts

Prompt 1
Using pslab-python, write a Python script that connects to the Pocket Science Lab over USB and measures capacitance, printing the result.
Prompt 2
Create a Python example with pslab-python that generates a sine wave waveform using the Pocket Science Lab's waveform generator output.
Prompt 3
Write a Python script using pslab-python to control a servo motor connected to the Pocket Science Lab, sweeping it from 0 to 180 degrees.
Prompt 4
Using pslab-python, capture a voltage trace with the oscilloscope and plot it using matplotlib.
Prompt 5
Show me how to set up and connect to the Pocket Science Lab with pslab-python on Linux, including any USB permission steps.

Frequently asked questions

What is pslab-python?

A Python library that controls the Pocket Science Lab, a small USB hardware device that works as an oscilloscope, waveform generator, and other lab instruments so you can run electronics experiments from code.

What language is pslab-python written in?

Mainly Python. The stack also includes Python, USB.

Is pslab-python actively maintained?

Stale — no commits in 1-2 years (last push 2025-07-17).

What license does pslab-python use?

Open source, you can freely use, inspect, modify, and extend both the software and the hardware design.

How hard is pslab-python to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is pslab-python for?

Mainly researcher.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.