Questions tagged [pigpio]

pigpio is a library for accessing GPIO pins as well as other functions including I2C. pigpio has a client-server architecture , which enables you to remotely control GPIO pins.

Filter by
Sorted by
Tagged with
9
votes
2answers
9k views

Raspberry as an I2C SLAVE

Does anyone know how to setup a Raspberry Pi 3 as an I2C slave (in C++)? Before someone answers saying that it's not possible, it is possible. Here is a link that says it is possible (pigpio ...
8
votes
2answers
19k views

pigpio Can't lock /var/run/pigpio.pid

Trying to run the pigpio example program freq_count_1 I get the error Can't lock /var/run/pigpio.pid. The gpiotest program, however, runs as expected. Below you can see what I did. I have a Raspberry ...
6
votes
1answer
661 views

I2C repeated start with BitBanging not working - Pigpio library on Raspberry Pi B+

First post here on the forum! Been getting a lot of help here from all the past posts and I am grateful for such a great community. I have been trying to use Repeated Start by using the PIGPIO ...
6
votes
0answers
768 views

How fast can GPIO pins toggle on the Pi 4?

Benchmarking of the Pi 4 using the Python GPIO Zero library shows a significant increase in the frequency of toggling a GPIO pin on and off compared to previous models. This result is attributed to ...
5
votes
1answer
90 views

Is there a GPIO current limit function available, and where is the documentation?

I have read that limits may be programmed for the output current of GPIO pins. However, after reading several online versions of Broadcom's data sheet for the SoC, I've found nothing to corroborate ...
5
votes
1answer
3k views

pigpio - set_PWM_dutycycle vs hardware_PWM

What is the difference between the set_PWM_dutycycle function and the hardware_PWM function in the pigpio python library when assuming the same frequency is set for both the functions. Will I get a ...
5
votes
0answers
164 views

Raspberry as I2C Slave, how to slow down transfer rate?

I have had minor success using the PIGPIO library and interfacing the Pi as an I2C Slave (Using GPIO Pins 18 and 19 as SDA and SCL) with a Campbell CR1000X Datalogger I am encountering a problem ...
4
votes
1answer
244 views

How does pigpio's wave_chain() method happen in hardware?

The Python package pigpio has a wave_chain() method that allows one to chain together a series of waveforms in an easy-to define looping structure. But the GPIO chip itself has quite a limited number ...
4
votes
1answer
2k views

Counting Pulse Length Using PiGPIO

Background I am trying to get a particle sensor to work with the Raspberry Pi (model B+). I am using the Shinyei PPD42N6 (datasheet here). The sensor outputs a digital signal with pulses ranging ...
3
votes
1answer
736 views

Is there a way to read the pullup status of a GPIO pin in python with, or if not, without pigpio?

I've discovered pigpio and am starting to learn to use it with Python. I thought I would use it to "discover" the pullup status of a pin before setting it, but while mode has both .set_mode() and ....
3
votes
1answer
2k views

gpiotest problem and gpio 30

After soldering a header on my Pi Zero W I used pigpio's gpiotest utility to check for problems. I was dismayed that this produced no output and crashed the Pi. After stepping through the tests I ...
3
votes
1answer
2k views

How to make a remote pigpiod socket call?

The pigpio GPIO library seems to provide a mechanism to invoke the pigpiod demon remotely using TCP/IP sockets. However, there appears to be some details missing. For example: Do we use a TCP or ...
3
votes
1answer
38 views

Segmentation faults on every GPIO STR

I am stuck and hoping for a clue. These lines seem to show the issue. It is for a Pi4. .equ IOBASE, 0x7E200000 .equ GPFSEL2, 0x08 //offset to reg for IO Pins 20 - 29 .align 4 LDR R0, =IOBASE //...
3
votes
1answer
794 views

2 pigpio programs at the same time

I've made some programs with the pigpio library, all of them are working well, but when I try to run 2 at the same time I get this error (For the second one). initInitialise: Can't lock /var/run/...
3
votes
1answer
323 views

Output from pigpio unexpected

I have attached a DHT-22 weather sensor to my rev 1 raspberry pi after a fresh install of a recent install of debian. Following the instructions from https://www.youtube.com/watch?v=IHTnU1T8ETk I ...
3
votes
1answer
299 views

Multiplexing to 1000 devices, Raspberry Pi and Python

All, I'm working to develop a piece of hardware that allows me to control 1000 outputs (servos) from a single output pin. I'm using pigpio on a Raspberry Pi B3 with python. I'm also using an array ...
3
votes
1answer
92 views

pigpio pwm — gpio <pin_no> bad dutycycle (nnn)

