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
2
votes
1answer
476 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 ...
2
votes
2answers
199 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? ...
2
votes
0answers
75 views

Trying to use pigpio wavechains to drive very specific acceleration and deceleration

I'm working on a kinetic sculpture that involves a large pendulum swinging perpetually left to right. I'm using a raspberry pi 3 B+ / arduino uno with a DM860AC to control a nema 34 stepper. I was ...
2
votes
0answers
282 views

Any GPIO library that supports I2C multi-master mode?

I am thinking of joan's PIGPIO library but I am aware there are others for the RPi, and I was wondering whether there are any that support multi-master I2C mode? As far as I can tell {see here} this ...
2
votes
1answer
667 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 ...
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 ...
1
vote
3answers
3k views

Alternatives to LIRC for transmitting IR codes

Alright, I've managed to get LIRC to work on a Pi 3, but not on a zero w running raspbian lite. I have the infrared codes I want to send (e.g 0x40BF or 0x8877) and I'm wondering if there's another ...
1
vote
2answers
148 views

Why are some services only listening on IP6

I have previously asked a question Cannot remotely connect to pigpiod (now deleted) but never resolved the issue. This is a more generic question. sudo ss -lntp State Recv-Q Send-Q Local ...
1
vote
2answers
3k views

How to create multiple GPIO pwm waveforms that are in sync using pigpio for trapezoidal motor control?

Explanation I am using a Rpi 2 model B, and PIGPIO to generate PWMs. Goal is to run a three phase permanent magnet synchronous motor using the Rpi 2 with IRAMS10UP60A. Need 6 repeatable waveforms to ...
1
vote
1answer
31 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
vote
2answers
606 views

I2cReadByte, bad handle, Pigpio c++ Library

I recently bought on ebay a sensor for a drone project im working on MPU9250 BMP280 10DOF the thing is i always get a "bad handle" error, and honestly i cant figure it out. 2017-11-18 22:10:03 ...
1
vote
1answer
637 views

High speed bit bang GPIO reading

I'm trying to establish a UART communication link by means of bit-banging. For the TX part, I am using the pigpio lib to form a 1Mbaud wave of bits (gpioWaveAddSerial). I have checked it and it with ...
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
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 ...
1
vote
1answer
84 views

GPIO PWM. ESCs still run different after calibration

I’m putting a quadcopter together. I’m using a python script to calibrate the ESCs... they beep like a blinking led when I give them power. Then I run the calibrate script and they give me the proper ...
1
vote
1answer
164 views

how to set RF frequency in PiGPIO?

I'm using the PiGPIO library to receive a waveform but I don't see a way to make sure the RF frequency is correctly set. I'm using the class rx() which is supposed to read a signal transmitted on 433 ...
1
vote
1answer
253 views

ImportError: No module named wavePWM

I am trying to generate 6 simultaneous PWMS to run an AC motor. I have gone through the following link How to create multiple GPIO pwm waveforms that are in sync using pigpio for trapezoidal motor ...
1
vote
1answer
962 views

RaspberryPi 3 pigpio not functioning properly in C++

I was messing arround with PWM and wiringPi in C++ language, but I found out that there was a better library (might be the most updated) called pigpio. Since I was new to this I was trying to the the ...
1
vote
2answers
790 views

Pigpio wave chaining - count total pulses sent

Using Pigpio to drive a couple of stepper motors on a CNC-like system, I'd like to "initialize" by setting up a repeating wave to continually step until a limit switch has been reached, at which point ...
1
vote
1answer
1k views

Ubuntu 17.04- can't find pigpiod

On a non Raspberry Pi (just an ordinary laptop, installed with 17.04) - I'm trying to run a Python script to control Pi's Remote GPIO, with no success. pigpio module is installed as ordered in pigpio ...
1
vote
1answer
773 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
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

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
390 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 ...
1
vote
1answer
32 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
41 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
31 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 ...
1
vote
1answer
41 views

Remote GPIO transfer protocol

Wondering about host to host security concerns when using Remote GPIO (with pigpio). An open port is very likely to be insecure, I understand that. After googling there are some questions that I ...
1
vote
1answer
94 views

