Questions tagged [pigpio]

37 questions
1
vote
2 answers

Minimize CPU usage for software PWM in the Raspberry PI

I want to generate some 4 software PWM signals on GPIO pins (5, 6, 19, and 26) on the Raspberry Pi 4B using the pigpio library (which is in C). I want to generate a PWM frequency of 8 kHz. I was able to successfully move and control the motor with a…
BhavinT
  • 338
  • 1
  • 10
1
vote
2 answers

Code exits without error or exception at sleep

I'm running a Python code in a Raspberry Pi 4 which reads signals from certain pins and responds accordingly. On this function, after multiple prints in between lines, I narrowed the problem to (apparently) a sleep() call. def…
1
vote
1 answer

How to change a variable properly with pigpio SetAlertFunc?

I want to monitor for a specific GPIO pin which has a button connected to it and depending on the number of times the button has been pressed it will either turn on some LED lights, make them blink or turn them off. #include #include…
Ziv Ofir
  • 103
  • 1
  • 12
1
vote
1 answer

Pigpio permission bloqued for my actual user on Raspberry-pi

I am trying to read GPIO port 5 on a Raspberry pi, after trying some packages like onoff I decided to use Pigpio. It does connect to GPIO but the problem is that I dont have permissions for that user. It says: Sorry, you don't have permission to…
SrArkaitz
  • 488
  • 2
  • 8
  • 20
1
vote
1 answer

RPi.GPIO interrupt then make caller immediately return?

So right now I have two functions: Def dostuff(): # do stuff 1 GPIO.add_event_detect(button,…,callback=Interrupt,…) # do stuff 2 Def Interrupt(): # other stuff When I run dostuff() it does stuff 1, registers the interrupt, then does stuff…
tehifa3994
  • 21
  • 2
1
vote
1 answer

Using Gpio on Raspberry Pi 4 B with uno-platform

I realy hope im not the only one having this problem (i deleted my previous Question because it seems kinda missleading so heres my secont attempt) I try to use the Rasbpery pi 4b GPIO Pins using a Uno app: my setup: i tried it before with a consol…
user13665526
0
votes
0 answers

Why is sched_yield() necessary to bitbang GPIO output on Rasperry Pi

I'm trying to implement a synchronous protocol to talk from my Pi (Model 3B V1.2) to a separate processor (6502/6522). I started by using pigpio. I observed that I have to insert calls to usleep(0) or sched_yield(). Otherwise the communication…
Dottore
  • 1
  • 1
0
votes
1 answer

Can't pass object into function

So I'm trying to make a program to provide a interface between a raspberry pi and a accelerometer/gyroscope. I need this function to update as often as possible and I want to set a timer for when it will run. And here is my code: void…
0
votes
0 answers

PIGPIO won't compile in CLion on Windows

I am trying to write a c++ program for Windows that will use pigpio to stream data to a SPI device connected to a raspberry pi. I have already made a working Python version using this library and now want to remake it in c++. I am inexperienced with…
user15134436
  • 131
  • 1
  • 4
0
votes
0 answers

Passing data to GPIO pins in python on Raspberry Pi

A raspberry pi is connected to three stepper motor controllers. Each controller needs two gpios: one for direction (high is clockwise, low is counterclockwise), and one for a step signal. Setting a GPIO high and low again will trigger a step of the…
Nuke
  • 19
  • 1
0
votes
0 answers

Raspberry Pi having issues sending multiple bytes over I2C as slave

I am trying to get two way communication going between a raspberry pi and a microchip, where the raspberry pi is the slave. My current solution is working fine, except for the fact that the raspberry pi seems to struggle sending multiple bytes at a…
Mrmola
  • 1
  • 1
0
votes
0 answers

Apache making python acting differently

I am working on a IoT project. I am using flask and apache2. When I to run the program, I get errors with it trying to use the modules. I tried the following Reinstalling the module to other versions, Adding PYTHONPATH, and expanding the python code…
zealotben
  • 13
  • 2
0
votes
0 answers

Remote GPIO via gpiozero SBC-Moto1 slow execution

I am pretty new to the Raspberry Pi. I'm trying to run a stepper-motor, which is connected with my raspberry, with my windows computer. I'm using the library gpiozero. The Code on my Raspberry is working correctly and also pretty fast so the…
0
votes
0 answers

Can't connect to pigpio at 192.168.1.3(8888)

I want to get the temperature of the cpu but each time it thorws a error I also used different libraries but it still it shows some error. from gpiozero.pins.pigpio import PiGPIOFactory factory = PiGPIOFactory(host='192.168.1.3') cpu =…
Praveen Kumar
  • 199
  • 11
0
votes
0 answers

Is there an equivalent approach to wiringPiNodeStruct in pigpio?

my question is: Is there an equivalent approach to wiringPiNodeStruct in pigpio? More specifically, I want to translate some codes that you can find for WiringPi to codes that use pigpio. It looks like this: // wiringPiNodeStruct: // This describes…
Micha93
  • 628
  • 1
  • 9
  • 22
1
2 3