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
10 views

Input() called from GPIO input (button press) returns error

I'm learning Python whilst tinkering with various 'kits' I got for my Raspberry Pi. Currently messing around with the RFID-RC522, a simple to use RFID read/write board. I have independent Write.py ...
0
votes
0answers
8 views

mimic a momentary switch button for third party device

hello and greetings to everybody! i need to set the Rpi to perform a momentary switch via GPIO to switch on and off an external device. The device itself has a 3.7V momentary button that when is ...
0
votes
0answers
8 views

Simplest method to reliably detect small currents [migrated]

I am trying to detect when there is a current in a given circuit using only a digital input and basic components (e.g. diodes, resisters, transistors); current is intermittent and power is small, less ...
0
votes
1answer
23 views

Stronger Physical Connection to GPIO Pins

I looked a fair bit for a discussion on how people physically connect to the Raspberry Pi's GPIO pins, but could not find too many resources. I use my Pi's in vibration intensive, remote locations so ...
1
vote
1answer
35 views

What GPIOs have predictable startup behavior?

Say I'm making a thing which uses some GPIOs to launch a rocket. I wouldn't want to launch the rocket because there was a power outage and the Pi rebooted. As such, it's important to know the startup ...
0
votes
2answers
37 views

How to create unfazed pwm signals?

I have two pins with the same frequency (10Hz) and same duty cycle (50%) assigned to two different leds. How can I make the two leds blink alternatively? How can I put a delay of 50% in one of the ...
1
vote
2answers
164 views

How do I implement an interrupt service routine on Raspberry Pi?

There are several libraries like WiringPi, RPi and pigpio, claiming to implement interrupt handling for GPIO signals. But as far as I can estimate, they all do polling on the pins, therefore implement ...
-1
votes
1answer
27 views

How to extend more IO from a Raspberry Pi board?

I am designing a locker system with Raspberry pi 4B and inching switches to detect if the things inside the locker are removed or not. It has 34 lockers, and I have already found a proper locker-...
1
vote
0answers
16 views

setup pi3 to work with embedded modem through TXD RXD

how can I configure pi3 (GPIO ) connected to embedded modem through (UART Pin 8-Pin 10)TXD RXD? and how can write python code to control with modem?
1
vote
4answers
1k views

GPIO pins not changing state

I have Raspberry pi 4B, and I want to interact with the GPIO pins. I connected simple LED wiring to physical pin's 37(GPIO25) and 39(GND). After exported pin, and set up mode to "out", I ...
0
votes
1answer
23 views

Can AA batteries have voltage or current spikes?

I'm a noob in raspberry pi and in engineering in general. I had an idea for a project but it requires it to be somewhat portable so I need to power the raspberry somehow. I read this article Where it ...
1
vote
0answers
34 views

Is there a screen that will fit the Raspberry Pi Zero W that doesn't use I2C [closed]

I've been using the Adafruit PiOLED which causes some issues with the PiSugar 2 battery I'm using. Because of this, I'm looking for recommendations on a screen that doesn't use the I2C protocol. I'd ...
0
votes
1answer
33 views

Can't access GPIO on Debian Buster & Pi4B

I'm running a Pi4 with Debian Buster (not Raspbian / RaspberryPi OS) and need to interact with the GPIO pins but am having problems doing so. I've created a gpio group and added the pi user to it ...
0
votes
0answers
23 views

Pi4B / GPIO / Rust problem

SBC: Raspberry Pi 4B (8GB) OS: Ubuntu 20.10 Groovy Crate tetsting: RPPAL Rust version: 1.48.0 Compile/run error tester1@pi4b:~/playground/rpi_gpio_01$ sudo target/debug/rpi_gpio_01 Blinking an LED on ...
1
vote
1answer
31 views

How can I write or read from a specific GPIO pin in from a kernel-module?

I'm using a Raspberry Pi 4 with standard 32 bit Raspbian. I'm trying to write a driver in c that writes AT commands to some GPIO pins and reads the response from other pins. For that I want to use the ...
0
votes
1answer
25 views

Should I use an external power supply for controlling 4 servos?

So I have for servos that I could connect to a breadboard and to raspberry pi GPIO 5V pin to power them. But I have read that That is not safe it can damage the pi. Is that true? instead of using ...
5
votes
2answers
727 views

What is the rationale behind GPIO pin numbering?

