Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

0
votes
1answer
9 views

MAX14830 GPIO control

I'm using the MAX14830 as UART and GPIO extender. Got the UART working, but I'm confused on how to use the GPIO. I notice there is a new entry in /sys/class/gpio (gpiochip496): pi@raspberrypi:/sys/...
-2
votes
1answer
12 views

Ser.write() ,when checked shows only the length

I have used a=ser.write("TEST".encode()) in my code to send data using UART gpio in Rpi. The code shows no error but when I print a,it gives me the length only. Actually i am trying to interface Rpi ...
1
vote
2answers
16 views

Trigger an “alarm” when a circuit is open

I'm building a better mousetrap. I want to add two wires to a traditional mousetrap: one on the metal bar that snaps when the trap is triggered, and one on the trigger bar that holds the trap in "...
-2
votes
0answers
17 views

Problems with using GPIO in C++ [on hold]

Hy, I have a raspberry pi 3 model B*, i'm trying to use geany and C++ to control things using the GPIO pins. I started with I2C, but that wasnt working, so i tried to do a basic on-off led switch, but ...
0
votes
2answers
30 views

How to make a stand by button?

I am using an Raspberry Pi 3b and a 7 inch hdmi waveshare touchscreen that connects to rpi with a hdmi cable and a micro usb cable. I want to program a push button from GPIO pins to make the screen ...
1
vote
3answers
33 views

Having some trouble identifying GPIO pins

Okay, some quick background first, I just managed to install Raspbian on a Raspberry Pi 3B+, and I started to try to do some projects. I started off with just writing python, which I'm happy to say ...
0
votes
0answers
10 views

After changing lirc gpio wifi stops working with raspbee module attached

I build a tv remote control using lirc on an rpi3, and it worked very fine up to this day. Today I put a ZigBee (RaspBee) module on the first 12 GPIO pins and my output GPIO pin (17) for the remote ...
0
votes
0answers
13 views

How to use GPIO buttons to interact with front end of Nodejs server

So I'm currently trying to make an application that will display columns of data in the browser. I want to be able to interact with what is being displayed with buttons wired in through the GPIO pins. ...
1
vote
0answers
62 views

Burned PI while using GPIO pins

First of all I'd like to point out I already know there a wide variety of posts covering this issue but I'm wondering whether you could help with my case. I was messing around with the GPIO pins ...
0
votes
1answer
14 views

Can't trigger GPIO control via executable run through php's exec function

/var/www/html/index.php <?php exec("./on"); shell_exec("/var/www/html/on"); on.cpp #include <string> #include <getopt.h> #include <cstdlib> #include <sstream> #include &...
-1
votes
1answer
24 views

GPIO solution to power Pi

Looking for a GPIO solution to power a Pi 3 B+. Basically, trying to bypass the Pi micro USB connector. Also, any suggestions on hardware to build a compact, inverted, USB male right-angle ribbon ...
2
votes
2answers
20 views

Minimum Pulse Width for asynchronous Interrupt

Does anybody know what is the shortest pulse width that the Raspberry Pi (any model) GPIO interrupt pins can detect? I have a project in mind, but the pulses would be between 5 & 17ns wide.
0
votes
1answer
33 views

“push” physical button on a remote

I have a remote for my kitchen fan where I can turn on the fan and toggle to light. This remote says on the back to be using 433MHz so I bought a receiver and transmitter for my Raspberry Pi in hopes ...
-1
votes
0answers
17 views

Raspberry Pi + L293D to switch 12V solenoid valves

I am porting an Arduino project to Raspberry Pi. On the Arduino I switched two 12V solenoid Valves with the help of a L293D IC. It worked perfectly. Now I am porting this system to a Raspberry Pi. ...
0
votes
1answer
23 views

My rotary encoder is missing pulses - what are some potential solutions?

I have a rotary encoder with a very high resolution (5000 pulses per rotation). I used what I believe to be a fairly optimized rotary pulse counter program written in C found here but the faster I ...
0
votes
2answers
52 views

Autostart a program comprising GPIO-commands

I am used to autostart with rc.local, after making my program called "test3.py" executable (sudo chmod a+x test3.py). I failed to get it autostarted, means as the first program which the Raspi-stretch ...
1
vote
1answer
24 views

Rapidly-fluctuating output when using rotary encoders with Raspberry Pi + Processing

