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
0answers
15 views

Raspbery Pi GPIO Hat

I've got this Raspberry PI GPIO [expansion hat][1] attached to a Raspberry PI 3b and have a question. Even though the terminal blocks are well labeled, I don't think I understand what pin numbers of ...
0
votes
1answer
17 views

Signaling a Pi from an Arduino

I am building a project that uses an Arduino for controlling addressable LEDs and a Pi for sending data over usb. What I am trying to figure out is whether there is a way to have the Arduino signal ...
0
votes
1answer
36 views

ClassNotFound when sudo java

I have a computer lab which is set up with piserver and 3B+ raspberry pis. I want my students to be able to write java code that will use the GPIO pins, so they will need to sudo java their programs. ...
0
votes
1answer
35 views

Audio output on Raspberry pi Zero W

I was trying to take an audio output from piZero-W, the article I followed was, this one. How to get audio through the gpio pins to a 3.5mm jack? When running - systemctl status alsa-state the result ...
3
votes
4answers
888 views

Can unstable PWM timing be corrected?

I would like to set the motor speed of a RPLidar A3 which requires a 25 kHz PWM. So I played around with the following: from RPi import GPIO GPIO.setmode(GPIO.BCM) GPIO.setup(12, GPIO.OUT) pwm = GPIO....
0
votes
2answers
33 views

Three-Pin Switch for On/Off, Pi Zero W

I'm a novice python coder, and even more novice pi user/electronics person. I'm trying to set up an on/off switch on my headless pi with a three-pin arcade switch I found. Right now the switch is ...
0
votes
1answer
23 views

Is it possible to connect multiple WS2812 LED Strips to a Raspberry Pi 3?

im new to the Raspberry Pi in general and followed this tutorial https://dordnung.de/raspberrypi-ledstrip/ws2812 to control a single LED Strip. I was wondering if it was possible two control a second ...
1
vote
2answers
56 views

How to enable the second serial port on a pi4

I am trying to use the second serial port. In /boot/config.txt I have put at the end : # swap UARTs dtoverlay=pi3-miniuart-bt dtoverlay=uart2 enable_uart=1 I have checked and re-checked the pin ...
0
votes
2answers
37 views

Does GPIO 1 have to connect to an EEPROM?

I was wondering whether or not e.g. GPIO 1 should be used for connecting to EEPROM's only, or whether it is still fully functional for all other purposes. It could maybe also be that the pin is only ...
0
votes
1answer
24 views

Does GPIO27 need special handling when used as digital input?

I have three rotary encoders (with switch) connected to GPIOs (16,17,18), (19,20,21), (22,26,27). For quick testing of working I/O, I put all of them to input mode, with internal pull-up, and watch ...
2
votes
4answers
164 views

What is the correct way to access GPIO on RPi?

I have a brand new Compute Module 4 with Raspberry Pi OS installed. The system is up-to-date, but I cannot read GPIOs or change their state. $ gpio -v gpio version: 2.52 Copyright (c) 2012-2018 Gordon ...
0
votes
1answer
16 views

How to connect keypad to Pi Zero

I've tried to find info but with no luck. I'm trying to make a project - barcode scanner - using RPI zero. I need a keypad to input quantities when I scan a barcode. I am unable to find any phone-...
0
votes
1answer
33 views

Detecting connection between two arbitrary GPIO pins on Pico [closed]

I wrote a code that I run in Thonny which detects if a connection is made between the 3.3V output and a GPIO pin on the Raspberry Pico: print("Hello World!") import time import digitalio ...
1
vote
1answer
57 views

Reading MCP23S17 port expander with pigpio

I'm trying to read from a handful of switches connected to a MCP23S17 port expander using pigpio, however I'm not getting any useful results. Whatever my switch values, I have 0 returned. I've checked ...
0
votes
1answer
63 views

Almost every GPIO input pin is showing up as pin 22 [closed]

EDIT: The problem ended up being that the ribbon cable going to my breadboard was rotated 180º. I was taking this into account, but doing so incorrectly. Once I correctly labeled the rotated pinout, I ...
0
votes
1answer
29 views

When To Use a Level Shifter (Arduino Uno + Pi SPI)

I was following this guide from Adafruit to flash an Arduino with a Pi using AVR-Dude over SPI: https://learn.adafruit.com/program-an-avr-or-arduino-using-raspberry-pi-gpio-pins?view=all I noticed ...
0
votes
2answers
45 views

Checking which GPIO pin is high

In my program, I have 10 push buttons In a certain function of my program, I need to check if a particular push button is pressed. If it is pressed, function A should be called, while if any other ...
0
votes
1answer
36 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
45 views

GPIO - which is a correct register to read state? [closed]

Voluntarily deleted Voluntarily deleted
0
votes
2answers
61 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
35 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
17 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
79 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
36 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
46 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
45 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
58 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 ...
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
29 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
36 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
53 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
32 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
37 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
63 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
63 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
53 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
95 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
224 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
35 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
13 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
44 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
161 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
24 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
32 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
69 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-...

1
2 3 4 5
62