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.

1
vote
0answers
18 views

Read pin (power led) from port expander on ic2-0 at config.txt

In config.txt you can have conditional booting based on the GPIO pin level, e.g. the gpio4=1 line. Is it also possible to access the pin on the GPIO port extender at i2c-0, or is this something ...
0
votes
1answer
143 views

LED pwm fading is flickering

This is how I'm fading some LEDs using a logarithmic function. But with that the LEDs are flickering somehow. I don't understand why... import time import math import RPi.GPIO as GPIO GPIO.setmode(...
1
vote
0answers
32 views

3.5in TFT screen hat and Raspberry Pi 3+b

I'm trying to understand something about the MPI3508 screen I purchased (https://www.amazon.ca/dp/B07DQKQG6X). I tried powering it via usb and connected a PC in its HDMI input and got it working (the ...
1
vote
1answer
161 views

GPIO Pin connection with Game hat

I got a Raspberry Pi 1 B+, 2014 v1.2 board, and I was trying to attach it to Waveshare's Game hat The main issue which I have is, the raspberry board has 4 dead GPIO pins (tested using pigpio), 10,11,...
0
votes
1answer
42 views

How to get 3.5PiTFT and 2.8PiTFT to work on Raspbian Jessie 8?

Whenever I download Raspbian Jessie 8 and install it, it automatically works with 7inch display and a full up monitor through ribbon cable and HDMI cable respectively. However, when I plug in the 3....
0
votes
1answer
38 views

Why Raspbian jessie version 8 won't allow communication through GPIO serial pins?

I am running Raspbian Jessie 8 on Raspberry 3 and I followed the answer to the question Why my program won't communicate through ttyAMA0 on Raspbian(jessie)? But I still can't get my program to ...
0
votes
1answer
294 views

How do you control a 12V PC fan from a Raspberry Pi?

I just got an old PC fan from a computer that was taken apart at my school and I want to try and figure out how to make it turn on using the GPIO ports on a Raspberry Pi 3 Model B. It is a DC 12V fan ...
1
vote
2answers
95 views

Multithreading/infinite loops affecting sensor values

I run a Python script on my RPi that manages all the sensors on the board and communicates with another machine using TCP sockets. The project gained in complexity and my script now has 5 threads ...
3
votes
1answer
131 views

How long to wait after shutdown to cut power

I am working a problem that seems to be fairly popular with the Raspberry Pi community. In essence, I am designing a circuit that will utilize a DS3231, a 555 timer, and a load switch to cut power ...
1
vote
1answer
30 views

Powering One Raspberry Pi Zero from Another

I'm trying to create a portable solution where two Pi Zeros are each running a camera module. I was thinking that I would use a single phone power bank. Is it advisable/possible to take 5 volts from ...
0
votes
1answer
34 views

drive LED and switch on same GPIO?

It seems like I should be able to ~abuse~ use the input pullups on the Pi to drive an LED, and that means the input is open so I can also sense a switch for occasional use. I can't talk myself into or ...
0
votes
0answers
123 views

Connect RunCam to raspberry pi

Just recently I got RunCam micro swift 3 (https://www.runcam.com/download/MicroSwift3-Manual.pdf) for computer vision project. However, I am struggling to understand how can I connect it to Raspberry ...
0
votes
0answers
118 views

How to use DS3231 RTC module on Android Things?

I use Raspberry pi 3 model B on Android Things. my situation https://stackoverflow.com/questions/51887326/when-boot-device-if-can-not-connect-to-the-network-how-to-set-current-time-on so, I bought ...
0
votes
0answers
40 views

Clearing edge detect registers (GPEDS0/GPEDS1) crashes Raspbian Stretch

I've been working on a PHP library for Raspberry Pi for a few years now, and since (not sure specifically which) a version of Raspbian Stretch, the Pi becomes completely unresponsive when clearing the ...
1
vote
1answer
65 views

Is there a way to use interrupt-driven GPIO input through the sysfs interface without a race condition?

I want to use the GPIO pins to wait for a button-press without using a CPU spin loop. My preferred way of using the GPIO pins is via the sysfs interface at /sys/class/gpio, but it seems to me that ...
0
votes
1answer
35 views

Multiple TTL sensors on serial RX GPIO 10

Is it possible to read more than one TTL sensor on serial RX GPIO 10? I know you can add multiple serial sensors on /dev/ttyUSBx Does the same apply to /dev/ttyAMAx ?
1
vote
0answers
223 views

RPi.GPIO - Properly Wiring and Setting Up Pins for Button Inputs

Edit: Breadboard, schematic, and code updated. I accidentally fried my Pi by shorting it out through the GPIO pins, so I figured it would be a good idea to ask for some help before trying my current ...
0
votes
1answer
47 views

How to cut the power on power pin 1 programmatically?

Is there a way to cut the power on power pin 1 on Raspberry Pi 3, using a command or force this on reboot?
0
votes
1answer
132 views

GPIO event handlers and inter-thread communication

I have a Python script using callback functions to react to GPIO events, as described here: https://sourceforge.net/p/raspberry-gpio-python/wiki/Inputs/ The description states that Python runs the ...
1
vote
1answer
129 views

Control RaspberryPI 3 via Serial/GPIO

So I'm working on a bit of a little project with a PI for work. I'm making the PI into a little portable NAS where i can connect it to a network and on boot, it will email me its IP Address (if it ...
1
vote
0answers
47 views

what is causing my error 3 for sending SMS from GSM module

I have a Raspberry Pi 3 running Raspbian Stretch I've connected it to an Elemnt Engineerz Guild SIM900a GSM modem via the GPIO. I can't get it to send an SMS I connected gnd and 5v to gnd and 5v ...
0
votes
1answer
52 views

Why my gpio input changes the internal resistance when running the python code? [closed]

I have a raspberry pi receiving inputs with a 300k resistance connected between the voltage input (12V) and the gpio. When my python code is not running the voltage at the gpio is 1.7v, but when I ...
1
vote
0answers
44 views

Safe GPIO configuration for powered-down RPi?

I have a RPi3 driving a robot and I've built a dual H-bridge circuit to run it. I have seperate fuses for the RPi and the driving circuit and I'm glad I do! Trouble is, when the RPi is off, the H-...
0
votes
1answer
31 views

Read from special pins?

I'd like to use some special pins like 5 (scl) and 12 (pcm_clk)as regular pins to read from them. I made a circuit as shown here: and setup all connected pins like this: GPIO.setup(pin, GPIO.IN, ...
-2
votes
1answer
42 views

Sending RPi data over network [duplicate]

I have 3 Pi's on a network that need to scan one GPIO on each, and if that GPIO changes, broadcast to the other two so they can trigger another GPIO as an output to trip a local relay. HELP??
0
votes
1answer
84 views

Change GPIO pins for official Raspberry Pi 7" touchscreen

I need to use different GPIO pins with the Raspberry Pi official 7" touchscreen. I'm already using pins 3, 4, 5 and 6 with a hat, and it would be a pain to change them. I've looked through several ...
1
vote
0answers
65 views

Problem counting pulses

I want to count pulses and find the frequency. Here is the picture of pulses from the oscilloscope: Obviously, frequency is around 1/2.3 ms = 420 Hz. First I tried this program: import RPi.GPIO as ...
0
votes
1answer
128 views

How to restart the GPIO after shutdown() called

After I call the following Java code: gpio.shutdown() The GPIO turns off. How can I restart it? I need to restart it because of this problem. In the problem the light does not turn off with led.low(...
0
votes
1answer
50 views

Trimming down Stackable Header

As mentioned in my previous post, I'm intending to solder some HATs directly to the Pi. However, I find the pins on the default header too short, so I need to replace them with longer ones. I have ...
0
votes
1answer
48 views

Unable to show string on 2x16 LCD display

connected 2x16 LCD display to raspberry pi 3.I followed above tutorial https://www.rototron.info/lcd-display-tutorial-for-raspberry-pi/ I made connections as shown in the tutorial.Install adafruit ...
2
votes
1answer
111 views

I2C device address changing of MCP23017 I/O extender

When I connect all A0, A1 and A2 to ground, then my device address of the MCP23017 is 0x20 (constant). But when I disconnect the A0 from ground, then the device address is switching between 20 and ...
1
vote
1answer
158 views

luma.core.error.DeviceNotFoundError: SPI device not found

I'm trying to setting up my new Dot Matrix MCU LED Display Module 8x32 with MAX7219 on my Raspberry Pi 3. I followed all the steps here https://max7219.readthedocs.io/en/0.2.3/ and of course using ...
1
vote
0answers
59 views

DRV2605 + TCA9548A I2C Multiplexer gets sporadic “Remote I/O Error”

The setup is a raspberryPi driving two AdaFruit DRV2605s through an AdaFruit TCA i2c multiplexer and it all works correctly the bulk of the time. I adapted the sample Arduino code and by and large we'...
1
vote
2answers
170 views

Risk of damage soldering directly to GPIO

I am thinking of removing the headers on some HATS and soldering them directly to the Pi. Is there a risk of damaging the pi if I overheat the pins or board? What's the best way to remove the headers ...
1
vote
1answer
130 views

Imprecise result after bitwise operation on GPIO registers

I am using a Raspberry Pi(Model 1 B+) and an oscilloscope in order to program SPI with C. I am doing this by using direct access to the GPIO register. Like this: https://elinux.org/...
0
votes
2answers
221 views

Multiple push buttons - Raspberry [closed]

What is the best way to implement an algorithm to read 6 push buttons, debounce them, and do something according to the button pressed? Interrupts or polling mode? I would appreciate any resource you ...
0
votes
2answers
196 views

Controlling multiple raspberry pi's

Preview I'm working on a ROV project and there are 3 Raspberry Pi, cameras sensors and motor drivers which are controlling from Raspi. I need to control them via my laptop and I don't have internet ...
1
vote
1answer
44 views

Monitor GPIO activity to debug possibly broken script

I recently picked up a b3+ and a nespi+ case. The case comes with a power and reset button and provides a script for the safe shutdown and for the most part has been driving me insane. I've fixed the ...
1
vote
1answer
34 views

Controlling electromagnets in clock display

I have an electromechanical 7-segment clock display with each segment controlled by an electromagnet. A segment is 'on' depending on the polarity of the last pulse to its electromagnet. Can anyone ...
2
votes
1answer
45 views

Execution interruption while holding a kernel spin lock

I want to toggle an GPIO pin with a certain accuracy. (i.e. latency about 1 us). I have a Raspberry Pi 3 model. Therefore I wrote a simple test kernel module. The toggling loop does basically this: ...
1
vote
1answer
111 views

Use Raspberry Pi GPIO to sync multiple video players. Possible?

Is it possible to use GPIO to sync multiple RasPi video players? As shown in the picture below, I need to sync 16 RasPi video players. The master RasPi will trigger the video players (start, stop, ...
0
votes
1answer
118 views

Do I need a resistor for a 3v3 led? [duplicate]

Begginer question, if the output voltage of the raspberry pi is 3.3v and my led voltage is 3.3v, do I still need a resistor? As far as I understand, if the voltage is the same you don't need to add a ...
1
vote
1answer
114 views

Why does my raspberry pi zero w crashes when controlling a DC motor with an L9232D and a 9g Servo motor?

I use this simple circuit to control a DC motor with an L293D, and a 9g servo motor with a Raspberry PI Zero W: I use the simple following code to test the circuit: from time import sleep import RPi....
0
votes
0answers
65 views

Rpi not reading data from Sense HAT due to missing frame buffer

I'm having trouble getting my RPi 3 to listen to a Sense HAT. The Sense Hat is getting power and the RPI is aware of the Hat. pi@BBLPi1:~ $ ls /dev/i2c* /dev/i2c-1 pi@BBLPi1:~ $ i2cdetect -y 1 ...
1
vote
1answer
44 views

Multiple Raspberry Pi zeros (no wifi) + touchscreen. Daisy-chained communication?

I'm trying to devise a solution that will connect multiple Raspberry Pi zeros together for communication between them. I'm using a touchscreen on each of them, so GPIO pins 1-24 are taken. Also, I'm ...
1
vote
2answers
718 views

RPi 3 B+ won't start after accidentally connected 3.3v gpio pin to 5v gpio pin [duplicate]

I guess everything is in the title. I wasn't trying to connect any pins. It sounds stupid but I was holding my keys and was just trying to put the usb power supply on the Pi and accidentally connected ...
0
votes
1answer
382 views

Change I2C Pins on Raspberry Pi

On a RPi 3, default SDA-I2C and SCL-I2C are assigned to pins 3 and 5 (same as GPIO02 and GPIO03). Is possible to change to another pins? How can I do this?
0
votes
3answers
53 views

Crontab Unresponsive

I am trying to get my Raspberry Pi B+ to run a shell script everyday at the same time, and I am trying to use Crontab to do it. I run sudo crontab -e to access my Crontab programs, and added the entry ...
1
vote
1answer
43 views

GPIO Pins Stay Active

On my Raspberry Pi B+ I have a standard program to blink a LED. I run it using the terminal command python blinky.py, and when I do, the LED lights up, but does not blink, as it should. I then cancel ...
1
vote
1answer
28 views

Strange signals on GPIO 14 & GPIO 4 when ribbon cable is attached to GPIO

I'm using RP3B. I'm using piscope, as I don't have an oscilloscope available. After I boot my RP3B with nothing attached to the GPIO port, if I start pigpiod and piscope, I see all my GPIO with a ...