Questions tagged [gpio]

GPIO stands for General Purpose Input Output and can be used to receive and send digital signals to and from simple electronics from the Raspberry Pi.

Filter by
Sorted by
Tagged with
1 vote
1 answer
69 views

Map OPC UA server variable to IO port

I am running this code in a Raspberry Pi to run an OPC UA server and expose 1 variable: 'Status' from opcua import Server from random import randint from opcua import Server from random import randint ...
daniel sp's user avatar
  • 113
1 vote
1 answer
77 views

How to send a pulse to 3.5'' audio jack with GPIO

I have a raspberry pi 3 model B+ and I have been trying to send a pulse to the small audio jack port, Is this the correct way please? import RPi.GPIO as GPIO from time import ...
Aenaon's user avatar
  • 119
2 votes
6 answers
519 views

I need a seemingly large battery for project containing several sensors, what should I do?

I'm working on a project with several sensors needing various 3.3v and 5v power. I'd like to have my sensors running for at least 24 hours before needing to recharge everything. I did the calculations:...
Katianie's user avatar
  • 131
0 votes
1 answer
231 views

Recommended GPIO to read 10Mhz clock in CM4

I have a 12-bit parallel output ADC, which samples at 10M samples/sec. A 10MHz oscillator clock is connected to it in the custom designed PCB. The 12 data lines are directly connected to the CM4. The ...
Vikram Baliga's user avatar
1 vote
1 answer
129 views

Which GPIOs can I use to shutdown Pi 4?

I am using a Pi 4 with Raspian, writing a program in Python (3.9.2) to do (amongst other things) shutdown of the Pi via a physical button. Based on this link https://linuxhint.com/set-up-shutdown-...
Clóvis Fritzen's user avatar
1 vote
0 answers
90 views

Problems addressing WS2812B LED Strip with Raspberry Pi 3 A+

Hello! I am currently having issues addressing my WS2812B LED-strip correctly with my RPi 3 A+. I have followed the following video guide: https://forum.core-electronics.com.au/t/problems-addresing-...
Mads Rasmussen's user avatar
2 votes
1 answer
49 views

Intermittent access errors when writing to GPIO using SYSFS and Ruby

I am using Ruby to drive output GPIO pins using the old SYSFS pseudo-filesystem interface, and am regularly encountering intermittent Errno::EACCES: Permission denied @ rb_sysopen errors. My user is a ...
Dan's user avatar
  • 125
2 votes
2 answers
184 views

How to correctly identify the pin addresses in the Pi4J 2.2.1 GPIO API?

I can't seem to get the right pin number. Let's say I want to access this pin: What's the actual address of the pin? 11, 26 or what? Here's the code I use: (THIS CODE WORKS WITH PIN BCM 23) final ...
MomoTheDev's user avatar
1 vote
1 answer
65 views

Can't drive GPIO_12 on Pi Zero 2

I'm having trouble driving GPIO12_PWM on a PI 2 Zero high (physical pin 32 on 40 pin connector). I can drive other GPIO pins low or high but not this one. I see that it is a PWM pin, so maybe that is ...
Some Hardware Guy's user avatar
0 votes
1 answer
291 views

Threading using Python in Raspberry Pi for GPIO inputs

My self-working on encoders of differential drive robot, I need to read the speed and position of wheels using two encoders simultaneously. I have used the threading library in Python even though I ...
DEVAPRASAD S's user avatar
-1 votes
1 answer
94 views

Using TCA9548A for multiple MQ-X gas sensors

I have about 8-9 gas sensors I want to use on my Pi but I'm trying to understand how to use The TCA9548A. The TCA9548A Has 8 pairs of SDL and SCL pins to handle multiple I2C devices, but the output ...
Katianie's user avatar
  • 131
2 votes
1 answer
382 views

How to make PIO for multi-pin protocol, e.g. 93LC46?

