Raspberry plugin

pymodaq_plugins_raspberry lets PyMoDAQ control an experimental device (or test bench) through a Raspberry Pi.

A small server runs on the Raspberry Pi and drives the components of the bench (I2C sensors, GPIO actuators); PyMoDAQ talks to that server over the network. From PyMoDAQ you then get a detector (to read the sensors) and an actuator (to drive the outputs), as if they were local instruments.

Note

This single plugin replaces the former Raspberry Pi 3 and Raspberry Pi Zero plugins. A given bench (PWM or all-or-nothing actuators, different sensors…) is now simply a configuration of the same code base — see Adapting the plugin to a bench.

Architecture at a glance

┌──────────── Control computer ─────────────┐         ┌──────── Raspberry Pi ────────┐
│  PyMoDAQ                                  │   ZMQ   │  server (src_raspberry/)     │
│   ├─ DAQ_Move   MoveRasp                  │  <───>  │   transport → handler →      │
│   ├─ DAQ_Viewer ViewRasp  ── ZMQLink ──── │   JSON  │   hardware backend           │
│   └─ DAQ_Viewer PiCamera                  │         │   (I2C sensors, GPIO out)    │
└───────────────────────────────────────────┘         └──────────────────────────────┘

The control computer hosts the three PyMoDAQ instruments and the communication layer (ZMQLink); the Raspberry Pi hosts the server that actually reads the sensors and drives the outputs.

Installation (control computer)

  • PyMoDAQ >= 5.

  • On a Windows / macOS control machine the plugin installs as is; the picamera2 dependency (Linux-only) is automatically skipped, so only the PiCamera viewer is unavailable there.

  • The Raspberry-side server has its own requirements (I2C bus + pigpio daemon) — see Raspberry-side server.

Resources and Downloads

These documents contain the step-by-step guide including all screenshots (PyMoDAQ interface, Raspberry Pi Imager configuration, etc.).