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.
3,399
questions
0
votes
0
answers
30
views
No SPI0 MISO pin on Raspberry PI 3B +
I had to reinstall my Raspberry Pi, now with Raspberry Pi OS bookworm, keeping the hardware. I am using a MCP3008 ADC converter with the new Adafruit libraries as https://learn.adafruit.com/raspberry-...
0
votes
1
answer
220
views
lgpio: 'can not open gpiochip' lgpio seems unable to open gpiochip devices
I'm trying to run a GPIO program on my rpi5 using gpiozero, but I am unable to because of the error:
Unable to load any default pin factory!
and the warning above is:
Falling back from lgpio: 'can not ...
0
votes
2
answers
39
views
Water detection with bare wires and internal resistor
I am making a DIY water changing system for my reef aquarium. I have some peristaltic peristaltic pumps and a .NET IOT app (am professional .NET developer) that controls the pumps.
The last piece of ...
0
votes
1
answer
26
views
How to use rgbmatrix and rpi-rf repos
My project is a LED matrix scoreboard. I've got a Raspberry Pi Zero W and an Adafruit RGB Matrix Bonnet.
I'd like to use an MX-RM-5V receiver and 2 radio buttons to change the home and away scores and ...
0
votes
1
answer
24
views
Connecting a torque sensor with raspberry pi 5
I want to connect a torque sensor with a Raspberry Pi 5. where the sensor has a frequency output of 5-15kHz. So can I connect it directly to GPIO pins?
0
votes
2
answers
36
views
Generating a single fast pulse with controlled duration
I am new to Raspberry Pi IO pins. I want to generate a single pulse with a pulse duration between 100-1000 ns, I want the pulse duration to be stable in the range of 10's ns, and I would like to ...
0
votes
2
answers
122
views
lgpio GPIO.setup fails with 'GPIO not allocated' when run from a flask app
I've a flask webserver on a Raspberry Pi 5 that I'm using to control a motor via the GPIO pins. This was working fine, but has now stopped for reasons that I'm trying to get to the bottom of.
Running ...
0
votes
1
answer
55
views
Sysfs integration with python code - permissions issue
I’ve had a lot of issues regarding the sysfs interface recently, and unfortunately, I’ve got another unrelated one. I’m trying to integrate the sysfs gpio interface into my python3 code. This is ...
0
votes
1
answer
77
views
Raspi 4 Bookworm GPIO Issues using GPIOZero
I haven't work with the Raspberry Pi for a long time.
I have an old Raspberry Pi 4 and I installed the latest bookworm OS.
pi@raspi4:~ $ cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 12 (...
0
votes
0
answers
12
views
Acceleration and Gyroscope read 0 on the ICM 20468
I'm trying to read from the ICM 20948 using a Pico W, however, whenever I read from the acceleration and gyroscope addresses I get 0. What could be the problem?
imu.c
void init_imu(IMU* imu) {
...
2
votes
3
answers
235
views
Setting internal pull ups from the command line
I’m learning how to control the gpio via the Linux kernel and have been working with inputs (specifically switches.) Recently I've been exploring pull up resistors. I’m wondering how I can initiate ...
0
votes
1
answer
87
views
Gpio chips via the linux kernel
I recently used the Linux kernel to control the gpio pins of my raspberry pi 5. In doing so, I noticed that I didn’t need to specify the specific gpio chip that I wanted to initiate. Due to the new ...
1
vote
0
answers
88
views
Rpi-5 Pulse width modulation
I am a beginner learning how to operate the gpio of a Raspberry Pi 5. I’ve heard that the gpiod nor many other Pi-5 compatible libraries do not support pwm. This leaves me with not many options but to ...
0
votes
0
answers
26
views
How to resolve Waveshare 1.44" LCD HAT on Raspberry Pi Zero W2 with mipi-dbi-spi driver issue?
Questions
Any idea what am I doing wrong?
Are the initialization commands listed for the Waveshare 1.44" LCD HAT correct?
Is there anything else missing in the setup process?
Current Issue
I'm ...
0
votes
2
answers
106
views
Setting internal pull up resistor from python
I recently bought myself a raspberry pi 5 and am learning how to work with the gpio pins. The gpio pins require a library to control them. These library’s that are compatible with the Raspberry Pi 5 ...
0
votes
1
answer
35
views
How to decouple USB power and OTG on RPi4 USB-C?
I want to use USB-OTG on my Raspberry Pi 4, but I want to have a possibility to cut the power off and thus force reboot of the device.
Currently my RPi is powered via Power pins in 40 pin GPIO headers....
0
votes
0
answers
10
views
Need guidance using 4 Pico PiRP2040 and getting variation in output signals
I am using a PICO RP2040 where the trigger signal (reference voltage) is connected to GP14. I’ve programmed the Picomite to set a trigger value for a falling edge, which means the trigger should ...
0
votes
0
answers
33
views
Getting Energenie Pi-Mote IR control board to work on Raspbery Pi OS Bookworm
I've bought an Energenie Pi-Mote IR control board for controlling my TV from a raspberry pi 4b and I'm struggling to get it to work. The manufacturer supplied user guide (https://energenie4u.co.uk/res/...
0
votes
1
answer
79
views
GPIO chip Device or resource busy error
I am trying to control a E-Paper display using my Raspberry Pi 5. I want to use the gpiod library since it seems to be the best option (especially since RPi.GPIO is not supported on the Pi 5) together ...
0
votes
0
answers
16
views
No video on vlc and other errors - raspberry PI 3A+ (Escape room project)
it's an amateur here trying to help a friend with an escape room project. Briefly explained: the raspberry will receive a GPIO signal from an item in the room, then a 60 seconds video will immediatly ...
0
votes
0
answers
18
views
raspberry pi does not boot when UART(RX/TX) connected via serial
I am using ubuntu 20.04 server LTS on raspberry 4. I have pixhawk flight controller connected via TX/RX on raspberry pi GPIO14(TXD) GPIO15(RXD).I write a mavproxy.service to forward telemetry data to ...
-1
votes
1
answer
56
views
Converting pigpio code to Gpiod library python
I have the following code of pigpio library and I have to convert it's functionality using gpiod library. Where pigpio has a good documentation I can understand the working of previous code using that....
0
votes
0
answers
39
views
Advice needed on how to connect a 12V solenoid valve to a Raspberry Pi
I'm a begineer to using the Pi and want to build a simple watering system for some plants. I know there's lots of online articles but looking for some clarification on exactly what is needed. Here's ...
0
votes
0
answers
60
views
Raspberry from nodered currently is not reading from GPIO
I am having a few problems on my solution from Nodered to Raspberry pi.
The target should be to read an input from a Raspberry Pi, read it in Nodered make a decision, and then lights up an output, we ...
0
votes
3
answers
224
views
How to determine the correct GPIO chip for libgpiod? [closed]
I am writing software that needs to control some of the Raspberry Pi's GPIO pins.
The Internet tells me that sysfs is deprecated and anyhow doesn't work on the Raspberry Pi 5. Apparently the "...
0
votes
1
answer
27
views
Video glitching and gpio pin problems. Faulty Pi or low voltage?
I have 12 externally powered neopixels connected to one of the gpio pins of my RPi3B+ which in turn is powered by a (supposedly) 2.5A power supply and hooked up to a small 1024x600 LCD display (...
-1
votes
1
answer
49
views
Button to Quit While Loop
I've spent the last 2 days all over forums trying to find the right answer to this question and I'm just having no luck with my script! Basically, I'm building a deployable scale for bats - the bats ...
0
votes
0
answers
92
views
How to use raspi-gpio to execute a command line action
I apologise in advance as I'm new to Raspberry Pis and Python.
Edit: why Python? Why not shell scripting?...
I'm cobbling together a music player with push button actions. Hardware I'm comfortable ...
1
vote
1
answer
90
views
Control multiple push buttons on a raspberry pi using an mcp23017 over C++
Having followed various tutorials on the web (i.e. 1,2), I have made the following connections:
To enhance clarity, I post another picture depicting the connections on the mpc23017 using a cropped ...
-1
votes
1
answer
63
views
Why are my motors not working with my Raspberry Pi?
I'm trying to follow this tutorial on how to build a buggy with a Raspberry Pi. I'm using all the same parts except for the Pi and the battery. I am using a Raspberry Pi 4B and an 8.4v battery from ...
0
votes
0
answers
29
views
RPi.GPIO works on one Pi Zero 2, but not the other
I've got a python script that uses RPi.GPIO to exercise some solenoids connected to two Pi Zero 2Ws. Both are running 64 bit Raspberry PI OS and both are up-to-date (bookworm).
On one of them, ...
-1
votes
2
answers
146
views
Raspberry Pi 4B and Ubuntu 22.04 GPIO
I am running Ubuntu 22.04LTS in order to use ROS-humble on my RPi, however I am running into some issues. How do I configure the GPIO pins and also is there some things that I should note. I plan on ...
0
votes
1
answer
46
views
How to send 5v signal from pi? [duplicate]
I am using a raspberry pi 4b. I am attepting to send a signal to a motor controller that requires a 5v input. Is that possible with the pi or will i need to purchase a part. If so please advise an ...
0
votes
0
answers
28
views
Square signal generated by Pico has unexpected waveform
I developed a small program for the Raspberry Pico using the Wokwi online simulator but when I tried to use the actual device it didn't work.
I started by debugging the signal generated with a logical ...
0
votes
0
answers
62
views
Using Adafruit PiTFT 2.4" and I2S Amplifier MAX98357A at the same time
I built my own "Gameboy" with a Rapberry Zero, the Adafruit Display (https://www.adafruit.com/product/2455) and Adafruit Soundamplifier (https://www.adafruit.com/product/3006) running ...
0
votes
1
answer
24
views
Receiving String Data From Secondary Arduino on Main Raspberry PI I2C
I am working on a project where I'm trying to implement 14 RDM630 RFID sensors that will send any recorded RFID tags to the Main RPi. Unfortunately, these sensors use RS232 communication, and it seems ...
1
vote
2
answers
335
views
Using SPI and GPIO in Pi OS Bookworm on Pi 3b v1.2
How can I control GPIO from the CLI when I have SPI enabled?
I need to add a reset signal to an application that issues the reset via a shell script, prior to launching the application. The ...
0
votes
1
answer
71
views
Using DMA + PIO to write function sample points to a DAC chip periodically
I'm attempting to make a function-generator (or AWG) with a Raspberry Pi Pico. For that, I'd like to utilize the DMA and PIO capabilities of the chip. On a DMA channel I would copy and direct sample ...
0
votes
0
answers
37
views
RDP/Thony: No access to /dev/mem. Try running as root!
I am using RDP acces to Raspberry 4 Pi and Thonny to run simple code (user rdp):
import board
import neopixel
# NeoPixels must be connected to D10, D12, D18 or D21 to work.
...
0
votes
0
answers
37
views
Fast way to charlieplex 7 pin on Pi Pico
I am starting a project with the Raspberry Pi Pico W in Arduino IDE. I will need to charlieplex 36 LED with 7 uC pins (LEDs= 7 * (7-1)), what I am doing for every LED every time I need to turn it on ...
0
votes
1
answer
26
views
Connecting RPi 4 to Cyclone II
How can I connect Raspberry Pi 4 to Cyclone II ep2c5t144 via GPIO? As I understood, I need to connect RPi GPIO TX (GPIO14) and RPi GPIO RX (GPIO15) to Cyclone GPIOs RX and TX. I'm not sure which pins ...
-1
votes
1
answer
35
views
Unable to use UART and Bluetooth in RPi3 with audio output simulatneously
I am using Rpi 3b+ and I am trying to use the Bluetooth and UART simultaneously.
with ls -l /dev:
Serial 0 - ttyAMA0
Serial 1 - ttyS0
I had to use the UART (for reading coordinates in GPS) and ...
0
votes
1
answer
28
views
Is it possible to supply power to Raspberry Pi 4 using gnd on pin 9?
I need to power the Raspberry Pi 4 using GPIO pins. In most cases, people do this using 2 or 4 pins for 5V and 6 pins for GND. But the 6th pin is already occupied for cooling, and it is difficult to ...
-1
votes
1
answer
87
views
RPi not turning GPIO pin off causing the relay to remain on
I am a complete newbie here. I bought RPi, flashed the OS. I also bought 5v relay. I have connected the 2nd pin to VCC of the relay, 6th pin to GND of the relay, 40th pin to the 'IN' point of the ...
-1
votes
2
answers
102
views
Can I sink the 5V+ pin into a GPIO in open drain mode? [closed]
I just discovered 'open drain' mode in the libgpiod documentation and was wondering if a raspberry pi open drain pin can sink the current / handle the voltage from its own 5V pin via a pullup resistor,...
0
votes
1
answer
247
views
RuntimeError: Failed to add edge detectionRuntimeError: Failed to add edge detection in rpi-rf code
Thats the code to receive
#!/usr/bin/env python3
import argparse
import signal
import sys
import time
import logging
from rpi_rf import RFDevice
rfdevice = None
# pylint: disable=unused-argument
...
0
votes
0
answers
225
views
Not able to access GPIO pins on my Pi5
So, I've been writing this device driver program in C to access GPIO pins. Whenever I try to install the module onto the board I get an error at gpio_request. The part I'm not able to understand is ...
0
votes
2
answers
77
views
How to Control a 12V DC Siren with Raspberry Pi GPIO?
I'm currently working on a project where I need to control a 12V DC Siren (link to product: https://amzn.to/44rHsi7) using my Raspberry Pi's GPIO pins. I want to be able to play and pause the siren ...
1
vote
1
answer
69
views
RPi4 / BCM2711 Startup GPIO timing
I have a question related to What is the power on state of the GPIOs?
I am aware that GPIO lines on the Raspberry Pi have a defined Pull-Up/-Down state at power up. However, there seems to be an ...
0
votes
0
answers
33
views
CQRobot Ocean: MCP23017 IO Expansion Board - "No pull up found"
I've got an IO Expansion board made by CQRobot that I'm trying to get working, but I can't get i2c to initialize. Here's the board: http://www.cqrobot.wiki/index.php/MCP23017_IO_Expansion_Board_SKU:...