I'm just learning about Pico Programmable IO (PIO). The examples I see cover only single pin communication. I'm wondering whether PIO can handle multi-pin communication (like I2C having one pin each ...
Andreas's user avatar
  • 163
1 vote
1 answer
660 views

Audio via PWM pins?

Okay, kinda a noob here. I've been looking around, trying to find an answer to playing audio via the PWM pins. I tried rerouting the audio to no avail. I've tried making a script that uses PWM to play ...
Foxy6670's user avatar
1 vote
1 answer
156 views

Connecting old CD-RW drive with an odd 40 pin connection to raspberry pi

QUESTION So I recently got my hands on an old computer from around 2000 and it didn't work so I decided to take it apart and try to make something a bit useful with the parts. Inside there were 2 cd ...
Penguinty's user avatar
0 votes
2 answers
202 views

Adding a `cec-gpio` dtoverlay for CEC debugging

I want to build a CEC Debugger as described in the Kernel.org documentation with my Pi Zero 2 W, I plan on using something like this: I am having trouble with the final instructions listed to enable ...
Meberem's user avatar
  • 129
-1 votes
2 answers
271 views

How to run Hyperpixel 4.0 on I2C-0 (GPIO's 44&45)?

I use a Hyperpixel 4.0 touchscreen in combination with my custom ComputeModule4 board. I've seen on the CM4 that there is one more I2C-Bus on GPIO's 44&45 which could be used. Is there any ...
Manuel Neff's user avatar
0 votes
2 answers
51 views

Java pi4j app crashes on exit() [closed]

My java app runs fine until I execute a System.exit(). I'm using pi4j/pigpio-2.2.1 on a Pi4b with latest raspian OS. I use DigitalOutput to define my own DigitalOutputPin and I2C for some Sparkfun ...
RonH's user avatar
  • 11
2 votes
2 answers
281 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
1 vote
0 answers
38 views

Respond to GPIO in fastest way possible

I'm trying to respond to a trigger from a ~1MHz clock and I'm having trouble doing this in the time required (under 400ns). I'm using a Raspberry Pi 3b+ and I've seen benchmarks of 50Mhz+ for toggling ...
Robin Elvin's user avatar
4 votes
1 answer
121 views

GPIOs picking up random signals

I have a friends Pi 3 Model B+ that I hooked up to become the "brain" on a Carrom Bubble Hockey table. The table is very simple, it has two goals and a button, so in total 3 switches. My ...
neilsimp1's user avatar
  • 143
0 votes
0 answers
108 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
4 votes
3 answers
1k views

LED light not turning on

I was following this tutorial on connecting an external LED to a Pico W, but I've had no luck getting it to work. This is the code I've been using: import machine from machine import Pin, Timer timer =...
Emu_of_Ubiquity's user avatar
2 votes
1 answer
175 views

Which are the pin choices for powering and driving an audio amplifier with signal and power on raspberry pico pi

I am using an audio amplifier,PAM8302A from adafruit link, to power a 8ohm 1W speaker (small speaker) that is being driven by a raspberry pi pico. The amplifier has A+ for the signal/audio input (not ...
Vass's user avatar
  • 133
0 votes
4 answers
182 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
  • 9
1 vote
0 answers
99 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 votes
1 answer
52 views

GPIO is deactivated by loudspeaker

I use https://github.com/ts1/PiIR to send - pin 22 - and receive - pin 23 - infrared signals This works fine as long as I don't play anything through the speaker connected to the pi's own jack socket, ...
Per Bock's user avatar
0 votes
1 answer
116 views

Button working on and off

I have two buttons connected to pins 16 and 20. The one going to pin 20 works well, actually too well. Sometimes when I press it, it records the press two times. The other button which is connected to ...
Kin_99's user avatar
  • 1
1 vote
1 answer
68 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
0 answers
224 views

Rpi4b -> Use Serial HC-12 SI4463 Transceiver to send to Generic RF outlets and 433 switches

Raspberry Pi4B Hi, I am using a 433 MHZ TX/RX kit connected via GPIO pin 27 for receive and GPIO pin 22 to send signals to my RF power outlets and receive signals from my 433mhz Wireless Magnetic Door ...
Viktor Carlson's user avatar
2 votes
1 answer
56 views

Pullup for pins 2 and 3 -- practical consequences?

In this awesome answer, the author wrote this about pings 2 and 3 in the PI: The only special consideration is that GPIO 2 and 3 have hard-wired 1k8 pulls to 3V3 (they are needed when functioning as ...
Merc's user avatar
  • 145
1 vote
1 answer
304 views

Python function following physical input not working with kivy

I'm trying to create this functionality that when a physical button is pressed a function is called that if true opens a popup on the main Kivy screen. The idea was to have the display showing the ...
user20546541's user avatar
1 vote
1 answer
569 views

Changing I2C pins through /boot/config.txt failed

I'm trying to get the libcamera-still to work on a compute module 4 with an imx219 but I'm getting a ERROR: *** no cameras available *** Running dmesg returns [ 6.060283] pinctrl-bcm2835 fe200000....
Max's user avatar
  • 121
0 votes
0 answers
183 views

Raspberry Pi Windows GPIO Control

I installed Windows 10 on Raspberry Pi development board. I will read/write by specifying input/output from Raspberry Pi GPIO pins. I know on Raspbian OS but I haven't done it with Windows before. Can ...
Enes Orhan's user avatar
0 votes
2 answers
144 views

How to programically detect if display is plugged in to GPIO

I've attached an ePaper display to a GPIO bonnet/HAT and have set up cronjobs to run scripts that print data onto ePaper display. If I remove the HAT and display, then how to check if it's plugged in? ...
Kuei's user avatar
  • 21
2 votes
1 answer
998 views

High Impedance (Hi-Z) state for Pico GPIO

Using a Pico [RP2040], I wish to interface to a data bus which is (already) pulled high. (Based on the contents of the address bus) I want to put data on the data bus [ie. "memory mapped i/o"...
BlueChip's user avatar
-1 votes
2 answers
272 views

Detect shutdown via GPIO

I run one of my Pis with the Geekworm X735 power hat, which adds a button to power on, power down or reboot the Pi, along with a power LED. However, the power board does not seem to be able to detect ...
user149408's user avatar
1 vote
2 answers
78 views

Which is the most accurate GPIO API for Raspberry Pi?

According to https://raspberrypi.stackexchange.com/a/58825/42583, which is now nearly six years old, one unique feature of pigpio is it times GPIO events at source so for any timing purpose pigpio is ...
Daniele Procida's user avatar
2 votes
0 answers
510 views

pigpio Python Raspberry Pi wave PWM generation

I am using pigpio to generate a PWM signal varying in time. I create a wave, which contains one period of a sine wave, in the form of PWM signal. I use wave_send_using_mode and WAVE_MODE_REPEAT_SYNC ...
kubajed's user avatar
  • 21
1 vote
1 answer
71 views

Memory Mapped I/O sets adjacent pin (BCM Pin 19/13)

I'm trying to control the GPIOs on my Raspberry Pi 4B through memory mapped I/O. Here's my code (simplified as much as possible, reproduces the problem on my Pi): // file: main.c // // gcc main.c -...
Marco's user avatar
  • 121
4 votes
2 answers
354 views

How is the slew rate of a GPIO determined?

I’ve noticed that if measure the rise time of GPIO on a CM3+L in a carrier board, I get very different results. GPIO22 for example, manages <2ns, which seems inline with the electrical ...
Heath Raftery's user avatar
1 vote
2 answers
136 views

How can I sniff GPIO traffic?

I've got a DHT21 Temperature & Humidity sensor, and was just curious to spy on the raw GPIO traffic if it's possible. (Everything is working correctly - i.e. I am able to poll the device.) What ...
Patrick Rynhart's user avatar
2 votes
2 answers
254 views

GPIO buffering with the ULN2003

I thought I understood the ULN2003AN before purchase, but I'm clearly missing something. I created a very simple test with two power supplies. One producing 3.3V and the other 24V. Connections: I ...
John Klein's user avatar
1 vote
0 answers
76 views

RuntimeWarning: GPIO.setup(pin_rst,GPIO.OUT)

My python script was executed in the past 10 days without issues. I had to do some troubleshooting to find what is causing the problem. Here is part of my code where the issue is caused: from mfrc522 ...
Maria's user avatar
  • 11
-1 votes
1 answer
61 views

How to control Raspberry Pi case fan with code (not pi temperature)

I was wondering if it is possible to directly control the case fan included with some of the Raspberry Pis. Lots of posts tell you how to turn it on or off when the Raspberry Pi gets to a certain ...
Zipzap829's user avatar
4 votes
6 answers
3k views

Do we have to solder headers to GPIO pins?

I was wondering if there is a need to solder the header to the GPIO pins. Can it not just be pushed into place and kept unsoldered? If kept unsoldered, is it going to damage the pi? I am a software ...
user112167's user avatar
1 vote
1 answer
580 views

1-Wire internal pullup isn't enabled on boot, but can be enabled after boot

On a Pi 4 I have the following lines in /boot/config.txt: dtoverlay=w1-gpio gpio=4=op,pu This should enable 1-wire on the default GPIO pin, which is 4, and then enable the internal pullup resistor. ...
okw's user avatar
  • 131
0 votes
2 answers
108 views

Configure GPIOs output upon system start [duplicate]

I'm using to systemd to launch my application and on starting the application the GPIO07 is configured as Output and set to High I want to set it to low as the system startup.
Mohammad Yehia's user avatar
3 votes
1 answer
170 views

Block based programming and access to GPIO on Raspberry Pi 3B

We would like to use Scratch to access and control the GPIO of our Raspberry Pi 3B. Scratch 3 offline does not work on the Pi 3B due to the limited 1GB memory: it sometimes starts but typically ...
Superman.Lopez's user avatar
0 votes
0 answers
71 views

How to mimic RC signals using raspberry pi?

I am working on an automated Quadcopter and I am trying to build a flight controller using Arduino board and raspberry pi. I don't want to use a transmitter and receiver in this project instead wants ...
HIMANSHU VERMA's user avatar
0 votes
0 answers
34 views

Gpio pins not changing states (rpi4; xbian)

I'm trying to control my GPIO pins on a fresh xbian install on my rasperry pi 4b gpiozero and RPi.gpio are installed The python script I use appears to be working: #!/usr/bin/env python3 import ...
BartBog's user avatar
  • 101

1 2
3
4 5
67