I'm tinkering with the pigpio [C] PWM functions and get ``pio bad dutycycle (nnn)'' messages while cycling an LED with increasing/decreasing gpioPWM() values. As always, any help will be greatly ...
3
votes
1answer
473 views

Where do the pigpio watchdogs run? Could watchdogs on multiple GPIO pins conflict?

I'm using pigpio bit-banging script (download, GitHub) that interprets the pulse durations generated by the DH22 Temperature/Humidity sensor. It sets a 200 ms pigpio watchdog to the GPIO pin and ...
3
votes
0answers
865 views

How to use pigpio to control 3 stepper motors with drivers

I need to control 3 independent stepper motors with stepper motor drivers using RPi. Driver of each motor requires STEP pulse to make one step (let's not bother about DIR and ENABLE signals for now). ...
2
votes
1answer
13k views

How to use pigpio to control a servo motor with a keyboard?

My aim is to be able to control a servo motor with my keyboard in a real time fashion using the python module of pigpio. That is, when I press say the 'w' key it rotates clockwise and when I press the ...
2
votes
1answer
2k views

How to use piscope from my pigpio library on python

I want install piscope for my raspberry by python but after I installed according to link http://abyz.me.uk/rpi/pigpio/piscope.html, I not know how call piscope and using it how? I do as @joan guide ...
2
votes
2answers
2k views

python library to generate pulse frequency of “n” hz

I'm trying to make a function which would output a pulse frequency , given a Ts (time.sleep(ts) on my function) The function is for later use on an acceleration ramp for a stepper motor , as the ...
2
votes
1answer
250 views

Is there a way to slow down servo movement speed?

Despite searching I was not able to find an answer to this question. I have a servo attached to a pin that moves an arm back and forth. The problem is that it moves too quickly. Is there a way ...
2
votes
1answer
220 views

Does pigpiod feature a verbose / debug mode?

As I'm currently trying to debug an issue with my SPI link, which is addressed through pigpio, I'd like to make pigpiod write warnings and debug messages (if such occur) to stderr.
2
votes
1answer
605 views

pigpio PWM and ALSA

My Qt ( C++ ) application successfully dims the screen using the pigpio library on my Raspberry Pi compute module. It works great and is very stable using the code below. The problem, is that my ...
2
votes
1answer
96 views

Any way to add more GPIOs to the AIY Voice Kit?

I'm working on a project using the google AIY Voice Kit V2 as a base. I'm planning on adding a keypad which requires 12 GPIOs. Does anyone know of a way to add more GPIOs to the Pi Zero W with AIY ...
2
votes
1answer
90 views

Two data parsing frames for SPI reads of MCP3008 ADC, any advantages or disadvantages of either one?

I am reading an MCP3008 ADC using pigpio, I've abstracted the script below. I have also found a slightly different construction or parsing of the three SPI command bytes and reconstruction of the ADC ...
2
votes
1answer
2k views

pigpio = DHT22 humidity sensor + TMP36 readings PROBLEM

What I'm trying to do is to read temperature from TMP36 sensor (over MCP3008 ADC), light from LDR, and humidity from DHT22 sensor. Firstly, I had one script for temperature and light readings, and it ...
2
votes
2answers
14k views

How to read Wiegand card ID?

I need a simple script that outputs ID of presented card in console. I tried a lot of opensource code that based on WiringPi library, e.g. Pidoorman, its forks by Kyle Mallory and E.J. Dyksen, RFID ...
2
votes
1answer
845 views

PIGPIO stream pwm data over websockets with nodejs. GPIO

i use servoblaster, one of the first projects for PWM (pulse with modulation) on the raspberry pi. Now i got a new raspberry and i wanted to try the very promising pigpio. It looks really fast and ...
2
votes
2answers
48 views

set specific angle in pigpio set_PWM_dutycycle

I just updated my code to use pigpio instead of RPi.GPIO, the later is working but my robot is trembling like a chihuahua, so I gave pigpio a try. In this piece of code I'm moving my servo, so to ...
2
votes
1answer
224 views

Why is pigpio library not moving my servo when the same pin number works perfectly with RPi.GPIO?

I am working on a self driving rc car project and I need a servo to steer my car. As I was getting a bit jitter with RPi.GPIO I tried pigpio library. I am using a Raspbery Pi Model B. But it won't ...
2
votes
1answer
82 views

remote connection pigpio

Asking the other day this question I discovered a new fascinating world, the gpio zero library. My first code was this (an example to blink a led): from gpiozero import LED from time import sleep ...
2
votes
2answers
2k views

Python pigpio 'no permission to update GPIO'

I am trying to run the following code on my Raspberry: import pigpio import fileinput pi = pigpio.pi() ### Define constants pwm_range = 255 pwm_clock_div = 8 left_motor_dir_pin = 35 ...
2
votes
1answer
779 views

Can GPIO mode be changed at once for more than one pin?

I'm currently trying to understand the pigpio library and I found it supports reading from and writing to more than one GPIO pin at once. However can it do the same with pin mode? I'm asking the ...
2
votes
1answer
4k views

Measure rpm using hall sensor and pigpio

So far i get a hall sensor and a raspberry pi 3. The hall sensor has 3 wires. I connected 2 of them for power it up (12v) and on the signal one i put a voltage divider to get around 3V on the output. ...
2
votes
1answer
387 views

Issue with pigpio. Can't set GPIOs

I've installed the pigpio library and so I decided to check it with a simple script that I hope it's right. I wanted to write a script whenever the PIR sensor detected motion. I've checked with ...
2
votes
1answer
41 views

gpiozero for remote gpio control not work

i just knew how to control gpio from my laptop to desire raspberry pi using gpiozero. so, i following this docs on how to configure the raspberry pi and my laptop to performing remote gpio control. i ...
2
votes
1answer
91 views

CE1 not going low for pigpio.spi_open() with flags

I'm attempting to modify joan's test script (https://raspberrypi.stackexchange.com/a/44320/42126) for an RPi SPI master to communicate with an Atmega328P slave. I cannot change which GPIO pins I have ...
2
votes
1answer
2k views

Active Piezo Buzzer Makes Sound On Both Rpi GPIO Low and High Level Signal

Goal: I want to replace a status-LED with a status-buzzer I use the same code which worked with the status-LED: (1) on start set buzzer to LOW (2) wait some time, than "blink" once (HIGH 200 ms then ...
2
votes
1answer
325 views

Pigpio reading sensor returning -83”i2c read failed”

I am testing using my new air quality 5 click sensor with my Raspberry Pi (https://www.mikroe.com/air-quality-5-click) using command line. When I enter i2cdetect -y 1it appears at address 48. Then ...
2
votes
1answer
756 views

Using hardware PWM and audio simultaneously

I am developing a project on a Raspberry Pi 3 B+. I am using the PWM0 channel to send a custom-made IR signal using PiGPIO waves. I gather it might then be possible to use PWM1 for mono audio; is that ...
2
votes
1answer
312 views

Are these both reasonable ways to check on the status of pigpiod from within Python?

I'm trying to check on the status of the pigpiod process from within a python script. These two methods both appear to work so far. Are there any significant advantages or disadvantages of one over ...
2
votes
1answer
388 views

error in atexit._run_exitfuncs when using DHT22 with pigpio library

I am using PIGPIO library to read temperature and humidity from a DHT22 sensor. This is the script I am using. import os import sys import time import pigpio pi = pigpio.pi() import DHT22 s = DHT22....
2
votes
1answer
839 views

Input NE555P pulses and measure width and frequency

After exhausting the google searches, I decided to post here for the first time. As the title suggests, I have created the NE555P circuit and although I can calculate the frequency and high/low width, ...
2
votes
1answer
485 views

Is Joan's pigpio rotary Encoder C library callable from python ctypes?

I'm using Python class Rotary Encoder to implement a Position PI on a stepper motor and using this encoder H6BM-1000-500-IE-S-H The code is working quite well, however I'm getting an error of ~5mm ...
2
votes
1answer
491 views

Is it possible to speed up code processing time by increasing i2c baudrate?

Is it possible to speed up execution time of a c++ program in raspberry pi solely by increasing the i2c baudrate and increasing the sampling frequency of the sensors? I have the issue of sudden ...
2
votes
1answer
233 views

pigpio returns -999.00 from pin 18

Thanks to this forum, I was able to successfully use the PIGPIO library to get my DHT22 sensor to work. My next requirement is to attach an RTC chip and it seems to use pin 4, which works for my ...
2
votes
0answers
34 views

Problem with PI GPIO using BB SPI

I've developed a PI Python application to replace an old control card which sent bit banging out to daisy chained LED drivers. It all works fine except when I need some fast updating of the LED's. ...
2
votes
2answers
584 views

AC mains dimmer dimming 7W LED lamp problem (RpiZero + MPDM V4.1)

I'm trying to dim a 7W LED with a Raspberry Pi Zero for home automation. However it doesn't work as expected. I followed this tutorial : https://www.youtube.com/watch?v=wqY4-gHqvZI . I have the exact ...

1
2 3 4 5