I was looking at the 40-pin pinout and I couldn't help noticing that there doesn't seem to be a logical order to the placement of the GPIO pins. Even allowing that there may be a technical reason for ...
-1
votes
0answers
59 views

RaspberryPi 4 Python RPI.GPIO Output always high

Running Raspberry OS in a RaspberryPi 4 and I have a rc522 RFID connected and working, but for some reason I can't control any of the GPIO ports. The point of this project is to wake an ESP32 from ...
0
votes
2answers
30 views

How to drive two 3v relays safely from Raspberry PI?

I use PI 4 to power two 3v relays. One is controlling 5v dc, another 12v dc. And about once a minute I am switching each relay signal state to On/Off So each relay is connected to 3v pin, ground pin ...
0
votes
1answer
75 views

Ubuntu 20.10 and GPIO

I have trouble installing RPi.GPIO library on Ubuntu 20.10. I run apt-get update and apt-get upgrade then apt-get install python python3 python3-pip python3-dev everything went ok. Then I run pip ...
0
votes
2answers
29 views

Servo is jittery and moves back and forth when it should be still

(Sorry about formatting) I am trying to write an opencv program to track the color red. So far it works okay, but the servo is jittery and when the object is still and centre the servo moves back and ...
0
votes
0answers
26 views

Why I get “segmentation default” when add module to kernel?

I have build softuart.ko and add into kernel, but I got "segmentation fault" error when run insmod. I get code from https://github.com/themrleon/RpiSoft-UART. The detail message error I got ...
0
votes
1answer
29 views

Raspberry Pi Pycharm can't recognise GPIO

I'm new to Raspberry Pi and Python. I am trying to use Pycharm to code my GPIO just for a simple project to let the led blink. The code is working fine with Thonny IDE but when I move the same code to ...
0
votes
0answers
79 views

problem with gpio 18 pwm and ledstrip

im using raspberry pi 4 model b,2GB i had a previous one but it got defect and i got a new one. i used to use hyperion and hyperbian wich worked perfectly, now with my new pi i got same setup and it ...
0
votes
4answers
59 views

This channel is already in use, again: X-mas tree lights

Sorry, but I've looked at several threads and no one talks about my idea. I'm currently working with a switch, that will manage the Christmas-tree lights, to turn it on at 18:00 and off at 01:00 (e.g.)...
0
votes
1answer
54 views

GPIO not working on Raspberry PI 4 4GB

I have a RPi 4 running Raspbian with the Ubuntu Mate desktop environment, whenever I try to use the Wiring Pi library through a C script, to doesn't work at all. On using the gpio readall command I ...
0
votes
0answers
22 views

Motor controller for Raspberry Pi 3 has no effect on attached motors. (Drok XY-160D Board) [duplicate]

I believe this code is correct. I am working connected to the Pi through SSH and tried running it through the Mu shell. Motor controller is hooked up to a 12V power supply. If it helps, I noticed the ...
0
votes
0answers
26 views

One Raspberry pi GPIO can drive how many inputs of 74HC245 and 74ABT245?

Please help me understand these calculations. Don't know which parameter to look for to find out Fin in and Fan out of a buffer IC. Thank you
0
votes
2answers
44 views

Cannot connect to UART via USB

I am trying to connect to a raspberry pi zero (and a pi3) via uart and USB (USB to TTL YP-01) I am connected to pin 8, pin 10 and a ground. tx -> rx, rx -> tx I have tried everything on this url ...
1
vote
1answer
57 views

Control IR Port With GPIO

I'm working on a project that needs the ability to control an HDMI switch programmatically. There are going to be a lot of these boxes so price of the components used is very important. I've ...
2
votes
2answers
75 views

PWM frequency/profile for “official” pi fan?

I have a pi4 with the "official" fan case and I would like to write my own fan control code. I have looked online for a datasheet for the fan but haven't found it yet. I see on the case fan ...
1
vote
3answers
62 views

Components need too many GPIO pins

I am relatively new to electrical engineering so don't expect me to know much... I want to start a kind of proof-of-concept projcet. It should - when it is finished - run on a Raspberry Pi Zero (W). ...
-1
votes
1answer
37 views

Raspberry Pi checking and rebooting the main router if necessary [closed]

I have gotten tired of having to reboot my router a every other day. I think my router does not update when my ISP changes. Now I have a timer that cuts the powers to the router at 4 am. An more ...
1
vote
1answer
60 views

