The pymodaq_plugins_raspberrypi repository provides PyMoDAQ plugins for controlling hardware using Raspberry Pi GPIOs. It includes the ability to control servos using the gpiozero and pigpio libraries, allowing easy integration with PyMoDAQ's motion control system.
- Solim Rovera (solim.rovera@student.isae-supaero.fr)
This plugin contains the following instruments:
- Servo: Control of an SG90 servo motor using PWM signals with the gpiozero and pigpio libraries. The servo can be positioned within a range of 0° to 180°.
- RPitemperature: Raspberry Pi CPU Temperature Sensor. Monitors and displays the Raspberry Pi CPU temperature in real-time. The temperature is updated based on a configurable sampling time or frequency.
- DistanceSensor: Distance Sensor (HC-SR04). Measures distance using the HC-SR04 ultrasonic sensor, with adjustable trigger and echo pins, and configurable sampling interval.
This plugin currently does not include any PID models.
- PyMoDAQ Version: >= 4.0
- Tested On: Raspberry Pi 4 B+
- Required Libraries: - gpiozero: Python library for controlling the GPIO pins. - pigpio: Library for controlling GPIO pins via PWM, necessary for controlling the servo motor.
Clone the Repository: Clone the repository to your Raspberry Pi.
git clone https://github.com/sosasol/pymodaq_plugins_raspberrypi.git
Install the plugin: Run the following code.
cd pymodaq_plugins_raspberrypi pip install .
Activate pigpiod: You will have an error when using the plugin unless you activate pigpiod with the following code:
sudo pigpiod