A message from our CEO about the future of Stack Overflow and Stack Exchange. Read now.

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
3
votes
1answer
678 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/...
0
votes
1answer
2k views

Pigpio With Pi 3 Controlling Two Servos

I am brand new to using the GPIO pins on the Raspberry PI and I'm having a lot of trouble trying to control two continuous rotation servos using pigpio with python and a keyboard. Servos here: https:...
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 ...
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. ...
0
votes
0answers
255 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
766 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 ...
1
vote
1answer
347 views

Using SPI on Raspberry PI gives error

I'm trying to read the output of an ADC chip LTC 1867 (need the high precision). I think I understand how it how works. Since it's output is 16 bit I need to send 2 8-bit words to it, the first word ...
2
votes
1answer
619 views

Sending new wave to pigpiod causes Pi to “lock up”

I'm running pigpiod on the Pi, with a Windows PC using the pigpio Python module. I create a connection to the Pi with pigpio.pi() and then send the wave repeat command to create a straightforward ...
0
votes
1answer
631 views

How many i2c buses?

My project involves talking to 16 IMU's at once. I can do 2 MPU6050 on one bus because of addressing, but I pretty much need 400kbps for throughput. I was looking over the pigpio library to see if I ...
1
vote
1answer
663 views

Using the ds18b20, why are you limited on pins you can use? GPIO4 only one that seems to work [closed]

This is in reference to this thread where they are all using GPIO4. I've got A0 of an arduino going into an arduino nano (using firmata) and then into GPIO4 since it appears to be the only pin that'...
1
vote
1answer
823 views

PIGPIO undefined reference to clock_nanosleep

I have a Raspberry Pi with an up to date Raspbian installation and I am using code blocks tools to compile an example program from PIGPIO. The compile fails with an: undefined reference to '...
1
vote
1answer
384 views

pigpio Python module doesn't always set GPIO pin modes for SPI

I am using the pigpio Python module's SPI functionality as a master (communicating with an external SPI slave). In the same Python script I'm also using my own bit-banged SPI driver on the same pins (...
0
votes
1answer
2k views

How to stop pigpio daemon from running at system start

I wish to use the pigpio C library which requires that the daemon is not running. My application will be in an embedded standalone system and I cannot therefore kill the daemon.
-1
votes
1answer
131 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]) #...
0
votes
1answer
967 views

Error occured “unhandled signal 11, terminatiing” in executing code with PIGPIO

I would like to connect GPS Module by using PIGPIO. but I can't. My code that show in below are occuring "Segment Violation",but I have no idea. Please help me. Here is GPS spec. GPS Receiver chip-...
0
votes
1answer
2k views

pigpio.start() error

Why am always getting this error when calling pigpio.start(): Traceback (most recent call last): File "/home/pi/aa.py", line 9, in <module> pigpio.start() AttributeError: 'module' object ...
1
vote
0answers
2k views

Cannot get pigpio PWM to work with an AC dimmer module

I am using an AC dimmer module to dim a 240V light. I would like to use node.js so I am using the pigpio module. The script is not working as expected as the light bulb goes straight to 100% when I ...
1
vote
0answers
173 views

how to expand GPIO pin for raspberry but still can use pigpio library

If I want to expand GPIO pin that can use as input/output on raspberry via I2C is whether I can use these pin with pigpio library?
1
vote
2answers
1k views

Max frequency can created by wave function in pigpio library

I want create difference phase between two pulse on GPIO 7 and GPIO 8 as in code but wave display on piscope only have 5us. I tried any way but when difference phase less 5 us is it alway display is ...
1
vote
1answer
1k views

pigpio servo control

I'm having a hard time finding the way to move multiple servo in c. I tried to use pigpio but every code that I tested failed (didn't moved any servo) I tried using python and it worked perfectly, ...
1
vote
1answer
790 views

How create phase delay between two square pulse

