Questions tagged [rpi.gpio]
rpi.gpio refers to the package name of a Python module for accessing the Raspberry Pi's GPIO pins. The module allows GPIO pins to be initialised, turned on, and turned off. It uses a functional programming style.
719
questions
0
votes
1
answer
16
views
Hooking Up an RJ-12 Cable to a Raspberry Pi Pico W: Simplifying Data Collection
I'm looking to gather data from an industrial-sized battery with an RJ-12 port. My idea is to connect a Raspberry Pi Pico W to the battery using an RJ-12 cable for data collection. I'm considering ...
0
votes
2
answers
18
views
Pico W GPIO seems to be not working when under load
I can blink the built-in LED using the standard code, but when running my moderately resource-intensive code, I cannot get the led to blink. I am connecting my Pico with WLAN. I interrupted the loop ...
-1
votes
1
answer
33
views
PRi.GPIO works as normal user but for root ModuleNotFoundError
I am not a Linux specialist and would be glad if you could help me with this problem.
Environment:
Raspi 3b with Debian
uname -a gives the following output:
Linux MM3 6.1.21-v7+ #1642 SMP Mon Apr 3 17:...
0
votes
0
answers
107
views
Hooking up a rotary encoder to raspberry pi 4
There are a ton of questions on this, and I'm pretty new at working with rotary encoders. I purchased this one Taiss E38S6-600-24G, thinking (incorrectly I might add) that it would be a simple thing ...
0
votes
2
answers
172
views
Slow pigpio, much slower than RPi.GPIO
I'm developing a system based on Raspberry pi 4B, with a 32-bit Bullseye OS. I'm using pigpio for SPI and GPIO, and I have observed that the delay between command executions is huge. I have run a ...
0
votes
0
answers
89
views
Can't read temperature from Adafruit RTD 3 wire sensor and max31865 chip
I'm trying to read temperature from a 3-wire PT100 sensor and max31865 chip.
The chip has the correct jumpers soldered to define it as 3 wire.
I have tried to follow these instructions as closely as ...
0
votes
1
answer
51
views
Raspberry Pi GPIO ports extension
I would like to control a large number (hundreds) of GPIO ports with a Rapberry Pi for high voltage applications such as controlling Nixie tubes (but this woulbe be applicable to any kind of GPIO ...
1
vote
1
answer
56
views
GPIO.LOW commands not working with relay
I want to make a program that on and offs a 5v single channel relay through a raspberry Pi zero w.(setmode is bcm)
I connected 5v pin (pin number 2), gnd (pin number 6) and gpio 17(pin number 11) to ...
0
votes
1
answer
74
views
GPIO.event_detected not working though an edge is detected
I am trying to count number of edges detected in a minute.
My code:
global future_time
future_time = (take_present_time()+pd.Timedelta('1m')).strftime('%Y-%m-%d %H:%M:%S:%f')
global ...
0
votes
0
answers
39
views
Raspberry PI 3b+ few GPIO pins are not responding for some duration and gets recovered automatically itself after either few hrs or days in worst
In my current application, I have interfaced 9 US100 sensors to Raspberry Pi's GPIO pins.
Pins mapping is as follows:
GPIO_Trig_list =[2, 17, 10, 5, 19, 14, 23, 8, 20]
GPIO_Echo_list =[3, 27, 9, 6, ...
0
votes
0
answers
68
views
Reading Durations of signal train
I am receiving a signal train of alternate high low pulses and trying to read it on Raspberry Pi Zero W. I have enabled the one wire pin(GPIO-4) and used that pin to read the pulses.
I am reading the ...
0
votes
0
answers
117
views
pigpio, gpiozero, and remote control
I'm struggling to get some reliability out of the aforementioned packages. Here are my problems:
When I want to toggle a single output, all outputs reset and change into their new state
Outputs don'...
-1
votes
1
answer
35
views
Latching IO using gpiozero
Im working on doing some remote GPIO control (de)energizing relays. When I turn a relay on, it instantly turns off. That makes me assume that the output doesn't latch. I tried several of the ...
0
votes
0
answers
163
views
Stepper motor control with RPi 3B+
I want to control 2 stepper motors with RPI.
I wrote a loop with HIGH, LOW and delay.
When I increase the speed the waveform changes and the driver(Rtelligent R86) stops the motor (NEMA 34).
The ...
0
votes
0
answers
58
views
Making memory game with raspberry pi and can't figure out what's wrong
What I want to make is a memory game. So 10 segment LED bar shows randomly generated pattern for 5 seconds and turn it off. Then player use on and off button to input the pattern they memorized and ...
1
vote
0
answers
20
views
Cannot get WS28xx strip code working in eclipse swing
Hey all I have been looking at doing this for some time now. I ran across this posting and this is the type of led strip I am using. However, using that code seems to have errors when trying to add it ...
2
votes
1
answer
174
views
Problem with reading 433MHz RF receiver
I have problem with reading 433MHz signal. Not receiving it!
I want to read it or clone it to send it with my sender hardware.
My whole idea is to clone signals sent by my radio remote of windows ...
1
vote
1
answer
1k
views
Connecting 4 digital MEMS microphones with raspberry pi 4
I want to add 4 INMP441 digital MEMS microphones to the GPIO pins of Raspberry pi 4 to perform sound source localisation.
Here's a reference link to the mic: https://robu.in/product/inmp441-mems-high-...
1
vote
0
answers
55
views
How do I stop the code from stopping
When I run the code
import RPi.GPIO as GPIO
from gpiozero import Button
button = Button(21)
from mfrc522 import SimpleMFRC522
reader = SimpleMFRC522()
id, text = reader.read()
if (text == "...
2
votes
2
answers
412
views
HC-SR04 sensor's ECHO pin stuck on HIGH
I have a raspberry pi 4 and a HC-SR04 ultrasonic distance sensor. I want to use it in a raspberry-pi based robot. The other features look fine, the robot can move, et cetera.
But my code for the ...
0
votes
0
answers
136
views
I don't have ribbon cable for GPIO, and I need to use a bunch of jumper wires
I wanna use individual jumper wires but I don't know how to connect them properly to my raspberry.
I'm using the red T-shaped GPIO extension board and raspberry pi 3, I already put all my wires in the ...
-1
votes
4
answers
248
views
Switching a bistable latching Relay directly - Not enough power from GPIO?
I'm trying to control this bistable latching Relay (RT314F03)
After not being able to switch the relay I was wondering if that's even possible. While the Relay is rated for 3V, its "Rated Coil ...
1
vote
0
answers
106
views
Command Raspberry Pi 4 GPIO via bash Windows 10
from RPi import GPIO
global ON
global OFF
OFF = GPIO.LOW
ON = GPIO.HIGH
GPIO.setmode(GPIO.BCM)
GPIO.setwarnings(False)
GPIO.setup(21, GPIO.OUT)
x = open(testo.txt")
if x.read() == "true"...
1
vote
1
answer
76
views
Pin state doesn't change, but wait_for_edge triggers
I've been trying to figure out why the GPIO value will not change. I double check, triple check my connections.
I used GPIO.wait_for_edge(pin, GPIO.RISING) and it executed and when I ran print(GPIO....
1
vote
1
answer
110
views
why GPIO does not work when executed from python shell but works from script
When I run this python script led.py it works.
import RPi.GPIO as GPIO
import time
GPIO.setmode(GPIO.BCM)
GPIO.setwarnings(False)
GPIO.setup(24,GPIO.OUT)
print("LED on")
GPIO.output(24,GPIO....
0
votes
0
answers
96
views
How can I figure out my Python code with Kivy and Raspberry Pi GPIO?
I try to add actionbar to all screenmanagers in Kivy 2.1.0. I found some solution to my problem but I added some more features like GPIO pinout from Raspberry Pi. Here is a solution without gpio.
I ...
0
votes
0
answers
91
views
Continuous servo takes time to stop?
I am using a Raspberry Pi 3 to control a modified TowerPro SG90 servo, where I have removed the potentiometer to make a continuous rotation servo.
Using the code below, the motor starts exactly when I ...
0
votes
1
answer
92
views
RGB Matrix interfering with GPIO button
I have a Raspberry Pi 4 running Raspbian Lite. On that I soldered an Adafruit Hat + RTC and connected Adafruit 64x32 RGB Matrix. I have also connected a GPIO push button to pin 5 & GND#4
For the ...
-1
votes
1
answer
80
views
signaling Raspberry Pi with PLC
I want to give signal via PLC to Raspberry Pi and when the raspberry pi gets that signal, it should run the python script and when the python script execute properly and cycle is completed, it should ...
-1
votes
2
answers
137
views
How to set PWM to actual 0
I am controlling a stepper motor using PWM on a RPi 4 and python. The motor has a controller/driver (BLDC-8015A) that accepts 0-3.3V to set the rotational speed. According to the documentation, this ...
0
votes
0
answers
89
views
Help! Designing a 3 push button circuit that sends emails
First time posting here.
I'm in a bit of panic mode because I need to deliver a project this Wednesday and I'm having issues with my coding. As the title says, I'm using a circuit of three push ...
1
vote
0
answers
123
views
Python code not working: Programming a motor to turn on using a switch (Raspberry Pi)
HELP! Ideally within the next 24hrs PLEASE!!!!!
We have a simple circuit where we have a button, that when pressed, starts a motor that needs to run at a certain speed for a certain amount of time. (...
1
vote
0
answers
81
views
Not getting an GPIO output
I am trying to light a led with the raspberry pi 3b, but I am failing to get an output.
I connected the LED to physical pin #11: [img]https://i.imgur.com/TYeJc10.jpg[/img]
And to physical pin #6(...
0
votes
2
answers
625
views
How can I read the current ALT-Mode of a GPIO PIN?
i have a Hyperpixel 4.0 Touchscreen, which i use one my Raspberry PI 3b+
This Touchscreen is attached directly on the 40 GPIO-Pins and a few Pins have some special Alt-modes.
Out of personal Interest, ...
0
votes
1
answer
1k
views
AttributeError: module 'RPi.GPIO' has no attribute 'ChangeDutyCycle'
Starting Day 2 troubleshooting this error. Code used to work on a previous rasp pi 4B but doesn't on a new one so I'm assuming I'm missing some breaking change.
Problem:
Using import RPi.GPIO as GPIO ...
1
vote
1
answer
317
views
How to check on which OS system the python program is running to import rpi.gpio?
Is there an easy way to let a python program check if it running on the raspberry Pi or the pc running windows? I would like to use this to automaticly use the rpi.gpio functions in my code.
I am ...
2
votes
1
answer
677
views
Controlling stepper motor with Raspberry pi
I am building a sorting machine for a project where I want to sort the balls based on their color. For the actual sorting mechanism I am using a stepping motor (NEMA 17 with Driver DRV8825). I ...
1
vote
3
answers
171
views
Rpi GPIO code not working
Following commands work well as full speed PWM.
echo "s 18 2000" >/dev/pigpio
pigs s 18 2000
But following code do nothing. I am using Raspberry Pi4 8G B model
import RPi.GPIO as GPIO
...
-1
votes
1
answer
217
views
How to assign one input when matrix keypad key is held down?
I have a simple matrix 3x4 keypad that executes a function based on the code entered. However I'm running into the issue when someone holds down a key. I would like it to where only one value is ...
0
votes
0
answers
250
views
python module 'spidev' not found
python software from pi plates doesn't work with python 3.10.
One specific is that 'import spidev' cannot find spidev module.
Any suggestions?
0
votes
1
answer
519
views
ERROR: PWM Generation using pigpio C library
I am working on the RPI-CM4 board with raspbian buster OS.
I am trying to generate the 38KHz PWM wave using pigpio the library. My code is as follows.
#include <pigpio.h>
#include <unistd.h&...
-1
votes
1
answer
179
views
Can you use gpiozero wait_for_press() inside of a callback triggered by add_event_detect?
I am trying to write a script that uses a GPIO interrupt to callback a function that starts by playing a sound and then waits for a button to be pressed to start recording a sound, and then waits for ...
0
votes
1
answer
699
views
Install GPIO problem
It seems like I cannot download GPIO...
-1
votes
1
answer
114
views
need to avoid callback is triggered when changing gpio modes
I have following code and I need to run it so, callback is not triggered when changing gpio mode from OUT to IN. Is this manageable with this library?
import pigpio, time
_gpin_a = 27
pi_gpio = ...
0
votes
0
answers
36
views
Raspberry Pi Pin 17 Displaying Abnormal Behavior
I found that GPIO 17 (there was a switch wired up to it) had abnormal behavior.
I have wired up a hall effect sensor on pin 18, but when it goes low (it is high when not detected, low when detected), ...
1
vote
1
answer
448
views
SOLVED Raspberry Pi Zero GPIO pin not detecting Input
So I am using a Raspberry Pi Zero to detect the signal from this NPN Inductive proximity sensor (its input supply range is 6 to 36V and the signal pin to output the same amount of voltage which we ...
6
votes
2
answers
9k
views
Error installing RPi.GPIO in virtual environment
I am trying to create a virtual environment that can access GPIO pins. In order to do that, I need access to RPi.GPIO in the environment. I am unable to install that into the virtual environment. I ...
1
vote
0
answers
287
views
MCP23008 Python Input Handler
How do I declare a Python callback handler method on a MCP23008 input pin?
This Adafruit tutorial, which uses CircuitPython shows how to read input from the extended GPIO pin on the MCP23008, but does ...
1
vote
2
answers
1k
views
Bullseye python2 RPi.GPIO
As I read from forums, Python2 is removal at bullseye. I install python2.7 manually but there is gpio problem with python2.
sudo python2.7 -m pip install RPi.GPIO
dont work. Raises
collect2: error: ...
1
vote
1
answer
200
views
Raspberry PI GPIO protection
I'm designing a PCB to mount and interact with a raspberry pi4. One of the things I need it to do is drive a 24V relay. This circuit has worked great with some controllers I've used where the outputs ...