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
160 views

Using pigpios waves and audio output

I am using a Raspberry Pi 3 B+. I want to play audio through the 3.5mm jack and use PWM at the same time or successively to simulate a IR-Remote. I know that you can't use the hardware PWM while ...
0
votes
2answers
161 views

433mhz Status sockets project

I've been working on getting a Home automation project going for a while, using a Rasp pi 1b (26 pin header). This is a well trodden path by others, as it is a project to control status remote sockets:...
0
votes
1answer
84 views

pigpio bsc_xfer_t char problem

I am implementing an I2C slave in c with PIGPIO and I have run into a snag. I want to send numbers. The struct is typedef struct { uint32_t control; /* Write */ int rxCnt; ...
0
votes
1answer
45 views

Counting Two Pulses Generated By Rotating Motor

I want to Count pulses based on some Conditions which are: (1) Count all the rotations generated during motor Rotations. (2) Count all the motor rotation pulses when an additional signal is enabled. ...
0
votes
2answers
115 views

Pigpio equivalent of GPIO's event_detected() function?

Is there an pigpio equivalent to GPIO's event_detected() function? I need something that is constantly watching for a button press. The code I currently have doesn't consistently detect it (python ...
0
votes
0answers
241 views

Raspberry Pi Zero as master communicating with multiple Raspberries Pi Zero over I2C

The project I'm working on involves in total 8 raspberries, one master and all others acting as slaves. The goal is to write to all Pi's and read back their answer. Communication using the master ...
0
votes
0answers
29 views

PiGPIO inconsistent when using servo

so I will do the following command once and it will work and then the same sequence of commands never works again. Any help is appreciated, thanks! The commands are to first arm some ESCs then ...
0
votes
1answer
151 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
0answers
61 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 ...
0
votes
0answers
63 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 ...
0
votes
1answer
113 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. ...
0
votes
1answer
94 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
21 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 ...
0
votes
1answer
270 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 ...
0
votes
0answers
455 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
239 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 ...
0
votes
1answer
397 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
130 views

using I2C in threads

I have several devices on one I2C Bus and am wondering now what happens, if I have some threads using this one I2C Bus. Do I need to implement a scheduler or is the I2C Bus automatically blocked ...
0
votes
1answer
414 views

pigpio library serial_wave confusion

I am trying to use joan's pigpio for python to try to write a command from a rpi3 GPIO pin to a peripheral device. the peripheral device uses UART and when it receives a data packet it will then ...
0
votes
0answers
397 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 ...
0
votes
1answer
3k views

How to read motor RPM open collector tach output

I have this motor which has a tach output that I want to use to read motors RPM, EC centrifugal fan - RadiCal. On page 4 there is a shcematic diagram and it also says Tach output: open collector, 1 ...
0
votes
1answer
100 views

Raspberry PI GPIO Extender [closed]

I am trying to control 42 relays with a Raspberry Pi 3 B+. Due hardware limitations, there I cannot do that with the current amount of GPIO pins. I've found some GPIO Expansion Boards online, but I ...
0
votes
1answer
2k views

RpiZeroW - Can't find `pigpio` while running Python code

I have a python code, using gpiozero. When running this code on a RPI-ZEROW it fails, while running same code on RPI3 it succeeds. All installed pretty much the same ( shown checks below ), pigpio is ...
0
votes
0answers
93 views

How to generate a hardware PWM wave for driving an LED through RPIO?

I've looked through the documentation of RPIO, and used GPIO18 to get my PWM up and running. This is my code: from RPIO import PWM servo = PWM.Servo() servo.set_servo(18, 4000) As explained in the ...
0
votes
1answer
447 views

pigpio spi : use an other GPIO for chip select

I'm using the Waveshare High-Precision AD/DA Board, and they not use the default chip select pin of RPi (GPIO# 7, 8) for SPI. Using the pigpio python library, I want to know how to change the chip ...
0
votes
1answer
214 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
0answers
37 views

Attempting to read from GPIO23 but it only reads 0

I am trying to follow this guide on making an ir receiver/blaster. Currently I am trying to work on the receiver end of things but the pin reads 0 at the beginning instead of 1 like the guide says. ...
0
votes
0answers
150 views

How can I make the JustBoom DAC HAT not interfere with pin #22?

I've got the following tricky problem: I'm using pin #22 (GPIO25) of my Raspi 3B as a GPIO input and read its state by using the pigpio function gpioSetAlertFunc (25, relay::IgnitionISR), where relay::...
0
votes
2answers
2k views

Why would os.system('sudo pigpiod') fail silently, but only part of the time?

I'm trying to learn how to safely and reliably start and stop the pigipod DEOMON process from within a python script. If pigpiod happens to be running already, then this script is always successful. ...
0
votes
1answer
122 views

How can i listen to input in very precise manner of microseconds. Like piscope. Using pigpio socket interface, pigs or liberary

I want to get time and count of input pulse in microseconds using pigpio. How can i Listen to gpio pin in spreate thread.
0
votes
1answer
328 views

Pigpio not closing

I have a program that is meant to read data: import pigpio pi = pigpio.pi() if not pi.connected: exit() h = pi.i2c_open(1, 0x5a) c, data = pi.i2c_read_device(h,0x09) print(data) pi....
0
votes
1answer
597 views

create exact number of pulses in raspberry pi with DMA library to control industrial Delta Servo Motor angel and rotation [closed]

i want to control exactly how mush my servo rotate through DMA like pigpio with raspberry pi so i need to create exact number of pulses for servo . is there anyway to create exact number of pulses ...
0
votes
1answer
248 views

Detecting Button Press and Lighting LED [closed]

Using the pigpio library, I wanted to detect when a button is pressed and turn on/off an LED. I am trying to use the gpioSetAlertFunc function to trigger the LED when the button is detected as pressed....
0
votes
1answer
145 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 ...
0
votes
0answers
156 views

Quadcopter beginner using pigpio

I'm trying to build quadcopter using my raspberry pi. I have a few questions I would like to get some answers.. When I connect my ESC to the battery is starts beeping with 1-2 seconds spaces and ...
0
votes
0answers
283 views

Reading Different Channels Sequentially Using SPI

Background: I am trying to make transfer measurements from an ADC LTC1867 to my raspberry pi using SPI. I get it to work with one channel. The ADC has 8 channels, I have one channel connected to a 2....
0
votes
0answers
901 views

How to determine if DHT22 is working?

I got this DHT22 sensor (COM-FOUR DHT22 AM2302) but I'm not able to extract any data from it... Current setup is Rpi2 -> Breadboard -> DHT22 Pi is based on standard configuration where I've only ...
0
votes
1answer
165 views

PIGPIO Stream Incoming Data with a timestamp and in Hex to a Laptop with USB

i use the Raspberry Pi 2 Model B and want use the Raspberry as a Man-in-the-middle. description what i want to do: I have to catch the incoming data (9-bit protocol 4800 baud) transform them to ...
-1
votes
1answer
48 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
votes
2answers
26 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() { ...
-1
votes
1answer
141 views

how to change the reading channel? [duplicate]

this code is reading from channel 0, how can i change the reading channel MCP3008 adc = pi.spi_open(1, 40000, 0) # Open SPI channel 1. while True: try: c, d = pi.spi_xfer(adc, [1, 0x80, 0]) #...
-1
votes
1answer
140 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 2 3 4
5