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
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. ...
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 ...
1
vote
1answer
1k views

Multiple independent TTL input counters with Raspberry Pi?

I'm curious if the GPIO pins on a Raspberry Pi are capable of acting as a counter for TTL like signal inputs. I am interested in independently counting on six channels/pins, where the input signal ...
1
vote
0answers
47 views

Rpi python with a PCA9685 PWM controller stopping a digital servo motor problem

I have several servos plugged into a PCA9685 board and controlling them with PCA9685.py, and at the end of the script at pwm.cancel() my SF3218MG (270 degree) and 6221MG (180 degree) servos turn off ...
1
vote
0answers
62 views

pigpio hardware PWM for servos

My goal is to build a pan/tilt system. this works fine: import pigpio pi = pigpio.pi() pi.set_servo_pulsewidth(13,1055) 2 questions: is pi.set_servo_pulsewidth using hardware PWM (I prefer HW PWM) ...
1
vote
0answers
41 views

High-precision time-varying PWM outputs on R Pi

I'e seen a lot of examples of simple PWM on the Pi where relatively high-precision PWM signals at a fixed duty cycle can be generated using WiringPi or pigpio in hardware PWM mode. I have tried ...
1
vote
0answers
26 views

pigpio: Read PWM from RCcontroller then send to ESC via GPIO

Im trying to learn Python by combining my interest in designing an AWD radio controlled car (3D printed, Im decent with Fusion 360 too) with some smarts from Pi/Python to allow things like software ...
1
vote
0answers
17 views

pigpio servo, stop command not reliable

