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
31 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. ...
1
vote
1answer
223 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 ...
0
votes
0answers
141 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::...
2
votes
1answer
262 views

Are these both reasonable ways to check on the status of pigpiod from within Python?

I'm trying to check on the status of the pigpiod process from within a python script. These two methods both appear to work so far. Are there any significant advantages or disadvantages of one over ...
1
vote
1answer
546 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 ...
0
votes
2answers
1k 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
459 views

Strange return from pigpio i2c_read_device

I am using an air quality sensor with an I2C interface (datasheet: https://docs-emea.rs-online.com/webdocs/14cd/0900766b814cdbb8.pdf). When running the below code asking for less than 8 bytes I get ...
0
votes
1answer
2k views

RPi 3 with I2C as a slave, can be read by the master? [closed]

RPI 3-B, working in pyton with PIGPIO as a slave I2C device, can be read ? I'm actually using RPi as a i2c slave, master can write on it and RPi reads the buffer successfully. But could I write ...
0
votes
1answer
260 views

Can't read the right channel from MCP3008 in C++ using pigpio

I'm trying to use an IR sensor with Raspberry Pi and I have this function to read a specific channel from the ADC MCP3008. When I try to read any other channel but channel 0, it doesn't work. What I ...
1
vote
0answers
108 views

Generate multiple waves with specific number steps in a cycle wave

I want to generate a square wave has frequency 40khz on multiple GPIO pins of Raspberry Pi3 with time in order to start to generate wave (phase delay) is different. I have used a function of PIGPIO ...
0
votes
1answer
95 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
240 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
493 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
753 views

pigpio spiXfer in C++

I'm trying to communicate with MCP3008 ADC via SPI using "pigpio" library. Basically I'm trying to read an IR Sensor and I've managed to do it manually by sending the required signals but I can only ...
0
votes
1answer
80 views

How can I run pigpiod and gpsd on the same machine?

I've now got an Ultimate GPS board attached to the UART, and use both the GPIO pins, and the SPI interface by addressing the pigpio library. The pigpiod docs tell me that pigpiod would control the ...
0
votes
1answer
195 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....
2
votes
1answer
418 views

Where do the pigpio watchdogs run? Could watchdogs on multiple GPIO pins conflict?

I'm using pigpio bit-banging script (download, GitHub) that interprets the pulse durations generated by the DH22 Temperature/Humidity sensor. It sets a 200 ms pigpio watchdog to the GPIO pin and ...
0
votes
1answer
559 views

Compute Module 3 + PIGPIO SPI, Clock signal but no data

So I'm trying to write to as spi eeprom using the pigpio library, but I have the problem of only the clock line going active, none of the data or select lines. I'm debugging the signals with the ...
1
vote
1answer
792 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
519 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 ...
4
votes
1answer
214 views

How does pigpio's wave_chain() method happen in hardware?

The Python package pigpio has a wave_chain() method that allows one to chain together a series of waveforms in an easy-to define looping structure. But the GPIO chip itself has quite a limited number ...
2
votes
1answer
345 views

error in atexit._run_exitfuncs when using DHT22 with pigpio library

I am using PIGPIO library to read temperature and humidity from a DHT22 sensor. This is the script I am using. import os import sys import time import pigpio pi = pigpio.pi() import DHT22 s = DHT22....
2
votes
0answers
266 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 ...
3
votes
1answer
626 views

Is there a way to read the pullup status of a GPIO pin in python with, or if not, without pigpio?

I've discovered pigpio and am starting to learn to use it with Python. I thought I would use it to "discover" the pullup status of a pin before setting it, but while mode has both .set_mode() and ....
8
votes
2answers
7k 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
731 views

HC-SR04 distance = 0 using pigpio in C++

As the title says, the distance in my sonar is giving me 0, I think I found out the problem, but the code was working fine with wiringPi. Functions: I only changed names to be equal to Arduino ...
1
vote
1answer
849 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
1answer
883 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
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
1answer
424 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
2answers
544 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
2answers
675 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
588 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 ...
2
votes
1answer
622 views

Can GPIO mode be changed at once for more than one pin?

I'm currently trying to understand the pigpio library and I found it supports reading from and writing to more than one GPIO pin at once. However can it do the same with pin mode? I'm asking the ...
0
votes
1answer
422 views

GPIOs of Pi3 not working

Problem Description I have experienced some problems with the GPIOs on my Pi3. From one day to another the MotionSensor and the LED strip that where connected to the GPIOs stopped working while the ...
0
votes
1answer
517 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
0answers
165 views

How to configure pigpiod to prevent being affected by aplay

I'm using the pigpiod daemon and Python to output IR signals. I'm using raspbian jessie and rpi 3 model b gpio22 to output to leds. After starting the daemon by sudo pigpiod, it works fine and ...
0
votes
1answer
131 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
1answer
710 views

Try & Except fail to catch OSError

I'm trying to check if remote machine (RaspberryPi) runs pigpiod- a daemon needed down the road to control its GPIO, using Python. if remote/ machine does not run pigpiod an error is displayed : >...
2
votes
1answer
790 views

Input NE555P pulses and measure width and frequency

After exhausting the google searches, I decided to post here for the first time. As the title suggests, I have created the NE555P circuit and although I can calculate the frequency and high/low width, ...
1
vote
1answer
916 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
391 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
2answers
374 views

PIGPIO PWM Unreliable

I have written a small C application to do PWM for some motors connected to a Raspberry Pi. I am using the PiGPIO library. The code as follows: int[] FWD = {MOTOR1_FWD, MOTOR2_FWD}; int[] BCK = {...
1
vote
1answer
380 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 ...
1
vote
0answers
430 views

pigpio: Bad I2C Bus

I'm trying to start an I2c communication with my Raspberry Pi using the pigpio library. It works fine for me with SPI, but I really do struggle with I2C. When I use if (gpioInitialize() < 0) ...
1
vote
1answer
420 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 ...
3
votes
0answers
764 views

How to use pigpio to control 3 stepper motors with drivers

I need to control 3 independent stepper motors with stepper motor drivers using RPi. Driver of each motor requires STEP pulse to make one step (let's not bother about DIR and ENABLE signals for now). ...
3
votes
1answer
1k views

gpiotest problem and gpio 30

After soldering a header on my Pi Zero W I used pigpio's gpiotest utility to check for problems. I was dismayed that this produced no output and crashed the Pi. After stepping through the tests I ...
0
votes
0answers
146 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 ...
1
vote
2answers
2k 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 ...