Questions tagged [rpi.gpio]

rpi.gpio refers to the package name of a Python module for accessing the Raspberry Pi's GPIO pins. NOTE not supported on Pi5. The module allows GPIO pins to be initialised, turned on, and turned off. It uses a functional programming style.

Filter by
Sorted by
Tagged with
0 votes
1 answer
17 views

How to solve "RuntimeError: No access to /dev/mem. Try running as root!" to use RPi.GPIO on my RPI PI 5 and tensowflow installation problems

import RPi.GPIO as GPIO import time GPIO.setmode(GPIO.BCM) GPIO.setup(18,GPIO.OUT) print("LED on") GPIO.output(18,GPIO.HIGH) time.sleep(1) print ("LED off") GPIO.output(18,GPIO.LOW)...
Jdam's user avatar
  • 1
0 votes
0 answers
17 views

RPi/MCP3462 Configuration and Reading ADC

I'm pretty new to SPI and trying to read Channel 0 off the MCP3462 ADC (16 bit) with Raspberry Pi 4. I cannot find any documentation on using Rpi/Python but I've done my best to write a converted ...
MHart's user avatar
  • 1
0 votes
1 answer
26 views

Micropython install RPi.GPIO issue for Pico W

I'm trying to install the RPi.GPIO package on my Raspberry Pi Pico W, but when I run import mip mip.install('RPi.GPIO') I get the message back Installing RPi.GPIO (latest) from https://micropython....
Hale Tussing's user avatar
-1 votes
1 answer
41 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 ...
Julian Zientkowski's user avatar
0 votes
2 answers
25 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 ...
poloPlaya's user avatar
-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:...
Jens W.'s user avatar
0 votes
0 answers
125 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 ...
Greg W's user avatar
  • 1
0 votes
2 answers
208 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 ...
kubajed's user avatar
  • 21
0 votes
0 answers
97 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 ...
tomh's user avatar
  • 135
0 votes
1 answer
52 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 ...
mannaroth's user avatar
  • 111
1 vote
1 answer
57 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 ...
Mayo's user avatar
  • 11
0 votes
1 answer
81 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 ...
Mainland's user avatar
  • 101
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, ...
Arinjay Motule's user avatar
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 ...
John Mist's user avatar
0 votes
0 answers
126 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'...
addohm's user avatar
  • 107
-1 votes
1 answer
41 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 ...
addohm's user avatar
  • 107
0 votes
0 answers
170 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 ...
Ray Saben's user avatar
0 votes
0 answers
61 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 ...
Kim's user avatar
  • 1
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 ...
StealthRT's user avatar
  • 121
2 votes
1 answer
176 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 ...
wiciow's user avatar
  • 21
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-...
Thokachitchu Jai chandra Raju's user avatar
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 == "...
yesn't's user avatar
  • 11
2 votes
2 answers
446 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 ...
allen546's user avatar
0 votes
0 answers
140 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 ...
Nathalia Katiuska Quintero Gom's user avatar
-1 votes
4 answers
260 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 ...
Rune's user avatar
  • 7
1 vote
0 answers
108 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"...
Andrea Ruffo's user avatar
1 vote
1 answer
77 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....
Pizzarules668's user avatar
1 vote
1 answer
112 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....
Ciasto piekarz's user avatar
0 votes
0 answers
97 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 ...
yottabyte's user avatar
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 ...
thecompassguy's user avatar
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 ...
JeremiahDuane's user avatar
-1 votes
1 answer
84 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 ...
dsp's user avatar
  • 1
-1 votes
2 answers
147 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 ...
user7408924's user avatar
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 ...
Fenryla's user avatar
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. (...
eayag13's user avatar
  • 11
1 vote
0 answers
82 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(...
lars2203's user avatar
0 votes
2 answers
654 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, ...
Manuel Neff's user avatar
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 ...
bsautner's user avatar
  • 218
1 vote
1 answer
330 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 ...
Rens's user avatar
  • 13
2 votes
1 answer
692 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 ...
Rajat Sharma's user avatar
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 ...
Knowledge Drilling's user avatar
-1 votes
1 answer
221 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 ...
Gr1m's user avatar
  • 1
0 votes
0 answers
257 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?
Nero Eflow's user avatar
0 votes
1 answer
523 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&...
shiv patil's user avatar
-1 votes
1 answer
184 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 ...
ant-in-pant's user avatar
0 votes
1 answer
713 views

Install GPIO problem

It seems like I cannot download GPIO...
Maxi 42's user avatar
-1 votes
1 answer
115 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 = ...
B.Ondrej's user avatar
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), ...
SystemReact's user avatar
1 vote
1 answer
457 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 ...
IOT-Guy's user avatar
  • 31
6 votes
2 answers
10k 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 ...
kimv's user avatar
  • 165

1
2 3 4 5
15