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
0
votes
1answer
15 views

RPi.GPIO library limitation - add_event_detect cache

How many callback events is cached in add_event_detect function? In my example below start_thread is executed just twice, but it is fired up five times (by the loop). To me it looks, that GPIO library ...
0
votes
0answers
30 views

GPIO - which is a correct register to read state?

Which of BCM GPIO registers - datasheet page 89 - is correct to verify register register state ? - high / low and does it depends how the register is configured? register function ? is register ...
-1
votes
1answer
47 views

Sensor gives different results using GPIO and USB

I have a RPi4B, MH-Z19C CO2 sensor and a UART to USB adapter. When I connect to the sensor using USB I get stable readings: {'co2': 1001, 'temp': 19, 'S': 0, 'U': 0} {'co2': 1006, 'temp': 19, 'S': 0, '...
-1
votes
0answers
25 views

How to connect 8 ohm 0.4w speaker to raspberry pi4 / pi zero gpio pins

I have 8 ohm 0.4w speaker. i want to connect speaker to raspberry pi gpio pins how to do that. what common npn transistor should i use. should i use amplifier and which should i use. is this possible ...
0
votes
1answer
15 views

multiple GPIO.add_event_detect doesn't show encoder output

so i have 3 GPIO.add_event_detect's each one comes with callback function when only one GPIO.add_event_detect is enabled, it shows proper output but if i add 3 of them it doesn't show anything while i ...
0
votes
0answers
14 views

Remote i/o Error when trying to read a value of a MCP23017 GPIO Expander connected to a DRV8833 Motor driver

I have a MCP23017 GPIO Expander that I am using to control a DRV8833 Motor driver. I do this as following: from adafruit_mcp230xx.mcp23017 import MCP23017 i2c = busio.I2C(board.SCL, board.SDA) mcp = ...
-1
votes
2answers
52 views

Raspberry pi 4 gpio pins not working

My Raspberry pi 4 gpio pins are not working for some reason I tried uninstalling and reinstalling rpi.gpio and gpio and it did not work here is the code import RPI.GPIO as GPIO import time led = 26 ...
-1
votes
1answer
32 views

GPIO 19 always on even after shutdown - Troubleshoot tips?

Connected a LED to GPIO 19 (Pi Zero W) and it is always on, only turns off when I disconnect the power. Even after the shutdown command, stills on. $ sudo shutdown now Ran the code below and it didn'...
0
votes
1answer
28 views

Rapsberry pi pico GPIO IRQ function for push button not working as expected

I added a button to GPIO 4(board pin 6) in my pico board. GPIO pin is normally pulled up and button press will bring it to ground. I want to add a simple debounce logic to the button press in the IRQ ...
1
vote
0answers
43 views

GPIO output high not turning of relay

I am trying to turn a relay on and off using a python script. The below script is realy simpel, turn the relay on and after 5 seconds turn it off. The thing is, it dooesn't turn off. i thought it did ...
0
votes
1answer
40 views

Why is my python script stopping after 1 month?

I'm running three python scripts on a Pi 4 Model B. These scripts are ran from boot using the '.config/autostart function'. I have a batch script placed in 'autostart' which then in turn starts the ...
1
vote
1answer
17 views

PWM transducer won't update frequency

I'm creating a simple script that outputs a text input to morse with an LED and a transducer via the GPIO pins on a Raspberry Pi 4 Model B. I tried to add input functionality with buttons that can ...
-2
votes
0answers
23 views

multiple buttons in list

so i have 2 list, 1 for my inputs and 1 for my adresses i have a problem with putting my GPIO.zero input buttons in a list for not repeating the same code The second list is at the moment not a issue ...
1
vote
1answer
50 views

Peripheral connections for the the ages [closed]

I have a peripheral that has a 6 pin JST female connector that mates to the peripheral. The other end came with a 6 pin female JST connector that is decidedly NOT compatible with the Pi GPIO header. ...
0
votes
1answer
28 views

GPIO pin not providing as much current as 3.3V pin

I have an infrared led which works at 3.3V. This is the led . Edit: I couldn't find any specific documentation, it's one of those led you usually attach to rpi infrared cameras. If I attach it ...
0
votes
0answers
28 views

Using same GPIO pins simultaneously from two Python scripts using RPi.GPIO

I have two different scripts. One is a Kivy app and another is a MQTT client script that subscribes to topics received from a web server. The same hardware connected to the GPIO pins can be used from ...
2
votes
1answer
37 views

Reassign GPIO pins for SPI (swap MOSI with SCK)

I had an adapter board made for a Raspberry Pi 4B and I somehow swapped the SPI clock and data lines on the board. Rather than redrawing and waiting for new adapter boards, is there a way to reassign ...
0
votes
1answer
19 views

Assigning priority to callback function for multiple GPIO.add_event_detect

Iam trying to create the error detection application for my battery charger prototype using Rpi.GPIO. I successfully created the add event detect for multiple GPIO pins (totally 8 pins for each error)....
0
votes
1answer
26 views

How do I change the PWM GPIO port in the sine_wave_pwm sample application of pico-playground?

This is the sample code in question: https://github.com/raspberrypi/pico-playground/tree/master/audio/sine_wave I cannot see where it has set it's PWM output pin. Inside "..pico-extras\src\...
0
votes
1answer
33 views

New ABI for the GPIO Character device

I was going through the presentation1 about the new ABI of the GPIO Character device, presumably merged in v5.9 of the linux. I installed a new version of raspberry os, (uname: Linux raspberrypi 5.10....
0
votes
0answers
53 views

Is there any to address the GPIO pins in Windows 11?

I just got my Raspberry Pi 4 and want to run some servers. The server I want to run, runs exclusively on Windows, and not even Wine works. I also need Windows 11 for the improved x86 on ARM emulation. ...
2
votes
1answer
57 views

How to enable serial communication on Rasbpian Buster or the lastest OS right out of the BOX?

Latest Raspbian Buster OS and Raspberry Pi 3 V1.2 2015 This I can't get my head around this. Why can't I set up serial communication on Raspbian Buster for Raspberry Pi3 very easily after following ...
2
votes
2answers
52 views

Relay no longer works on GPIO ports

I'm french excuse me for my english language, i works on a industrial vision processing device. I use the following components : Picaméra Raspberry Pi 3B + Relay : SRD-05VDC-SL-C I work on a python ...
1
vote
0answers
86 views

Getting pi-fancontrol to work when running Ubuntu

I've got a fan connected to GPIO 14, but am having trouble getting pi-fancontrol to work on my Ubuntu 21.04 install on an RPi4. The official docs say to run snap connect pi-fancontrol:gpio pi:bcm-...
1
vote
2answers
217 views

Does installing a fan need inrush current protection?

On the internet, I found this plan to install and control a fan: I wondered whether one needs protection against inrush current since I heard a fan might draw quite some current when it is starting ...
-2
votes
1answer
33 views

is it possible to fix a broken gpio pin? [duplicate]

my 5V and 3.3V pins are not supplying any current, so I'm assuming that the pi is broken, is is there any way to fix it, do normal computer stores fix this, or should it be immediately replaced?
1
vote
0answers
12 views

My DT overlay doesn't work

I'm trying to activate the miniUART with RTS and CTS signals (on an RPi Compute Module). For this purpose I've created an overlay: /dts-v1/; /plugin/; /* Enable /dev/ttyS0 with RTS and CTS signals ...
-4
votes
2answers
57 views

my 5v and 3.3v pins are not supplying current

Previously the 5V and 3.3V supply used to work, when i connected my gear motor it worked at first and the next day, i tried connecting 4 gear motors to a single driver ,powered by 8 double a batteries,...
0
votes
0answers
23 views

Raspberry PI External Case Connector

I have a DIY project with a Raspberry Pie and a few sensors. I have them working, hardwired through a breadboard. As I'm mounting them to a case I would like to have a female connector that passes the ...
0
votes
0answers
42 views

(Raspbian + C# + Mono) Type initializer for 'System.Device.Gpio.Drivers.LibGpiodDriver' threw an exception

I'm conducting a preliminary study for a new project. I've purchased a Raspberry Pi 3B and I'm trying to run a small program to check all our requisites: SQL Server connection. Save configuration ...
0
votes
2answers
108 views

is it possible to control the Fan from GPIO?

am a programmer with no hardware knowledge background and defently no physics background. I have a RPi4B and bought a fan bundled with its heatsink. I realized the fan is basic and has 2 female pins ...
0
votes
1answer
22 views

Servo control issue

I have written a small program that controls two servos: to start the recording process one servo opens a shutter (servo1), then the second one lifts a sky camera out of a housing (servo2). To stop ...
0
votes
1answer
30 views

What is the name and specs for the RPi CM 4's GPIO connectors?

I want to use a compute module for a personal project; but I don't know the name of the connector that is used for the GPIO/SPI etc. It is the one pictured here In the spec sheets, I see the pin out ...
0
votes
1answer
48 views

How can I display Ubuntu Server 21.04 on a Waveshare 3.5" LCD display?

I installed Ubuntu Server on my Raspberry Pi 4. I have a 3.5" Waveshare display for it. Waveshare provides instructions to clone a GitHub repository and then run a script called "./LCD35-...
0
votes
3answers
61 views

How to persistent write to registers?

I'm trying to "hardware-lock" some software written for the Pi and ensure that even if someone clones the SD card, they're unable to run a particular piece of code if it's not on an "...
1
vote
1answer
56 views

Hardcode RF Codes - RPi-RF

I would like to use the rpi-rf module https://pypi.org/project/rpi-rf/ for a remote control alert system, using a PIR motion sensor as the input. I have so far set up the PIR input and send and ...
-1
votes
1answer
22 views

Magnetometer interference when using sense hat connected via GPIO pins

I am trying to use the magnetometer on the sense hat to act as a compass however I also want to utilise the GPIO pins for other components. I've successfully wired up the sense hat to the GPIO pins on ...
2
votes
2answers
64 views

How can I short GPIO3 when external 5v power is switched off?

Background: I have my RPi running connected to a small UPS. This works fine when the power goes out for a short time, but I want to have the Pi power down when the power is off and it's running from ...
0
votes
0answers
23 views

Raspberry Pi Zero W not interacting with GSM HAT

I have Raspberry Pi Zero W and this hat. I did the following things: disabled login shell through serial in rasp-config enabled serial port hardware in rasp-config removed console=serial0 in /boot/...
1
vote
1answer
42 views

Controlling WS2812b LED strip produces inconsistent and uncontrollable output

Background I'm trying to control a single WS2812b LED strip from a Raspberry Pi. I've followed this tutorial from raspberrypi.com (with the exception of Prep & Installation step 4, because I ...
0
votes
1answer
55 views

wiringPi compile issue on RPi 4B 64bit

I am trying to compile my C++ project using CMake. My Raspberry Pi OS does include /usr/include/wiringPi.h and all the required .so files in /usr/lib/. Here is the output of gpio -v command: gpio ...
1
vote
2answers
45 views

Detect frozen/crashed pi or app and handle it?

TL;DR: I am looking for options that will allow me to detect whether an app of the pi and/or the pi itself has been crashed or frozen; And if so, reboot the pi. The setup: I'm working on a hobby ...
1
vote
2answers
124 views

How to enable both UART (ttyS0 and ttyAMA0) on Raspberry Pi 3b?

I've already read dozens of manuals and stack topics, but I do not figure out if it even possible run both UARTs on RPi 3B. Some tutorials advice to map uart to other pins in /boot/config.txt I tried ...
0
votes
0answers
30 views

Interfacing with a button module using 3x MCP23018 port expanders

I have recently picked up a keypad I wish to use in a Raspberry Pi project. It has an i2c interface, with 20 buttons, each with an LED backlight. The buttons/LED's are connected to 3x MCP23018 port ...
0
votes
1answer
64 views

16 module relay board connection to RPi Zero W

I am using raspberry pi zero W for a home automation project. I am using 5V 16 channel relay board and using all the 16 relays as part of the project. I have not connected a separate 5V power supply ...
1
vote
3answers
83 views

power the logic circuit of an external component with an external power supply instead of the raspberry pi's GPIO

I want to know if is it possible to power the logic circuit of an external component used with raspberry pi not in the way shown below (using the 3.3v or 5v ang GRND GPIO), but with an external 3.3v ...
1
vote
1answer
39 views

How to connect pico gpio port to RPI4 gpio port

I have a sensor controlled by a Pico and a much larger embedded application controlled by a Raspberry Pi 4. When the Pico senses a condition, it raises a signal on a GPIO pin which I would like to ...
0
votes
1answer
49 views

Pi zero doesn't fully shut down after adding a gpio-poweroff dtoverlay to /boot/config.txt

Disclaimer I'm still learning about the device tree in general and am definitely fumbling about a bit. The problem Pi Zero W draws basically zero current when shutdown with sudo shutdown now. After ...
0
votes
2answers
31 views

Toggling GPIO via BCM2835 registers on RPi 3B+

I am trying to toggle GPIO directly by setting BCM2835 registers. This is the code i wrote for this purpose and I wonder why doesn't it work. If the approach is wrong, then how to access GPIO ...
0
votes
1answer
36 views

Maximum usage USB and GPIO power consumption

I use a raspberry Pi3B+ for a home automation installation. On which I have connected several peripherals. In particular an RFID reader and an OLED screen. But I notice that after a while, these ...

1
2 3 4 5
61