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
0answers
18 views

Hardware Timed Servo PWM

I am working on a some time-critical system that will run image processing and controlling 4 SG90 servo motors. In short, I will do visual-servoing. In this topic, joan pointed out some library, ...
0
votes
1answer
15 views

Is it possible to use my own settings for the hardware clock on pigpio?

I would like to use my own clock settings (integer, fractional, and mash) instead on the one that is autogenerated by the function gpioHardwareClock. Is it possible to do that with pigpio ? If not ...
1
vote
0answers
27 views

pySerial - UART - Determining when a message has actually been sent (callbacks?) (RTS/CTS hacking?)

For reasons (explained at the end of the post) I need to have a pin change state immediately as the UART finishes outputting a set of bytes. I'm using pyserial & pigpiod on a RPi3B+ and bluetooth ...
0
votes
1answer
14 views

how to check if pigpio is already initialised?

I would like to check if pigpio has already been initialized, is there a way i can check this at run time? Currently what i am doing is declaring a bool flag that is set after gpioInitialise(). ...
0
votes
1answer
21 views

pigpio gpiosetAlertFunc keep missing pulses that are measly 150Hz

I am using pigpio's gpiosetAlertFunc() to listen for a falling edge on a pin but it keeps missing like 80% of the pulses. the pulses are 400ns long that repeats every ~7ms. Im guesing that the pulses ...
0
votes
0answers
15 views

pigpio gpioHardwareClock() and gpioSetAlertFunc() does not activate on my second pi 4

So Im moving my code to a new pi4 from my old pi4 because i think the old one has some hardware problems. but when i ran my code on the pi 4 two of the functions that i heavily rely on does not work ...
0
votes
1answer
32 views

My pi 4 cant go beyond 5Mhz SPI without corrupting's the transaction