import pigpio import math import RPi.GPIO as GPIO from gpiozero import Button import time GPIO_SERVO_PIN = 27 limit = 17 switch = Button(limit) GPIO.setmode(GPIO.BCM) GPIO.setup(17, GPIO.IN, ...
1
vote
1answer
44 views

Writing to GPIO 1 (ID_SC) witth Pigpiod C interface

I am writing a general-purpose stepper motor driver C shared library for the Raspberry Pi using PIGPIO (pigpiod C interface) for 4 to 7 motors using A4988 drivers. I designed an interface board (...
1
vote
0answers
106 views

JavaScript library for the HC-SR04 Ultrasonic sensor

I wired the sensor to my Raspberry Pi. My aim is to use JavaScript to get a live reading in the console of the distance, but the module I found has been archived by the author. Code that I found on ...
1
vote
1answer
191 views

Raspberry Pi 4 to Mitutoyo Digimatic interface

I've been trying to interface a Mitutoyo digital caliper. I used the code from here and I think I made the right corrections according to the posters comments but as I checked he was last online in ...
1
vote
0answers
37 views

PiGpio – pass through binary data

I have two ports connected to GPIO on a Raspberry, where I read and send data NMEA sentences to external equipment using the PiGpio library in python, and this is working fine. Now I need to transfer ...
1
vote
0answers
162 views

Raspberry 3 model B v2 I2c slave, ESP8266 I2c master

I try to learn I2C with goal : read my ESP8266 events (I2C master) from my Raspberry 3 model B v2 (I2C slave). I use the Arduino Wire library on the ESP and python pigpio lib on the Raspberry. ...
1
vote
0answers
34 views

pigpio library dependencies missing when compiling Radiohead nRF24 library

I am using Eclipse 2019-06 CDT to compile the Radiohead nRF24L01 library (v1.97) using the pigpio interface (v71) with C++. I get the following errors: rpi/rfs_pizw2/usr/lib/libpigpio.so: undefined ...
1
vote
1answer
376 views

Bipolar stepper + L298N

I have a bipolar stepper motor with the following datasheet And a L298N driver wired like this: I tried the 3 NPM packages available for the L298N driver, but none of them work with my set up, the ...
1
vote
0answers
115 views

A stop job is running for Daemon required to control GPIO pins via pigpio

Since I installed Buster I have experienced slow shutdown. A message is displayed:- A stop job is running for Daemon required to control GPIO pins via pigpio and persists for 90 seconds. I have ...
1
vote
0answers
122 views

Interrupt issue - Wiringpi and pigpio show different values for pin

I am having an issue with raspberryio/wiringpi interrupts. A lot of extra interrupts are generated. My configuration is as follows: Physical pin 16: Set as input Pulldown resistor Interrupt ...
1
vote
0answers
31 views

Writing to a sensor register using i2c bitbanging library not working - PiGPIO library on Raspberry Pi

I am trying to configure a sensor connected to Rpi over an i2c bus. I am using PiGPIO library with Python to do this. To configure the sensor, I need to write a certain value to some registers and ...
1
vote
1answer
432 views

use GPIO and/or UART to slow initiate K-line (ISO9141-2) communication with Audi ECU

Related to this question I'm learning to use the Pi GPIO and Python serial to communicate through an IC (L9637D) to interrogate PIDs for alarms etc. I can't get past the slow initiation sequence! ...
1
vote
2answers
278 views

ESC Initialization using Pigpio

I have been tasked with a little RC demo at our trade counter, and I need to control a few servo's and a ESC to run a motor. I have been trying to fumble my way around to no real avail, I have used ...
1
vote
1answer
258 views

PC/Xbox Controller servo control

I am making a project where I want to use a PC/Xbox controller to control my servos with analog sticks. I've been following this tutorial and I've used the code down below to control my servo motor ...
1
vote
1answer
84 views

RFID RC522 reader pigpio check error

I'm trying to connect Raspberry PI 3 B+ with RFID-RC522 (following this guide https://www.raspberrypi-spy.co.uk/2018/02/rc522-rfid-tag-read-raspberry-pi/). But I got stuck at the hardware ...
1
vote
1answer
97 views

PIGPIO bit banging UART - SLR to plaintext

I've managed to read UART input by SLRO and SLR commands from pgpiod, however, SLR returns UART bit-banged data in the following format: [number of read bytes] [bytes] http://abyz.me.uk/rpi/pigpio/...
1
vote
1answer
1k views

Problem autostarting pigpiod

On my Pi3B+ I had pigpiod configured to run on boot and I can successfully run compiled c programs; specifically DHTXXD.c which contains:- /* DHTXXD.c 2016-02-16 Public Domain */ #include <stdio....
1
vote
1answer
77 views

Strange signals on GPIO 14 & GPIO 4 when ribbon cable is attached to GPIO

I'm using RP3B. I'm using piscope, as I don't have an oscilloscope available. After I boot my RP3B with nothing attached to the GPIO port, if I start pigpiod and piscope, I see all my GPIO with a ...
1
vote
0answers
117 views

pigpio monitor GPIO not detecting change correctly

I am having trouble detecting a level change on pin 16 (or any other pin). My script is as follows: import RPi.GPIO as GPIO from time import sleep GPIO.setmode(GPIO.BOARD) GPIO.setup(16, GPIO.IN, ...
1
vote
0answers
113 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 ...
1
vote
1answer
940 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
0answers
185 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 ...
1
vote
1answer
538 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>). ...
1
vote
1answer
532 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
1answer
522 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
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
185 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
0answers
115 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
141 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 ...
1
vote
0answers
230 views

Pi2 + pigpio + overclock + spi_read

I have an app reading temp + humidity from an AM2301. Using pigpio. Python 3.4.3. Newest firmware (as of 8/14/15) using rpi-update. Code is below. Breaks when overclocking the Pi to anything other ...
1
vote
1answer
100 views

PIGPIO without sudo

I am working on setting up an automated deployment of an executable using the PIGPIO C bindings to a Pi Zero. I copy the executable to the pi (into a directory on pi user's desktop) as expected, but ...
0
votes
2answers
459 views

How to continiously monitor Wiegand readers using pigpio library?

How do I need to modify the C example from http://abyz.me.uk/rpi/pigpio/examples.html for continious monitoring of Wiegand readers? I need to run it as background process. For now I have a code: #...
0
votes
1answer
49 views

Servo motor keep shaking while using software PWM to drive

Greet everyone, I am using JavaScript with pigpio to develop my learning project. How come my servo motor keeps shaking when I drive it by program PWM? codes are posted as follow: var servo1GPIO ...
0
votes
1answer
60 views

pigpio.error: 'no permission to update GPIO' Only on some pins

I am having an issue where I get this error 'no permission to update GPIO'. whenever I try to address certain gpio pins. I looked at other posts that had similar issues but they seemed to have either ...
0
votes
1answer
173 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 ...
0
votes
1answer
108 views

How can I use the RPI3 to generate a sawtooth with frequency around 20kHz?

I am trying to generate a sawtooth waveform from the GPIO, the frequency is high, 20 Khz. is pigpio library my best option?
0
votes
2answers
927 views

How to make a button toggle a led?

I have some code which turns an led on when I hold the button. But only when I am pressing it. Could somebody help me so when I press the button then the light stays on and if I press it again the led ...
0
votes
2answers
222 views

After switching from pigpio to pigpiod, how can SPI write operations display random bit errors?

I've already written and tested some code using pigpio to drive a Futaba GP9002A VFD. When using the pigpio lib directly, it worked almost absolutely fine, but after migrating to the pigpio daemon (...
0
votes
1answer
2k views

Pigpio setting mode to BCM or BOARD

Is there any option in pigpio library that sets pinout mode as BCM or BOARD ? I decided that in pigpio default is BCM but in RPi.GPIO there is an option to change that like GPIO.setmode(GPIO.BOARD) ...
0
votes
1answer
306 views

Speeding up updating of GPIO pins

I have a program where each step, two GPIO pins have their duty cycle updated (I'm using pigpio). I'm running the program for millions of steps (think 50 to 100 million) and running the PWM outputs ...
0
votes
1answer
1k views

PIGPIO wiring, basic i2c slave questions

I'm toying with pigpio and I can't find some informations: 1) I'm currently using a arduino uno to send bytes (as master) to a Rpi3 as slave, I currently use BCM2 as SDA (A4 on Uno) and BCM3 as SDL(...
0
votes
1answer
894 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
460 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 ...