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
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. ...
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 ...
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 ...
2
votes
1answer
790 views

Active Piezo Buzzer Makes Sound On Both Rpi GPIO Low and High Level Signal

Goal: I want to replace a status-LED with a status-buzzer I use the same code which worked with the status-LED: (1) on start set buzzer to LOW (2) wait some time, than "blink" once (HIGH 200 ms then ...
3
votes
1answer
2k views

How to make a remote pigpiod socket call?

The pigpio GPIO library seems to provide a mechanism to invoke the pigpiod demon remotely using TCP/IP sockets. However, there appears to be some details missing. For example: Do we use a TCP or ...
0
votes
1answer
152 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 ...
3
votes
1answer
583 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 ....
0
votes
1answer
875 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 ...
3
votes
1answer
304 views

Output from pigpio unexpected

I have attached a DHT-22 weather sensor to my rev 1 raspberry pi after a fresh install of a recent install of debian. Following the instructions from https://www.youtube.com/watch?v=IHTnU1T8ETk I ...
2
votes
1answer
71 views

Two data parsing frames for SPI reads of MCP3008 ADC, any advantages or disadvantages of either one?

I am reading an MCP3008 ADC using pigpio, I've abstracted the script below. I have also found a slightly different construction or parsing of the three SPI command bytes and reconstruction of the ADC ...
2
votes
1answer
148 views

Does pigpiod feature a verbose / debug mode?

As I'm currently trying to debug an issue with my SPI link, which is addressed through pigpio, I'd like to make pigpiod write warnings and debug messages (if such occur) to stderr.
1
vote
1answer
488 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
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 ...
0
votes
1answer
652 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 : >...
0
votes
1answer
117 views

enable software i2c on raspberry pi gpio

I am trying to interface more than one sensor with Raspberry Pi Zero W, which communicate using i2c interface. So far I am able to connect sensor to dedicated i2c and read the data. Want to know ...