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
0
votes
1answer
18 views

Pigpio on callback get value

I currently have some code that I found that constantly outputs a value from a digital caliper. However, I want to modify this so that it is inside a function that can return that is returned from ...
0
votes
1answer
104 views

nodejs app running pigpio - error Can't lock /var/run/pigpio.pid

I am trying to run my Nodejs app but keep getting error: initInitialise Cant lock /var/run/pigpio.pid. I tired remove the the file with rm /var/run/pigpio.pid but the error remains. I have read tons ...
0
votes
0answers
14 views

Busybox init, is it possible to delay execution of init.d script conditionally?

I would like to boot into a python app. My python app has the excellent pigpiod daemon as a prerequisite. I am using Busybox init process. I have a pigpiod launch script /etc/init.d/SXpigpiod and my ...
2
votes
1answer
19 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
0answers
63 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 ...
-1
votes
1answer
92 views

Pigpio Wiegand timeout

I have an RFID keypad linked to my Raspberry Pi. It sends out a Wiegand 26 signal when someone presses a key or presents a card/fob. The code is based on http://abyz.me.uk/rpi/pigpio/examples.html I ...
1
vote
0answers
36 views

Interrupt issue - Wiringpi and pigpio show different values for pin

I am having an issue with raspberryio/wiringpi interrupts. A lot of extra interrupts are generated. My configuration is as follows: Physical pin 16: Set as input Pulldown resistor Interrupt ...
0
votes
0answers
160 views

pigpio python serial wave output not correct

I am trying to use joan's pigpio to write a serial command on my Rpi 3 gpio 14(UART0TX).My goal is to write a command from the pi to another device. When i send the command i do not see the ...
1
vote
2answers
39 views

ESC Initialization using Pigpio

I have been tasked with a little RC demo at our trade counter, and I need to control a few servo's and a ESC to run a motor. I have been trying to fumble my way around to no real avail, I have used ...
2
votes
0answers
38 views

Waveform not cancelling out hardware PWM

I've run into problems using pigpio's wave generator in combination with hardware PWM. Currently I'm working on a motion control with acceleration/sustain/deceleration phases. The phases are saved ...
1
vote
1answer
72 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 ...
1
vote
1answer
61 views

use GPIO and/or UART to slow initiate K-line (ISO9141-2) communication with Audi ECU

Related to this question I'm learning to use the Pi GPIO and Python serial to communicate through an IC (L9637D) to interrogate PIDs for alarms etc. I can't get past the slow initiation sequence! ...
1
vote
1answer
302 views

Problem handling failed call to pigpio

I've written some python code using pigpio over a network. I have two questions I can't seem to solve myself: Can I change the timeout when calling the pigpidaemon with pigpio.pi(<ip number>). ...
0
votes
1answer
210 views

Slow i2cdetect command response after running a program using the pigpio library

System: RPi # B OS: Ubuntu-16.04 Ma'te desktop environment Problem: i2cdetect -y 1 command response ultra-slow after running a program using the pigpio library in a program. ...
1
vote
0answers
15 views

Writing to a sensor register using i2c bitbanging library not working - PiGPIO library on Raspberry Pi

I am trying to configure a sensor connected to Rpi over an i2c bus. I am using PiGPIO library with Python to do this. To configure the sensor, I need to write a certain value to some registers and ...
0
votes
1answer
110 views

Python: fail to execute gpiozero Button command inside Class

while this code succeeds: def press_on(): print('press') HWButs = gpiozero.Button(21) HWButs.when_pressed = MainApp.init_buts.press_on inside a class, pressing the ...
1
vote
1answer
60 views

PC/Xbox Controller servo control

I am making a project where I want to use a PC/Xbox controller to control my servos with analog sticks. I've been following this tutorial and I've used the code down below to control my servo motor ...
0
votes
1answer
116 views

generated pulse with delay time before it generated

I want to generate about 16 square wave with delay time initial as the following figure .It mean each pulse generated must delay with a value of delay time before it generated with frequency about ...
1
vote
0answers
22 views

Cannot remotely connect to pigpiod

I have pigpiod installed on my system and enabled with systemctl enable pigpiod systemctl status pigpiod shows it is running, and I have programs which successfully access it on my Pi3B+ ● pigpiod....
1
vote
1answer
234 views

“initMboxBlock: init mbox zaps failed” when using pigpio library in a daemon using node.js

I am writing a daemon using node.js, running under systemd and it will monitor the status of the power supply voltage on a raspberry pi 2 B. I am using the node.js wrapper to the pigpio library The ...
2
votes
1answer
26 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 ...
0
votes
1answer
30 views

Wireless doorbell using gpiod

Good Morning, I have a non issue that I am just curious how its working. So I have a wireless doorbell that I built. It works using the gpiod and remote gpio. So I have a chime unit that I built with ...
0
votes
1answer
137 views

pigpio, update xfer.txBuf