I am having troubles with my pi 4b, in which i could not push the spi beyond 5Mhz without the data being corrupted. I have an spi slave that is capable of abaout 15MHz on the serial clock (32ns high + ...
-1
votes
1answer
23 views

Can't connect to pigpio at localhost(8888) Can't create callback thread. Perhaps too many simultaneous pigpio connections

Have connected DHT11 to Rpi4. VCC--pin 1 datapin--gpio4 Ground pin--pin 6 It works fine fine but after giving the result for few times then I get this error. New to pigpio please do help me figure out ...
0
votes
0answers
25 views

mutltiple HX711 with mcp23017 expansion board

I try to set up multiple HX711 weight sensors on a raspberry PI with a MCP23017 expansion Board (baud rate 100kbps). The problem is that the HX711 sensor switches off when its input (pd_sck) is set ...
0
votes
0answers
18 views

pigpio hardwareclock does not produce correct frequency

The code for generating a clock on GPIO 6 (clk2) does not output the correct frequency gpioHardwareClock(6,5000000); Its is no where near the value, my logic analyzer is showing about 680Khz range I ...
0
votes
0answers
40 views

Raspberry Pi 4 auxillary SPI mode 1 data on wrong clock edges

I know it is a known issue that modes 1 & 3 do not work on the rpi aux spi. I gave it a try anyway on an rp400 and found some interesting results. Am currently using pigpio via python. This image (...
0
votes
2answers
35 views

pigpio scrambles hardware PWM signal

I'm using a dedicated library to run a ws2812 led strip. As far as I understand, this library sends a signal using the hardware PWM, via GPIO pin 18. This works fine and the led strip shows the colors ...
0
votes
1answer
48 views

Is it safe to use GPIO as GND for multiplexed 7-Segment display or should transistors be used?

I want to control a 4-digit multiplexed 7-Segment + Decimal Point Display (SH5461AS). This diagram (which allegedly comes from the datasheet of this display) suggests to use 4 external transistors to ...
1
vote
1answer
25 views

How can I get different values when reading the config register of an ADS1115 than I had written just before?

I'm trying to read data from an ADS1115 ADC attached to the I²C link of my Raspi 3B using pigpiod, but get nothing. In order to pin down the error, I took a deep look at the config I write beforehand ...
0
votes
2answers
25 views

What is pigpiod's analogon to the ADS1x1x_i2c_start_read () procedure in ADS1115's driver?

To make an ADS1115 ADC module running on my Raspi 3B, I am trying to use the driver supplied by Elektor Labs. The driver requires the user to develop the low-level part (I²C commands) himself and then ...
0
votes
1answer
144 views

Get servo position using pigpio

I'm currently developping (improving) an Octoprint plugin that is used to control servo motors with the pigpio library. I always thought that I had to initialize the servos at the start of the code by ...
2
votes
2answers
59 views

Full duplex SPI communication with an ADC using the pigpio library

I am trying to read the data from an Analog to Digital Converter (ADC), the ADS1248 from texas instrument using the pigpio library in python with the SPI protocol. When reading the data from the ADC ...
1
vote
1answer
488 views

High Impedance state for GPIO

I've not used GPIO on RPi much. On other hardware, the GPIO pins can be configured in software to be in a "High Impedance" state (Hi-Z). I have assumed that it's possible to place most of ...
-1
votes
2answers
42 views

uart loopback code using pigpioc on buster (3B+)

I have connected pins 14 and 15; ensured that serial is enabled via raspi-config, and swapped bt to the mini UART with this line: miniuart-bt=1 in the config file. I then run this code: int main() { ...
0
votes
0answers
19 views

pigpio's sending only partial and inaccurate data

I want to send IR signals with pigpio and receive it, all on a raspberry zero w. To send the data, I use the IR Record and Playback script from the pigpio library. To receive data, I use the code from ...
0
votes
2answers
83 views

pigpio.write doesn't properly set the output

I am currently trying to control an air conditioner via GPIO pins on the raspberry pi. For that I need to send a command with a length of 24 bytes via one pin (self.sendPin). I use the following code ...
1
vote
2answers
98 views

How can RpiZW interface three SPI ADS1248 ADC, one microSD adapter, and one Ethernet Adapter?

I'd like to connect multiple different SPI devices to a Raspberry Pi Zero W (at least 5), with a few specific requirements. The devices would be, if possible: 1x ENC28J60 Ethernet SPI adapter - this ...
0
votes
1answer
110 views

Failing to read I2C data on LPG10 flow sensor using Python

I'm having some issues reading flow sensor data (Sensirion LPG10, to be precise) using the RPi Zero's I2C bus. I think I have set the bus and wiring up correctly as running 'i2cdetect -y 1' returns ...
0
votes
1answer
55 views

3.5" LCD driver conflicts with UART

I'm using RPi Zero W with 3.5" LCD driver ( here ). Everything works well except the UART. Linux console is disabled and UART is enabled. When video output is on HDMI port, I can send and receive ...
0
votes
1answer
52 views

Compute module CM3+ change GPIO 37 alt function

I am trying to switch the alt functions on GPIO36 and GPIO37 on CM3+. I installed and ran the pigpiod service. I find that for GPIOs greaters than 27 that pigs command returns "no permission to ...
0
votes
2answers
40 views

Pigpio get_pwm_dutycycle returning old values

Using pigpio, I can set the hardware PWM value but getting it seems to consistently give three of the old values, a zero and then the new value, as well as the old value returned with the initial ...
0
votes
2answers
624 views

PWM issues with pigpio and RPi.GPIO

I am using Pi Zero W with latest Raspberry Pi OS. I have a backlight of an LCD that I am trying to control via PWM. If I use RPi.GPIO I get flicker at anything other that 100% (or 0%) duty cycle. As ...
1
vote
0answers
148 views

Pigpio for I2C slave on Pi Zero and the timing of data from the master

I'm using the pigpio library through pigpiod running on a Rpi Zero configured as a slave. The master is an ATMega328PB. On the Pi I am testing using a modified version of the python script provided in ...
1
vote
0answers
255 views

Rpi python with a PCA9685 PWM controller stopping a digital servo motor problem

I have several servos plugged into a PCA9685 board and controlling them with PCA9685.py, and at the end of the script at pwm.cancel() my SF3218MG (270 degree) and 6221MG (180 degree) servos turn off ...
0
votes
1answer
71 views

Issues with Throttle Control on ESC with RPi 3B+

I am using the 30A BLDC ESC to control a brushless motor from my Raspberry Pi 3 B+. The documentation for the ESC can be found here: ESC pdf I seem to have successfully calibrated the ESC, but after ...
0
votes
0answers
93 views

Is there a way to detect when a key is released in curses?

I'm currently working on a robot that uses keyboard inputs to move servos. I'm using the curses python library to control the key inputs, and pigpio to control the servos. Is there a way to detect ...
2
votes
1answer
154 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
2answers
255 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 ...
1
vote
1answer
269 views

Pigpio won't initialise when used by a script started by a service even with root privilege

Problem: I'm writing a Homebridge plugin that needs access to the Pi's GPIO. This plugin uses the pigpio javascript wrapper (https://github.com/fivdi/pigpio) of the pigpio C library (https://github....
1
vote
1answer
46 views

cleaning GPIO pins using pigpio module?

I am using pigpio module to control 12 GPIO pins of the Raspberry pi. WHich includes PWM reading, software PWM etc. I couldn't find a method to clean up the pin at the end of the program. Isn't it ...
0
votes
0answers
56 views

Unexpected behavior with pigpiod after long runtime

for a few months I use python3 with pigpiod (version 71) at Raspberry Pi 3B+ to control some actuators (on/off) and LEDs (on/off/PWM). My dimming algorithm uses the command pi.set_PWM_dutycycle(pin, ...
3
votes
1answer
112 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 //...
0
votes
0answers
73 views

Using pigpio and hardware PWM simultaneously

I am using pigpio to read 4 inputs. Everything works fine. And the entire process is a bit long and memory consuming. I also have to use one PWM output. I am planning to use the hardware PWM (pin 12 ...
1
vote
0answers
187 views

pigpio hardware PWM for servos

My goal is to build a pan/tilt system. this works fine: import pigpio pi = pigpio.pi() pi.set_servo_pulsewidth(13,1055) 2 questions: is pi.set_servo_pulsewidth using hardware PWM (I prefer HW PWM) ...
1
vote
0answers
62 views

High-precision time-varying PWM outputs on R Pi

I'e seen a lot of examples of simple PWM on the Pi where relatively high-precision PWM signals at a fixed duty cycle can be generated using WiringPi or pigpio in hardware PWM mode. I have tried ...
1
vote
0answers
166 views

pigpio: Read PWM from RCcontroller then send to ESC via GPIO

Im trying to learn Python by combining my interest in designing an AWD radio controlled car (3D printed, Im decent with Fusion 360 too) with some smarts from Pi/Python to allow things like software ...
1
vote
1answer
681 views

PIGPIO without sudo

I am working on setting up an automated deployment of an executable using the PIGPIO C bindings to a Pi Zero. I copy the executable to the pi (into a directory on pi user's desktop) as expected, but ...
0
votes
1answer
119 views

Servo motor keep shaking while using software PWM to drive

Greet everyone, I am using JavaScript with pigpio to develop my learning project. How come my servo motor keeps shaking when I drive it by program PWM? codes are posted as follow: var servo1GPIO ...
1
vote
0answers
33 views

pigpio servo, stop command not reliable

import pigpio import math import RPi.GPIO as GPIO from gpiozero import Button import time GPIO_SERVO_PIN = 27 limit = 17 switch = Button(limit) GPIO.setmode(GPIO.BCM) GPIO.setup(17, GPIO.IN, ...
1
vote
1answer
71 views

pigpiod callback is exiting my code

I have the following code: def read_adc(adc, lsb): # first read adc.writebytes([0x8E]) # ask for channel 0 my_bytes = adc.readbytes(2) # read channel value = (my_bytes[0] << 3) print(value*...
-1
votes
1answer
126 views

How to work several GPIO pins with shell script

I realise that this is a newbie question but no where on the internet do I find the answer. I want to control a couple of GPIO pins on Pi (3+mod A, Buster) so I write a simple shellscript. Its using ...
1
vote
1answer
115 views

Writing to GPIO 1 (ID_SC) witth Pigpiod C interface

I am writing a general-purpose stepper motor driver C shared library for the Raspberry Pi using PIGPIO (pigpiod C interface) for 4 to 7 motors using A4988 drivers. I designed an interface board (...
1
vote
0answers
266 views

JavaScript library for the HC-SR04 Ultrasonic sensor

I wired the sensor to my Raspberry Pi. My aim is to use JavaScript to get a live reading in the console of the distance, but the module I found has been archived by the author. Code that I found on ...
0
votes
0answers
324 views

Problem with pigpio library and infrared emitter

I have installed an infrared emitter with the following tutorial: https://www.instructables.com/id/Zero-to-Air-Conditioner-Controller-With-Raspberry-/ But I had trouble running the LIRC commands, so ...
0
votes
0answers
175 views

Pigpio Hardware PWM callback is slow

I am trying to drive a servo motor with Raspberry pi. I have selected pigpio library to access GPIO. I need to send a specific number of pulses with a given frequency. But when I callback a function ...

1
2 3 4 5 6