I'm using a Raspberry Pi 3 with some Cylewet KY-040 rotary encoders that I bought from Amazon to set up an art installation with Processing 3. Pi is just running the stock Raspbian NOOBS. Right now, ...
-1
votes
0answers
44 views

raspberry pi zero audio output [on hold]

I want something like JustBoom DAC Zero pHAT but there are no additional pins for something else. I'm noob in prototyping. What i have to do?
-4
votes
0answers
33 views

I need help coding a toggle button for led? [duplicate]

I have hooked up my circuit and it works as a hold button to turn light on. Then when I let go of button light turns off but I have found no way to make a toggle button for led. If somebody were so ...
0
votes
0answers
16 views

Gpiozero inside custom function

So I have a odd problem. I have raspberry pi model 3 using gpiozero in python 3. Just trying to turn on the motor at half speed when calling the function. Issue is that nothing happens when ...
0
votes
1answer
31 views

Setting a mode to a pin requires root permissions

I’m trying to change pin mode on RPI (with Raspbian) – it works when I invoke those commands sudo chown root.gpio /dev/gpiomem sudo chmod g+rw /dev/gpiomem but after every restart I have to execute ...
0
votes
1answer
43 views

GPIO ports not working

Friends, I try to switch 4 GPIO pins (GPIO.BCM) from '0' to '1', and only the first 2 out of 4 (GPIO18 and GPIO23)do switch, from 0 to 1. I have used different GPIO pins for GPIO24 and GPIO25, ...
0
votes
1answer
18 views

Would lifting the pads off of the display and camera connector kill a RP?

Tried to remove some I/O that i dont need from my RP3 A+ to fit in a mobile project. Ive done this before on my RP3 B with great success. But I wasnt to gentle when removing the display and camera ...
1
vote
1answer
82 views

How do I run a python script as root [duplicate]

I'm try running a Python script that uses the GPIO pins but I get an error telling me that it doesn't have access to dev/mem and I should try running as root. I don't know how to run a Python script ...
2
votes
1answer
36 views

Neopixel lights do not change color

I recently bought a 1 meter WS2812B strip. I installed the Adafruit Neopixel Circuit python library with the following commands: sudo pip3 install --upgrade setuptools pip3 install RPI.GPIO pip3 ...
0
votes
1answer
16 views

Lipo power: Powerboost versus Micro-Lipo charger

I'm a hardware newbie, wanting to power my RPi Zero via a Lipo battery, and also have the battery charge without removing it. There are many posts about this, but my question is more about two power ...
1
vote
1answer
15 views

which GPIO pins can I use on top of the PhatDAC?

On Pi zero, when I connect switches to GPIO23 and 24 the PhatDac stopped working. PhatDAC is connected to Pi zero by tall header so I connect my switches thru pins. The switches work correctly with ...
0
votes
1answer
36 views

Using a molex powered usb panel to power multiple pi's

I have been looking into multiple ways to power numerous rapsberry pi's from one power source. I am not an electrical engineer and as such some methods I have researched online are less than ideal, ...
0
votes
1answer
26 views

Making a music device from RPi

I am making a musical instrument from a raspberry pi out of cardboard. It would be like a piano with an octave of notes (13 including sharps). How would I get the raspberry pi to detect when a circuit ...
1
vote
0answers
19 views

Raspberry pi 3 - GPIO output stays at 1.8V

I've set-up a GPIO port to output. With an external multi-meter, I've noticed that the potential stays at 1.8V in respect to the ground. I've checked in respect with the same ground, and the 3V3 and ...
2
votes
1answer
27 views

Raspberry GPIO button sysfs

I am trying to connect a button to my raspberry pi 3 (model B). I want to do it via the sysfs approach. Here is a picture or my small circuit: It cannot be simpler: the black wire is connected to a ...
0
votes
1answer
38 views

GPIO causes random input on room light switch / EMP?

I am building a simple application with a switch on the rasperry pi 3 b+. I have connected GPIO pin 18/32 through a 56k resistor to 3.3v (tried pin 1 and 17) to have it pulled up. The switch closes ...
0
votes
4answers
447 views

How can I make my LED flashing while executing the rest of the code?

How can I make my LED flashing while executing the rest of the code? I want to make some LEDs flash while my program executes the rest of the code.
0
votes
0answers
6 views

Putting a SlushEngine X LT on a Waveshare High-precision AD/DA board

