87 questions
1
vote
0
answers
27
views
GPIO readings and OSC forwarding using Python in Raspberry Pi
I am trying to set up a simple Raspberry Pi server that sends an OSC message when a button is pressed. My plan was to read the GPIO using a Python script and send the OSC message to PureData, running ...
0
votes
0
answers
278
views
Using GPIO pin and neopixel Raspberry Pi 5, Failed to open PIO device (error -22)
I have switched from my Raspberry Pi 4 to Raspberry Pi 5 for computational power means for part of a project. I have encountered many errors trying to use NeoPixels on the pi5 (was working fine on the ...
0
votes
0
answers
215
views
Issues with importing modules with Thonny
I've been trying to get the gpiozero module into Thonny for a while (for use with a Raspberry Pi) and I've been having lots of issues with it. I installed gpiozero using the package installed inside ...
0
votes
1
answer
192
views
gpiozero combining button events in event driven code
I'm pretty new to the Python and Raspberry business and am currently working on my first major application. I like gpiozero and the ability to work with events throughout.
I would like to make my code ...
0
votes
0
answers
126
views
python Raspberry Pi double occupancy of GPIO
I have a Raspberry Pi with an Display and Buttons (here). And I have a program, that uses the Library (in the appendix) from the Display. The program creates a home screen with dynamic apps. Each app ...
-1
votes
1
answer
205
views
asyncio only running first gpiozero coroutine
I'm trying to make gpiozero play nicely with asyncio in my RPi 4 but ran into an issue that I can't solve. Essentially I'm trying to get the turn signal (clock wise, counter clock wise) af a rotary ...
1
vote
0
answers
56
views
VLC module for python, video not always start fullscreen
for a project on a Rpi I need a video to be played fullscreen. I was used to work with Omxplayer but as being deprecated I need now to use VLC. Sadly the video randomly start in a separate windows ...
0
votes
0
answers
132
views
Can't install approxeng.input==2.6.3
I am making a weird robot out of k'nex and a pi and I am controlling it over bluetooth with a DS4.
The motor
The controller
The DS4's D-pad will control the movement. I was looking for librarys to ...
0
votes
1
answer
4k
views
Servo jittering and not turning fully
I started a project with servos, making a crude robotic arm, with two servos. the issue is, that my servo keeps jittering when stationary, sometimes too much, and can cause the thing to fall over. ...
0
votes
0
answers
377
views
No output when using the shell_exec() function in php to run a python script that imports a gpio library
I am trying to use php to execute a python script, and then retrieve the output of that script for later use. I am running a LAMP server on a Raspberry Pi 4 (set up according to this article https://...
0
votes
2
answers
369
views
Remote GPIO (Pigpio) with input from laptop and output from Raspberry Pi
I'm working on an object detection project for IoT using a webcam and servo. In short, when the object detected by the webcam matches the data in the system, the servo will move. Can the webcam be ...
0
votes
0
answers
107
views
python this gpiozero method is not working right of the bat
from gpiozero import MotionSensor
While true:
MotionSensor(17).when_motion()
print("motion detected")
returns error:
Traceback (most recent call last):
File "/home/pi/...
0
votes
1
answer
284
views
Discord.py program using 100% of a core
I have a Discord bot running in python on a Raspberry Pi 3B+. The purpose of this program is to send the lab status to our server by the push of a physical button. I've noticed that the program itself ...
0
votes
2
answers
2k
views
how to fix "TypeError: 'bool' object is not callable"
I'm trying to control a stepper motor with python code. I know this may not be the best way but please just help me and bear with me. I got this working a while ago I'm pretty sure and I have no idea ...
0
votes
0
answers
634
views
What environment variables do I need to change to allow pigpio to connect to a raspberry pi remotely?
I am using the gpiozero and pigpio libraries to create a remote gpio control application in python. The pigpio documentation advertises this as a feature, so I know it's possible. Here is the ...
0
votes
2
answers
140
views
A function is running despite me changing a variable that should stop it
I was hoping someone could help me with this issue. I'm hoping it's fairly simple to fix, but I have been trying for a while to figure this out. I have trimmed my larger code to this, as I believe the ...
1
vote
2
answers
509
views
How to stop repeat on button press/hold - Python
I was hoping someone might have some insight on how to stop a script from continuing to repeat if a button is held (or in my case pressed longer than a second)?
Basically i've a button setup on the ...
1
vote
0
answers
130
views
gpiozero generating io.TextIOWrapper 'noise' when getting load_average
I'm trying to use gpiozero LoadAverage to get the average system load for display on a small OLED plate. The problem is, any time I try to assign LoadAverage().load_average to a variable, it generates ...
0
votes
1
answer
1k
views
Raspberry PI : GPIOZERO on I2C pins
This is on the Raspberry PI.
I was able to get the I2C-1 to work properly on the PI using Python.
Then I ran another Python script that uses one of the I2C pins as a GPIO using the GPIOZERO library.
...
0
votes
1
answer
476
views
Raspberri pi with gpiozero relay hangs on when using while loop
I am using this relay module with Raspi zero.
https://www.amazon.co.jp/gp/product/B083LRNXBJ/ref=ppx_yo_dt_b_asin_title_o02_s00?ie=UTF8&psc=1
And I am using gpiozero to control relay.
import ...
1
vote
0
answers
290
views
Python Curses Displaying an Integer
First time posting. I'm a novice writing a python program. I'd like to to curses to display outputs from sensors connected to a Raspberry PI and created the follow code as a test to understand what ...
0
votes
1
answer
847
views
Raspberry Pi + GPIOzero: press button to change a variable in a loop (while the loop keeps on running)
I'm trying to make a visual metronome of sorts in which I press a button in order to change the bpm. Once the bpm is 85, if the button is pressed once more, if goes back to the default bpm (of 120).
t
...
0
votes
1
answer
2k
views
How to use gpiozero.Button.when_pressed within a class or function
I'm working on a weather station (raspberry pi) and I'm using python. I developed a program that is working, but now I decided to update my code and to structure everything (making classes etc.).
But ...
1
vote
1
answer
884
views
RPi.GPIO problems on PI 4b
"This module can only be run on a Raspberry Pi" error when using RPi.GPIO on Raspberry Pi 4b.
This error was caused by the default RPi.GPIO version installed with:
python3 -m pip install RPi....
0
votes
1
answer
272
views
Python break out of poll when key pressed
Apologies for the newbie Python post, but a bit of Googling and I still can't find what I need.
I have the following Pi Hat; https://github.com/modmypi/Jam-HAT, ...and I'm using their docs to guide me;...