Using a GPIO to unlock an electronic lock [closed]

I want to build a safe that can only be opened via an HTTP POST request. In order to do this the safe will contain a Raspberry Pi Zero W that will host a simple server that listens to these requests ...
1
vote
4answers
83 views

DS18B20 Sensor - Can you manually write data to w1_slave?

I'm trying to manually edit the w1_slave file of a DS18B20 Sensor. Using nano to edit the file, when I manually change the temperature and go to save and exit, I get 'permission denied'. Is there ...
0
votes
0answers
20 views

Python Flash read data / enumeration

I read in the datasheet that my Flash can be read by doing: To perform a read operation, RST# and WE# must be deasserted while CE# and OE# are asserted. CE# is the device-select control. When ...
0
votes
1answer
58 views

Using GPIO to control 5v relay module not working

so this is my first time trying to use a Raspberry pi and I wanted to automate a motor using a 5v relay module. I'm using a Raspberry Pi Zero W. I am using a 5v 2amp power supply to power the ...
-1
votes
1answer
21 views

input pin not working

I connected the 3v3 power pin to a switch and then to an IO pin set to input. when I turned on the switch, it works fine and I detect an input, but when I turned off the switch, it was going back and ...
0
votes
3answers
47 views

My GPIO.event_detected code is unreliable

I made this short program to understand GPIO.event_detected() better, and ended up more confused than I started. Please help me understand my mistakes. Here is the code, and some test output of me ...
0
votes
1answer
34 views

Reading current PWM output configuration

I use gpio #32 (wPi #26) as PWM output to control the speed of a fan based on temperature. The job starts at system startup with a dedicated account. I would like to display the current value that is ...
0
votes
1answer
26 views

Use GPIO port as toggleable ground - NodeJS

I need a way to spin a brushed motor in both directions with my Raspberry Pi 4. I don't have the right transistors. The only way I would be able to achive this is through a GPIO port that I could turn ...
1
vote
2answers
44 views

Can RPi 4B be used as a microcontroller for USB devices development?

Background I've made simple shortcut buttons to be used with Google Meet (componets on breadboard and the code in python): one button connected to some GPIO pin that makes a keystroke (ctrl + e) for ...
-1
votes
3answers
69 views

Use GPIO to power an USB device

I searched the forum but didn't get a clear answer. I have a "LED tinsel" powered by an USB plug. I tried connecting a 5V pin of my RasPi3 GPIO to the "+" pin of the USB plug, and ...
0
votes
1answer
40 views

Is it possibel to send a CLI command from a input on the GPIO

Im a beginner in raspberry, and i would like to send a command on the CLI whenever a input is activated on a pin. Basically i want to push a button on a breakoutboard or similar, that sends a signal ...
0
votes
1answer
107 views

Is it possible to drive two PWM pins with opposite phase?

One well-known trick to make a piezo buzzer sound louder is to actively drive both sides of it with an opposite phase: when pin 1 is at 0V, pin 2 is at 3.3V and vice versa. This creates a voltage ...
0
votes
0answers
43 views

GPIO17 only works after calling 'GPIO.setup(17, GPIO.IN)'

I have a fresh installed RaspberryPi running Raspberry PI OS Lite (32-bit) from 2020-12-02 with a mounted OnOff-Shim. Starting the Raspberry via button works fine, but the shutdown sequence is not ...
0
votes
1answer
72 views

I wan to connect Case fan and display using GPIO pins

I want to connect a display and Case with a fan on my RPi4B. However, I am not able to do so successfully because they commonly need GROUND and +5V pins which are right now used my 3.5 inch TFT ...
1
vote
1answer
45 views

Python code for 2 buttons

this is a beginners question, I suppose. How can I write a python code that allows the use of 2 (or more) push buttons connected to the GPIO? Each button should start a different shell script. The ...
0
votes
1answer
31 views

GPIO: multi button input to trigger one output

First, total noob here. Apologies in advance if this has already been addressed, but I have not found anything that specifically answers my question, yet. I have some experience with structured text ...
1
vote
2answers
124 views

How can i cross-compile for Raspberry Pi Zero with WSL?

I am working on a project with the Raspberry Pi Zero and since I don't have a monitor to connect the Pi and don't want to use vi through ssh I thouhgt that cross compiling would be a decent solution. ...

1
2 3 4 5
58