I am trying to drive a stepper motor based on a voltage (eventually leading to a PID). To do this, I want to stack a SlushEngine X LT on a Waveshare High-precision AD/DA board on a RPi. However, they ...
0
votes
1answer
68 views

I did a short circuit between the 5v pins [duplicate]

I thought I could power a fan by connecting each of its rudimentary wires to pins 2 and 4 (5v pins) on the raspberry. Immediately, the screen the pi was connected to went blank, even though the pi was ...
0
votes
0answers
33 views

Pi4j Edge detection does not work (always detects both edges)

I am new to using Raspberry Pis GPIO and I am using pi4j to control it. I simply tried to make a Button work, that only triggers when releasing the button. Here is my code if (Gpio....
1
vote
1answer
40 views

Can the GPIO pins be used to compromise a raspberry pi?

For example, would a touchscreen device that uses the below pins on a Raspberry Pi 3 be able to do something more than say, send touch and keyboard events? Anything hackish/nefarious? (edit: use case: ...
0
votes
2answers
132 views

FM transmitter antenna length

I'm a new raspi user, and I'm starting to build some projects with hardware. I would like to try this FM radio station for example, but I have a doubt about the antenna's length. This is important ...
0
votes
1answer
31 views

In raspberrypi 3v3 pin output is not providing power

i am working with raspberry pi suddenly my terminal got stuck and after i dis-connect my raspberrypi and again connect it ;but it not detect my raspberrypi sd card and i found that 3v3 pin is not ...
1
vote
0answers
42 views

Rpi3b+ to Rpi3b+ jtag/SWD connection and OpenOCD

I'd like to hook together two Raspberry pi 3b+ to use jtag/SWD with OpenOCD. I learned it can be done, but implementing it has proven challenging. I have two questions: How to connect the Rpi's. If I'...
0
votes
1answer
30 views

GPIO pin remains high

Upon running the following script my relay stays open when the GPIO pin is set to output. In all my attempts. there has not been any way for me to alter this behaviour. The code I've ran: import ...
1
vote
1answer
35 views

How to synchronize GPIO state between two Raspberry over Internet?

What is the simplest way to synchronize GPIO state (states are: 1 or 0) between two Raspberry devices connected via Internet ? What I need is immediately change GPIO state on Raspberry 1 if Raspberry ...
0
votes
3answers
59 views

Relay board failing when connected to RPi3 5V pins

I'm using my pi to power several relays. A total of ~20 relays (a 8-relay board and three 4-relay boards) I'm also running home-assistant Yesterday i noticed that when i try to power them all up, ...
1
vote
1answer
66 views

Heartbeat on GPIO via config.txt

I want to have an indicator that the Pi is running an wired a LED to GPIO 21 (with a resistor). When manually turning on the LED via /sys/class/gpio the LED turns on. Unfortunately, it does not give ...
1
vote
2answers
376 views

MCP3008 analogue digital converter… how can I use it for the complete opposite of what it was made for?

I have set up an mcp3008 chip and a slide pot on my pi because I wanted a nice old fashioned volume control, and all of that seems to working fine and I am quite happy with it. Now I have 7 ...
0
votes
1answer
46 views

3 PWM pins for RGB LED

I got an RGB LED, one mass and one for blue, red, green. So I got a list there are only two PWM compatible pins listed. Pin 32(GPIO 12) and pin 33(GPIO 13). But for my RBG LED I need three pins with ...
-1
votes
1answer
77 views

Connect button to GPIO without breadboard?

Is there a way to connect a button to a Raspberry Pi 3B+ without a breadboard? If so, how? Could you give a diagram and explain? I am only a beginner so please make it easy to understand. Also I would ...
1
vote
1answer
49 views

same GPIO input signal on multiple raspberri's from one source

Im having 7 raspberri pi's 3 connected to 7 screens, running an python 2.7 app to download different images from google drive, every raspberry has different images. Geeqie is displaying those images ...
2
votes
3answers
82 views

gpiozero Button.when_pressed

I'm learning python and gpio using the examples here: https://gpiozero.readthedocs.io/en/stable/recipes.html I wanted to extend the code to more than one button and pass a parameter to a function (...
2
votes
1answer
270 views

Green LED on RPI 3B+ GPIO

I have seen a few examples of wiring a red LED directly from the RPI GPIO pins, however, I need to wire a GREEN LED and am having trouble calculating the resistor needed. I believe that a green LED ...