How can you use pigpio's set_servo_pulsewidth with an i2c address?

I've tried to use hexadecimal for the GPIO address to see if it would work with GPA0 on the MCP23017 import pigpio import time pi = pigpio.pi() gpio_num = 0x21 while True: pi....
1
vote
1answer
68 views

What is the frequency and cycle length of the pigpio library?

I've got a raspi 3b with an esc and a brushless motor attached. I can run the motor using pigpio the following commands: # First start the pigpio daemon sudo pigpiod # calibrate the esc pigs s 12 ...
1
vote
1answer
136 views

PIGPIO problem with delay on scripts

I am trying to run an old Raspberry Pi 2011.12 as a server to control a RGB LED strip. To this I am using PIGPIO since this is the best solution (RPi.GPIO is software based, which creates flickering). ...
1
vote
1answer
60 views

Python boot run script act strange with GPIO (software serial)

I put my python script as boot running(rc.local) on my headless Rpi 3B+. It meant to controls three identical devices through serial cable and I am using GPIO PINS[17,27,22] for the software serial. ...
1
vote
1answer
64 views

Not able count Pulses Generated by PLC

I am using the below code to capture the pulses and count pulses for a specified interval but the output not as what i expected. For every pulse it is giving uncertain value. The pulse i want to ...
1
vote
1answer
470 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 ...
1
vote
1answer
72 views

When switching to pigpiod, which replacement shall I use for gpioSetTimerFunc()?

When still using the pigpio API "directly", I made extensive use of the gpioSetTimerFunc function, just like this: gpioSetTimerFunc (4, 500, OnRDSDataTimerElapsed); After making pigpiod do all the ...
1
vote
1answer
453 views

Updated info/software/advice on using Raspberry Pi to control stepper motor drivers

It's been almost a year since the last posting in here covering this topic - are there any newer examples or libraries that you (Joan or anyone) know of that do the acceleration ramp, constant run-...
1
vote
1answer
758 views

Fail to run Remote GPIO code from a PC using python3

I'm trying to run a remote GPIO code from a Linux machine to operate on RPI3. Code is running OK on another RPI3 to control each other, but when trying to do so from a PC, it fails. I followed the ...
1
vote
1answer
633 views

pigpio bitbang i2c returns random data, smbus is OK

The scripts and the results mostly speak for themselves. smbus returns good data when I use the standard I2C GPIO pins, but the pigpio bit banging I2C returns what looks like random data. What might ...
1
vote
1answer
945 views

How to read two rotary encoder data using pigpio c++ library in raspberry pi?

#include <iostream> #include <pigpio.h> #include "rotary_encoder.hpp" void callback(int way) { static int pos = 0; pos += way; std::cout << "pos=" << pos << ...
1
vote
1answer
559 views

Bit banging an MCP3008 with pigpio bb_spi returns all 1023s

I started to try to read an MCP3008 ADC using SPI bit banging with pigpio. I wrote the unattractive little script below, starting from the example in the pigpio documentation and here is a screenshot ...
1
vote
1answer
990 views

How to set sample rate for pigpio deamon?

I'm using Pigpio library to generate a pulse that its resolution is 1 microseconds. I used to ' sudo pigpiod -s1 ' to set sample rate for Pigpio but It appears error as in the figure below. Please ...
1
vote
1answer
501 views

Simultaneous generation of multiple different square waves on GPIO

I am working with a simple hardware design that requires the generation of 3 different square waves on different GPIO pins of the Raspberry Pi 3. I have reviewed posts such as this one: RPi GPIO as ...
1
vote
1answer
568 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'...
1
vote
1answer
438 views

Frequency generated by pigpio library not correct

I have used Pigpio library to generate pulses on rasp pi2 since last year. The all thing have worked quite good. But 3 days ago, the my rasp appear faults and it don't accept me use more. So I must ...
1
vote
1answer
385 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 ...
1
vote
1answer
876 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
413 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 (...
1
vote
1answer
876 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 (...
1
vote
1answer
433 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 ...
1
vote
1answer
1k 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 ...