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,338
questions
0
votes
3
answers
336
views
RPi pin state on startup not default
I have 2 Raspberry Pis a model 3B+ and a model 2. Both are loaded with identical software (I cloned the SD card using the raspberry SD card copier). They are running PRETTY_NAME="Raspbian GNU/...
0
votes
1
answer
926
views
AttributeError: module 'RPi.GPIO' has no attribute 'ChangeDutyCycle'
Starting Day 2 troubleshooting this error. Code used to work on a previous rasp pi 4B but doesn't on a new one so I'm assuming I'm missing some breaking change.
Problem:
Using import RPi.GPIO as GPIO ...
1
vote
0
answers
51
views
adafruit_hcsr04 sonar not working on certain GPIO pins Pi 4 B
I have 8 adafruit_hcsr04 range finders wired in the exact same way to a Raspberry Pi 4 but only 4 of them work and I'm at a loss.
I've verified with an ohmmeter the echo and trigger pins are ...
0
votes
0
answers
142
views
I2C OTHER PINS IN RASPERRY PI FOR I2C LCD
I am planning to put a power button on my raspberry pi 3b+ which uses the PIN 5 in order for me to shut it down and turn it on again when I wanted to. However, pin 5 is I2C CLOCK which is used for the ...
1
vote
2
answers
264
views
Raspberry PI noise reduction on analogue sensors
I am trying to reduce noise on an analogue sensor.
I have scanned many forums for answers and spent multiple hours / days on finding the optimum solution. I am using ACS712-based sensors and the need ...
1
vote
3
answers
11k
views
How to install wiringpi on Raspbian
Hi I am currently preparing my project and I intend to use the gpio and I would like to be able to use the wiringpi library but when I try to installing it with
wget https://project-downloads.drogon....
0
votes
1
answer
86
views
My relay triggers on access. How to disable this?
Is "normally" open relay opened on 0V or 5V?
Here it is written that yes. But here it is written that no.
What is the truth?
Experimentally I see, that my relay module LED lights ON and &...
1
vote
1
answer
117
views
Connect several sim800l with external power supply to the uart of ip4 and floating ground
I am creating a circuit with several sim00l connected to different UARTs each with its own external power. But I'm curious if having other objects like cooler-fan connected to other GND of the rpi ...
5
votes
4
answers
2k
views
Raspberry Pi DPI only works over short distances. Why?
I would like to use the Raspberry Pi 3B+ to operate the rectangular HyperPixel 4.0 touchscreen from Pimoroni. However, I don’t want to plug the touchscreen directly onto the Raspberry Pi, but instead ...
0
votes
1
answer
251
views
Controlling multiple servo motors on rpi 4
Do I need a hat module for my raspberry pi to control 6 servos? I’ll be using an external power source.
2
votes
1
answer
565
views
Controlling stepper motor with Raspberry pi
I am building a sorting machine for a project where I want to sort the balls based on their color. For the actual sorting mechanism I am using a stepping motor (NEMA 17 with Driver DRV8825). I ...
-1
votes
1
answer
160
views
How to assign one input when matrix keypad key is held down?
I have a simple matrix 3x4 keypad that executes a function based on the code entered. However I'm running into the issue when someone holds down a key. I would like it to where only one value is ...
0
votes
2
answers
213
views
No data from DS18B20 sensor in w1_slave
I have added 2 DS18B20 sensors to my Raspberry pi 1, both sensors shows up in /sys/bus/w1/devices and I can only read data from one of them, the other simply has a empty w1_slave file.
They are not ...
0
votes
0
answers
64
views
Raspberry Pi camera coding questions
I've been coding a little portable Pi camera using a Raspberry Pi Zero, the HQ camera module, and a WaveShare 1.44-inch screen. I've succeeded in programming a button to take a photo, and a button to ...
0
votes
3
answers
727
views
How can gpiotest fail on all GPIO pins?
When trying to pin down a communications issue with a GPS module attached to my Pi's UART, I disconnected all peripherals performed a test of all GPIOs using gpiotest. This is what came out:
pi@...
1
vote
2
answers
773
views
How do I control a fan attached to GPIO pins on Android?
I installed android tv with konstakang on my Raspberry pi 4 device. While using linux with GPIO pins, I made fan control with python according to temperature.
How can I use GPIO fans on Android?
0
votes
1
answer
558
views
Could Not Determine Platform Error
I am using the following tutorial to make a moisture sensor using a Raspberry Pi 4: https://www.instructables.com/Measuring-Soil-Moisture-Using-Raspberry-Pi/
When I have run my code, I get the ...
0
votes
1
answer
68
views
modprobe does not release GPIO pins when removing driver
I've got a custom driver, which gets loaded on boot (I compiled a kernel image for it). It uses a number of GPIOs, as defined in the device tree overlay (specifically, the cam gpios of the raspberry, ...
-1
votes
1
answer
353
views
Difference between Pi3 and Pi4 RUN headers?
I am trying to disable boot when pi4 plugged to power. I found some usefull answers, but that answers are about pi 3. I am using pi 4 and I must connect together 2 RUN header pins. In pi 3 RUN header ...
0
votes
2
answers
161
views
Get Measurements from Battery/Solar Setup
I'm planning a setup with an rpi3b+ and the pijuice hat (battery) and pijuice solar module. It is key to my project that I can access the following data digitally i.e. in the pi:
current power ...
0
votes
0
answers
42
views
How to disable boot when plugged to power? [duplicate]
I want to disable boot of raspberry pi 4B when plugged to power
I have searched a lot and found a similar question, which gives a short and suspicious answer to this problem. If two RUN pins(holes) ...
0
votes
1
answer
470
views
ERROR: PWM Generation using pigpio C library
I am working on the RPI-CM4 board with raspbian buster OS.
I am trying to generate the 38KHz PWM wave using pigpio the library. My code is as follows.
#include <pigpio.h>
#include <unistd.h&...
2
votes
2
answers
292
views
GPIO Button Wiring
Edited:
Question re-written
Hello,
So I am looking to build a system that will have around 400-500 input buttons. These buttons are basically used to select an option so only 1 button will ever be ...
0
votes
1
answer
1k
views
Direct Access RPI-4 GPIO Interrupt
I am working on the RPI-CM4 board with raspbian buster OS.
I am building an application to get interrupt events from the GPIO pin, fluctuating its state @20usec.
I have tried the following things...
...
0
votes
1
answer
185
views
Button.when_activated event is not firing even though Button.is_active is setting correctly
Thanks in advance!
I am using a Pi 3B to detect activation of a sensor on my model railroad layout. The sensor by default only offers a rising edge detection scenario. I decided to go with gpiozero ...
-1
votes
1
answer
160
views
Can you use gpiozero wait_for_press() inside of a callback triggered by add_event_detect?
I am trying to write a script that uses a GPIO interrupt to callback a function that starts by playing a sound and then waits for a button to be pressed to start recording a sound, and then waits for ...
0
votes
1
answer
894
views
Minicom not working
I am trying to connect my Pi 4 running Rasbian 2020 to an Arduino, after making all the connections I try to communicate with the Arduino by using Minicom. However, Minicom doe not respond to anything ...
3
votes
5
answers
4k
views
Confusion with libgpiod and the gpiod user tools?
For some time I've heard about the new GPIO character device API, sysfs deprecated, etc. Since I recently upgraded one of my RPi to bullseye, I decided to try this new API - or at least the "...
-1
votes
1
answer
292
views
Turn LED off and on using I2C, SPI or UART GPIO Pin
I have project requiring several simple LEDs and buttons, MORE that the number of ‘simple’ GPIO pins. Can I turn the LED TOTALLY OFF and on using a IC2, SPI, or UART pin? Can those pins be programed ...
2
votes
2
answers
176
views
Erratic GPIO event callback
I have a Raspberry Zero connected to the SO pulse output of an energy meter (ABB C13) using a direct connection to GND and GPIO13 configured as input with pull-up resistor, and a Python program with ...
0
votes
3
answers
129
views
Any danger to supplying multiple GPIO with small voltages
Very new to GPIO and wiring circuits so I'm hoping someone can clarify whether what I'm doing is going to be safe for the Pi.
In my original question I was looking for the way to get my 12V supply ...
1
vote
3
answers
107
views
Haunted House - ceiling fan triggering pi button
I have a raspberry pi 3b+ and a haunted house.
My raspberry pi sits in the living room tv cabinet (with adequate ventilation) as a server. I had a large button lying around, so i put it inside a small ...
0
votes
1
answer
638
views
Install GPIO problem
It seems like I cannot download GPIO...
2
votes
2
answers
212
views
SSH connection status indication through GPIO LED
I am looking to implement this feature where an LED connected to Pi GPIO should turn on whenever the Pi is successfully connected to a PC by SSH and turn off otherwise.
Appreciate any help in ...
0
votes
0
answers
98
views
Consistent Motor control - specifically 180 degrees
I am struggling to get my motors to perform the same on each run. The first time I run the program, they will perform the same movement about 8/10 times. The second time I start the program, the ...
1
vote
1
answer
171
views
Sense 240v current flow externally
I have a situation where I suspect my well pump is short-cycling, and I'd like to rig up some sort of sensor that can detect when it comes on and send me an alert. I'm thinking a Pi should be good for ...
-1
votes
1
answer
138
views
Can 2 different wires be connected to the same GPIO pin?
I am trying to make a voice assistant with the Raspberry Pi and ReSpeaker 4-mic array.
ReSpeaker 4-mic array requires 40 pins to be connected to Raspberry Pi. But besides that, I want to connect the ...
0
votes
2
answers
692
views
How to run a python script on raspberry pi from an android application?
I am currently working on a project where I have to develop a Camera Security system and an android application. The camera system provides live streaming videos and also has the ability to detect ...
-1
votes
1
answer
52
views
Having all GPIO signals and making an OR between them
I have a Raspberry Pi 4 to be used to give signal to a relay. When I was experimenting, I somehow manage to make one of the GPIO pins not working. When I use another port, it perfectly works. I don't ...
0
votes
2
answers
490
views
How do I diagnose GPIO issues?
I was soldering LEDs in an extended line the other day when I accidentally forgot to shut my Raspberry Pi 4 off. I continued to solder and soon enough shorted my Pi out. It rebooted quickly and all ...
0
votes
2
answers
81
views
Using multiple LDRs and capacitors with Raspberry Pi 3B +
I am pairing an LDR with a capacitor to to make a light sensing project by returning the value of the variable COUNT when the capacitor is charged. But when i do this with 2 or more LDRs the values of ...
-2
votes
2
answers
596
views
12V LED/switch - where to insert resistor to connect to PI GPIO
Hoping someone can help me with connecting my 12V push button LED circuit to a PI GPIO.
I want to be able to sense when the button is pressed and the LED lights up using python.
From what I've read I ...
0
votes
0
answers
97
views
Connecting two Raspberry Pis two capture synchronized images
I have two Raspberry Pi 4s and I want to connect them together so I can capture synchronized images; one from each pi. At the moment, I have one pi capturing an image after I press a button that is ...
-1
votes
2
answers
1k
views
how to give a program permission to run without sudo?
I have a program, I wrote called "enc".The program is written in C, and reads GPIO pins, and thus requires sudo to run. but I don't want it to require sudo or a password to run. I tried sudo ...
1
vote
0
answers
86
views
Is it possible to connect multiple USB devices to the I2C bus on RPI?
I want to control lots of USB devices from a single Raspberry Pi. So far I have only tested with RPI4 and I could only connect about 5 devices concurrently. The limitation is caused first by the fact ...
0
votes
0
answers
480
views
How do I connect a MIDI socket to the GPIO pins on a Raspberry Pi?
I have a Raspberry Pi 4 model B and a five pin MIDI connector (PRT-09536). The female MIDI jack is circular and has five holes on the front, and seven pins on the bottom. Five pins are staggered in ...
0
votes
1
answer
312
views
Using GPIO 2 and 3 to close an external switch - can or should I link grounds?
If I have an external board which has 2 pins, ground and pin16 which I want to short (as would a mechanical switch) from the Pi, can I link grounds from the Pi to the external board and use the fact ...
1
vote
1
answer
3k
views
Circuitpython: ValueError: GP0 in use. How to reset GPIO pin?
Error Message
After having written a function that sets output and values to specific GPIO pins, I'm running into the following error:
ValueError: GP0 in use.
Code
The function is:
def ...
0
votes
2
answers
317
views
GPIO pin 7 and 8 pull-up resistors and DToverlay
I was using raspbian on my RPI4 till now, but decided that I dont need GUI and would be nice to try Ubuntu Server.
All fine and dandy, but Cannot for the love of god set pins 7 and 8 to low on boot, I ...
0
votes
0
answers
143
views
sysfs blocks gpio pins after one minute from restart
I am using Raspberry pi 4b with Linux raspberrypi 5.10.63-v7l+. I am writing simple userspace program for control one GPIO by ioctl() (in my case GPIO 13 for example). However program responses: ...