Question refactored: Im currently struggling to understand how to update the transmit FIFO of the bsc_xfer. For reference: Slave side: int main(int argc, char** argv) { int GPIO = gpioInitialise();...
0
votes
1answer
928 views

OSError: [Errno 121] Remote I/O error or pigpio.error: 'I2C read failed' on MPU6050

So I use MPU6050 to get acceleration from stepper motor linear rail movement(steper motor working in thread, I use pigpio for the motor) by make the MPU6050 can work on threading and it can show data ...
1
vote
1answer
80 views

Pigpio not calling Callback for first rising or falling edge

I have some sample code (taken out of my larger program) that regularly (but not always) missing the first rising edge: #!/usr/bin/python import pigpio, time def callback(g, l, t): print("Callback ...
1
vote
1answer
44 views

PIGPIO bit banging UART - SLR to plaintext

I've managed to read UART input by SLRO and SLR commands from pgpiod, however, SLR returns UART bit-banged data in the following format: [number of read bytes] [bytes] http://abyz.me.uk/rpi/pigpio/...
7
votes
2answers
5k 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 ...
1
vote
1answer
77 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
90 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
63 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 ...
0
votes
1answer
425 views

GPIO Newbie, can i connect this Crazepony FPV Camera to the Raspberry Pi?

I am a complete noob when it comes to RPi and GPIO I want to connect 2xthis Crazepony FPV Camera 1.2G 1000TVL 1/4 CMOS 2.8mm Lens FOV170 Degree NTSC Mini FPV Camera to the RPi over GPIO pins, but don'...
2
votes
1answer
292 views

Active Buzzer makes sound on both LOW and HIGH

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
2answers
59 views

pigpio I2C reply value

I'm sending a command e.g. "wifion" with I2C arduino(master) to RPI(slave) That works perfect but I need to return a confirmation value. How can I send back/reply from the RPI to the Ardunio a value? ...
0
votes
1answer
36 views

PWM with pigpio does not trigger alert function regularly

I combine C examples of pigpio for gpioSetAlertFunc and gpioWaveTxSend working with the same pin. My PWM has several pulses, so I expect alert function to print out a message for me several times. ...
1
vote
1answer
36 views

RFID RC522 reader pigpio check error

I'm trying to connect Raspberry PI 3 B+ with RFID-RC522 (following this guide https://www.raspberrypi-spy.co.uk/2018/02/rc522-rfid-tag-read-raspberry-pi/). But I got stuck at the hardware ...
0
votes
0answers
31 views

Connect 3 Raspberry pi using i2c

I'm trying to use i2c to exchange messages between 3 raspberry pi, all of them must receive a message do something and then send a response. Raspberry as an I2C SLAVE From here I came up with a ...
3
votes
1answer
98 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 ...
0
votes
1answer
2k views

Software serial send with PIGPIO sending garbage

I have been using the excellent PIGPIO (http://abyz.me.uk/rpi/pigpio/python.html) to communicate with two RFID readers. One is attached to the inbuilt UART while I have been using PIGPIO to connect ...
1
vote
1answer
223 views

Problem counting pulses

I want to count pulses and find the frequency. Here is the picture of pulses from the oscilloscope: Obviously, frequency is around 1/2.3 ms = 420 Hz. First I tried this program: import RPi.GPIO as ...
5
votes
1answer
60 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 ...
0
votes
1answer
44 views

I2C slave on a RPi Model B with pigpio?

I want to use the I2C slave provided by pigpio with a Raspberry Model B. pigpio documentation says GPIO 18 and 19 are used for that. Unfortunately there is no GPIO 19 on an RPi1. Is it possible to ...
0
votes
0answers
12 views

How can I share a C++ class variable between a thread started with the pigpiod start_thread () method and the main thread?

I've got a C++ class containing some class variable like char some_class::current_command. One of the static methods of this class, say void Play () now calls the pigpiod start_thread () method to ...
6
votes
2answers
13k 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 ...
0
votes
1answer
60 views

Stuck inside socket.io

With the following node server I drive the motor speeds with a slider on a web page using socket.io. I would like to stop the motors when the robot touches a wall: var express = require('express'); ...
0
votes
2answers
76 views

Monitor data sent to shift register

I am trying to build a remote control for a jacuzzi using RPI. For that I have been analysing the data between the display and the main board. I found that the display holds 2 shift registers 74HC595 ...
0
votes
1answer
81 views

enable software i2c on raspberry pi gpio

I am trying to interface more than one sensor with Raspberry Pi Zero W, which communicate using i2c interface. So far I am able to connect sensor to dedicated i2c and read the data. Want to know ...
0
votes
0answers
36 views

How to track steps of multiple stepper motors with different frequencies

I’m working on a small stepper motor driven vehicle powered by a Raspberry Pi 3B. For the motor control, I am using the hardPWM function of the pigpio library from Joan, which is working great. I can ...
0
votes
1answer
60 views

How can I use the RPI3 to generate a sawtooth with frequency around 20kHz?

I am trying to generate a sawtooth waveform from the GPIO, the frequency is high, 20 Khz. is pigpio library my best option?
0
votes
0answers
105 views

How to control the raspberry pi over internet using android app?

I had bought a Raspberry pi 3b+ recently to make many of the projects I had dreamed of. Most of these (or maybe all) involves controlling the GPIO pins over the internet using an app. One of the ...
0
votes
1answer
86 views

pigpiod pid listen on port 8888 [duplicate]

My nodejs app is using pigpio. It keeps getting error because port pigpiod is listen on port 8888 already. I can kill -9 the process but when I restart pi port 8888 is jammed up again. How do i solve ...