Stack Exchange Network

Stack Exchange network consists of 175 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.

1
vote
1answer
40 views

Read/Write GPIO

I wrote an assembly code for my Raspberry Pi to read an I/O with a button and switch an LED according to the state of the button. It seems that the I/O with the LED is toggling all the time and I don´...
0
votes
0answers
34 views

piscope SPI pin activity even though the SPI device is not connected

my final goal is to use python (spidev) to communicate with a BMS chip. Until now I was quite unsuccessful, thats why I wanted to use piscope to track the activity of the SPI pins. The device is not ...
0
votes
0answers
14 views

how do I assign pins on GPIO expander mcp23017 to a 2nd i2c bus

So I've got a device on my pi that takes up almost all of the GPIO pins on the pi, but the device nicely has an MCP23017 on board, giving me an extra GPIO pin, number 496 - 503 What I want to do is ...
0
votes
0answers
25 views

DS18B20 & Pi 3+

I'm not getting a w1_slave, and all I'm getting is 00-xx0000 when the DS18B20 isn't burning my fingertip. I went for green for ground, which is on the top right plug from this perspective. I spliced ...
0
votes
1answer
35 views

enable software i2c on raspberry pi gpio

I am trying to interface more than one sensor with Raspberry Pi Zero W, which communicate using i2c interface. So far I am able to connect sensor to dedicated i2c and read the data. Want to know ...
0
votes
0answers
10 views

ReSpeaker 2Mic Expansion Board Not Showing Up Under “aplay -l”

I am very new to the raspberry pi. I am setting up the Respeaker 2Mic Expansion board on my Raspberry Pi 3 B+. I have downloaded the files from GitHub through the terminal, have physically connected ...
1
vote
0answers
38 views

Raspberry Pi 3 B+ LED Light Blink not working

I am trying to get my LED to blink once, but it is not working. I connected the brown wire to pin 6 (Ground), and the red to pin 7 (GPIO 4). I watched a tutorial on connecting the circuit but it is ...
1
vote
0answers
35 views

Is it possible to plug in and out sensors, LED-s etc. on the breadboard while the Raspberry is running?

What I would like to do, is to let the Raspberry Pi run and while it is running, connect and disconnect eg. sensors whenever I please to/from the breadboard WITHOUT turning off/disconnecting the Pi ...
1
vote
3answers
75 views

Ditch resistors with LED's on gpio

So on all sites that have tutorials on attaching a led to gpio, they use a resistor. Could I wire a led to a input/output pin and use an internal pull-up or pull-down resistor?
0
votes
0answers
32 views

GPIO number vs Pin number. Which to use?

I am writing a code for an ultrasonic distance sensor. The code worked fine when i used the gpio numbering system for the wires connecting to the gpios and sensor. As soon as i connected the sensor to ...
0
votes
0answers
84 views

MAX7219 7-segment via SPI not working

I am following these instructions to get a simple 7-segment display working: https://github.com/rm-hull/luma.led_matrix My problem is that as soon as one of the 3 SPI Pins are connected the digits ...
0
votes
1answer
35 views

Why is WiringiPi unable to find hardware revision?

I installed Ubuntu 18.04 on a Raspberry Pi 3 B+ and WiringPi following the instructions presented here. The problem is that when calling the GPIO utility, I get the following error: It seems that the ...
1
vote
1answer
99 views

Runtime Warning: This channel is already in use

I am writing a code for Ultrasonic distance sensor. I have wired all the things perfectly and written the code for it but somehow it gives a runtime error of the channel already being in use. Below is ...
2
votes
2answers
40 views

How can I implement event detection?

I want to implement a function that does not abort my program but wait until I press the button on channel 11. And start the program again. #!/usr/bin/env python import RPi.GPIO as GPIO import time ...
1
vote
1answer
20 views

Need RPi3b voice control

I'm failing to find a simple way to control my RPi via microphone. I've fount some projects but they all require things such as Google AIY voice kit. Is there any simple way for me to control GPIO ...
0
votes
0answers
28 views

GPIO Open drain and open source setting while using the pin as input

I found this document. It says: Open Drain and Open Source Sometimes shared signals need to use "open drain" (where only the low signal level is actually driven), or "open source" (where ...
0
votes
0answers
42 views

How do I find which pins my TFT display is using?

I have a TFT Touch Screen Display from Tontec that I'm using for a project. According to the product description the display only uses 8 pins. However, the connector cable takes up 26 pins worth of ...
1
vote
1answer
27 views

GPIO PWM reset to high

I'm using the pi 3a+ pwm to send sync informations to my music gear. When I stop the pwm, I don't use the pwm.stop(), but rather set the duty cycle to 0. This is because I run the pww from a different ...
0
votes
1answer
53 views

two PIRs problem

i am building a security system which consists of two PIRs (GPIO 17 & 18) relay GPIO 24 , video will be emailed and will receive a text message when motion is detected . the camera can see both ...
0
votes
0answers
51 views

Multiple raspberry pi's 3 synchronized image navigation

We have 7 raspberry pi's 3, each connected to the internet and an display. On each screen / raspberry pi is geeqie (image viewer_ running with an image slideshow. The goal is to have all raspberry pi'...
1
vote
1answer
41 views

raspberry pi compute module replication

I have a raspberry pi compute module with me and I have installed a number of programs into it. I have to reinstall the same programs on a number of such modules. Is there any way that I can create ...
0
votes
4answers
58 views

what are the low level steps to control the internal pull-up resistors?

I use Raspberry's GPIO from Bash because it only require 6 lines for what I need: a button and a LED. I can read an input, and write an output. Very simple. But I can not find how to active/...
0
votes
2answers
105 views

What tool should I use to cut off the GPIO pins?

I would like the make the Pi Zero W smaller and cut off the part of the PCB that holds the GPIO pins. What tool should I use to do so? Is a Dremel/rotary tool too destructive? I'm thinking an XActo ...
-1
votes
1answer
39 views

Adafruit PAM8302A -> Raspberry Pi 3

I want to connect Adafruit PAM8302A amplifier to the Raspberry Pi 3 Model B+. What I need? How to do this?
0
votes
1answer
59 views

counter with tkinter

Good evening: I speak from Colombia, the problem is that I am doing a project in which I must have an object counter that passes a sensor. Well, I hope I can explain myself: code1 works perfectly, ...
1
vote
1answer
25 views

GPiO setup works from shell, but not from script or C code

May be not the right place, but ran again that on the RPi platform. I want to have - say - an output on the RPi. I'm user pi. I'm in gpio group. I say 'echo 26 > /sys/class/gpio/export'. Works. I ...
0
votes
0answers
13 views

gpiozero ImportError in virtual environment

I've been trying to use the gpiozero library lately with one of my opencv projects. Installed gpiozero using pip. Sample code works fine, no issues. The problem is, my opencv installation is in a ...
0
votes
0answers
23 views

How to connect maxbotix ultrasonic range sensor through GPIO

I got a Raspberry Pi 3 B+ over Christmas which came with a breadboard (i.e. I'm new to all of this). I recently bought a Maxbotix HRLV-EZ4 ultrasonic sensor. I am using the Canakit GPIO Breakout ...
0
votes
1answer
27 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
21 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 ...
2
votes
2answers
41 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 "...
0
votes
2answers
43 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 ...
2
votes
3answers
67 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
20 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
1answer
27 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
81 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
21 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
67 views

GPIO solution to power Pi [closed]

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
33 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
65 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
vote
1answer
32 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
65 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
37 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, ...
0
votes
0answers
22 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
34 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
48 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
21 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
135 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
59 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
53 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 ...