I want create phase delay (as below figure) between each pulse generated from pigpio library, I using usleep to delay before generate pulse as in code, but all pusle generted is not phase difference (...
0
votes
1answer
68 views

GPIO Pin 4 flashes even when it should be off

I have a raspberry pi B v1.1, with raspbian. I am using GPIO pins 4,17,27, to illuminate an RGB LED. My problem is that GPIO Pin 4 flashes randomly. Ok, not exactly randomly, it seems to flash ...
0
votes
1answer
127 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 ...
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 ...
1
vote
0answers
105 views

Why was my last AT command routine is not viewed in the output?

As I was using pigpio ,so that I can use the GPIO pins as UART or bit banging the serial. I am using a SIM900 gsm module. Here is the code: import pigpio import time import sys TX=23 RX=18 baudrate=...
1
vote
1answer
951 views

Thread working with I2C blocked

I have an python daemon running on Raspberry Pi. The daemon reads and writes value to chip connected with I2C bus. The chips are: MCP23008 (digital IO) MCP3428 (analog in) MCP4728 (analog out) The ...
1
vote
1answer
412 views

pigpio wave_add_serial unreadable

I got some trouble with my sample code while trying to use pigpio as software UART implement. I can read from RX pin but write to TX pin became unreadable Those are my code: #!/usr/bin/python import ...
2
votes
1answer
442 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 ...
0
votes
2answers
514 views

Is pigpio wave generator suitable for Position PID?

Is pigpio wave generator suitable for PID applications (constantly changing its value , on PID update) It is a position PID for a stepper motor with a pulse train driver , it works , however the motor ...
0
votes
1answer
932 views

How to turn off / let float a servo attached to GPIO

I'm driving servos attached to GPIO, powered from external PSU and using PIGPIO Library through node.js - everything works just fine but I don't know how to completely "shut down" the servos - once ...
0
votes
1answer
157 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
vote
1answer
132 views

Serial communication with two devices at once using pigpio?

I'm using the raspberry pi pigpio module to communicate with two other devices at once using two separate threads. The devices are connected to two different pairs of gpio pins. I need to adhere to ...
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 ...
1
vote
1answer
356 views

Is Raspbian signal(2) handling persistent or non-persistent?

I've been looking at the signal handling in a library I am using in a project of my own {Joan's pigpio as it happens} but having read the Raspbian man pages for signal(7), sigaction(2) and finally ...
0
votes
1answer
793 views

pigpio: PWM range for quadcopter ESC(electronic speed controller) command

Good day, I am currently working on a quadcopter project and am currently using the pigpio library for the PWM used to command the ESC's of the quadcopter motors. Will increasing the range of the ...
0
votes
1answer
891 views

HC-SR04 ultrasonic sensor reading becomes highly unusable when PWM is active

Good day I am trying to sample distance using a sonar/ultrasonic sensor for altitude measurement. When the PWM is not active, the sensor gives accurate measurements in centimeters, however with the ...
1
vote
1answer
924 views

Using INT interrupt line on PCF8574 I2C 8-bit IO-expander on Bit-banged RPi GPIO?

I am planning to use a triplet of RPi GPIO pins as an additional bit-banged I2C bus on my RPi. This will be run at a lower than typical rate (and level-shifted via a 3.3 to 5.0 V I2C shifter unit) so ...
6
votes
1answer
628 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 ...
2
votes
1answer
477 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 ...
4
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 ...
2
votes
1answer
572 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 ...
0
votes
1answer
506 views

Any way to run Python and Node.js in unison?

I am trying to make a led strip be run by my Pi, and with that, have a web output as well. I'm currently using this guide in order to control the LEDs (I know an arduino would be ideal, but I'm trying ...
1
vote
1answer
2k views

12v+ on Raspberry Pi Ground Pin

I am currently working on a project that requires a 12V RGB led strip controller. basically this is the controller: Please note that I am using a raspberry pi 2 and that the pins in this diagram does ...
2
votes
1answer
1k 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
0answers
2k views

Using SPI with pigpio to transfer data to Pi from an ADC

I've purchased an AD/DA Board in order to use analog inputs in my Pi, here it is: http://www.waveshare.com/high-precision-ad-da-board.htm As you can see it has a trimmer in it and I have wired it to ...
6
votes
2answers
16k 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 ...
2
votes
1answer
338 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 ...
1
vote
1answer
1k views

Read GPIO.output to make something happen in PyGame

I'm stuck :-) I've build a simple program with pygame. I have a rectangle (pygame.draw.rect(screen, state_color1 , ( 50, 450, 150, 5)) that changes color when it's pressed. Changing the state_color1. ...
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 ...
1
vote
1answer
2k views

pigpio's spi_xfer and spi_open functions

In my previous project I have used spidev in order to work with ADC, and in python script I could have: spi = spidev.SpiDev() spi.open(0,0) ... adc = spi.xfer2([1,(8+channel)<<4,0]) Now I'm ...