Podcast #128: We chat with Kent C Dodds about why he loves React and discuss what life was like in the dark days before Git. Listen now.

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.

501 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
5
votes
0answers
133 views

Raspberry as I2C Slave, how to slow down transfer rate?

I have had minor success using the PIGPIO library and interfacing the Pi as an I2C Slave (Using GPIO Pins 18 and 19 as SDA and SCL) with a Campbell CR1000X Datalogger I am encountering a problem ...
5
votes
0answers
722 views

Can I control GPIO Pins when using Android on the Pi 3?

I want to install Android on my Raspberry Pi for implementing a GUI app, which is easy to create using Android Studio. But now I am confused about how to control the GPIO pins on the Pi 3 to turn on ...
5
votes
2answers
334 views

Pi4J kills USB bus?

Hello fellow Pi enthusiasts :) I am currently attempting to control a standard 16x2 character LCD display from the PI's GPIO pins from Java. I downloaded Pi4J and wrote a small program to initialize ...
4
votes
0answers
295 views

How fast can GPIO pins toggle on the Pi 4?

Benchmarking of the Pi 4 using the Python GPIO Zero library shows a significant increase in the frequency of toggling a GPIO pin on and off compared to previous models. This result is attributed to ...
4
votes
1answer
2k views

GPIOZero button not working

I've been getting into GPIO recently with the GPIOZero library but when i first tried it today it completely failed. As my first foray into GPIO i set up a circuit to light up an LED with the push of ...
4
votes
5answers
1k views

GPIO to hifi amplifier's trigger input (remote power on). Protection? Circuit?

I use my raspberry 1 B+ with a DAC board (like hifiberry) and volumio/moode audio distribution. The board is working as a pre-amp and it's connected to my hifi amplifier RCAs input, sending analog ...
3
votes
0answers
73 views

Raspberry Pi button bug, what is happening?

I am new user of raspberry pi. I have two buttons, and some code to run, yet the led will not react to the buttons. It's probably a easy fix, but keep in mind, I am new to robotic and have only ...
3
votes
1answer
72 views

How to use Rpi GPIO to PWM adjust IR LEDs brightness?

I'm using this circuit for my project, which I referred from https://www.sparkfun.com/news/1396. I don't really understand how current works in GPIO pins, so the question is: instead of connecting ...
3
votes
1answer
155 views

Controlling a High Power 13V DC Motor with in-built Hall Effect sensor

I am a beginner with electronics and RPi. I have a Brushed DC Motor that runs at a constant 13V and draws about 4-5 A while running and about 18-20 A at stall. It also has a single Hall effect sensor ...
3
votes
0answers
112 views

Is it possible to virtually trigger a GPIO Input pin when nothing is actually connected to it?

I am trying to use incoming MIDI data on my Raspberry Pi 3's USB port to virtually trigger an input GPIO pin. The reason for this is as follows: I'm using the MIDI out port on a Behringer X-32 audio ...
3
votes
0answers
732 views

How to properly trigger multiple Raspberry Pi camera modules via GPIO?

I am working with three Raspberry Pi 3 B boards, which in turns have RPi camera modules V2 connected to each. I followed this very detailed post about triggering another Pi using GPIO pins and it ...
3
votes
1answer
2k views

How to use a GPIO pin after I put on a HAT?

I got a Speaker pHAT for my Pi Zero. According to the pinout, it only uses 5 GPIO pins, so plenty of room to add something else. The problem is, I'm not sure what's the best way to physically attach ...
3
votes
2answers
488 views

Is it possible to use more than one audio card on GPIO?

I want to use more than one HiFiBerry Dac+ on a single Raspberry PI. It's possbile? to connect more than one audio card?
3
votes
0answers
823 views

Not getting a response from a connected PIR sensor

I have a PIR sensor which I'm using connected to a Raspberry Pi 3 Model B as part of a Magic Mirror project. I'm running this module for the sensor. I've had the Motion Sensor working before, but now ...
3
votes
0answers
1k views

Which GPIO pins are used for I2S audio I/O

I am trying to set up the ADAU1781 as an audio codec for the Pi 3 B, communicating with the Pi via the GPIO pins. Which pins would I use for I2S audio input and output? I have been doing a lot of ...
3
votes
0answers
543 views

DS18B20 temperature sensor not found in folder

I've bought the camjam edukit 2 for my pi which includes the DS18B20 temperature sensor. However, after going over the instructions 20 times, rebuilding it a same amount and searching online, I still ...
3
votes
0answers
3k views

GPIO23 (BCM) is busy when using /sys/class/gpio but I am able to use wiringPi pin 4 (GPIO23)

I'm having a bit of trouble accessing GPIO23 using /sys/class/gpio/. To clarify a few terms (according to the table on this page): Header pin 16 is BCM GPIO 23, which is wiringPi pin 4. Header pin 11 ...
2
votes
0answers
21 views

PWM on pump not working as expected

I am attempting to run a PWM on a pump using rpi.GPIO using the following code: def run_PWM_on_pump(): gpio.setmode(gpio.BOARD) gpio.setup(8, gpio.OUT) p = gpio.PWM(8, 0.5) #also works at ...
2
votes
0answers
67 views

Pulse Position Modulation on Raspberry Pi Zero

I want to WRITE a Pulse Position Modulation (PPM) to an arduino from a raspberrypi. Is the board capable to do this and if so, from which port/pin? A pulse position modulation is a signal that ...
2
votes
1answer
85 views

What is going on with my GPIO pins?

So I wanted to try out my Raspberry 3B+ once again, but I have been sitting here for hours without even being able to turn on a LED. My code: import RPi.GPIO as GPIO import time GPIO.setmode(GPIO....
2
votes
0answers
72 views

Hardware controlled RTS on a Pi4 not working accurately

We need to use RS485 to talk to one of our custom tools. We need to use hardware controlled rts/cts. I've read so many articles about this but nobody ever says it works for them with fast timing and ...
2
votes
0answers
57 views

How to play a 16-bit WAV in raspberry pi 3 b+ with PWM?

I have a 16-bit WAV file, the header of the file as below: WAV header Information: RIFF : RIFF Chunk Size : 5719002 Format : WAVE Sub-Chunk 1 Information: Sub-Chunk 1 ID : ...
2
votes
0answers
30 views

Safe cut power supply from raspberry

I want to cut safe the power supply from the raspberry with a relay connected to the gpio. I know how to connect to relay to the board but.. When the relay turn off the power line will be cut off to ...
2
votes
0answers
28 views

Method for piling three peripherals on one pi

I'm working on my first pi project, which is intended to use the following three peripherals: GPS -- using UART (pinout) eInk -- using SPI (pinout) battery power supply -- using I2C (pintout on p. 15 ...
2
votes
0answers
62 views

SPI NOR Flash: Unstable reads

So I hooked up an Winbond 25Q256JVEQ to my Raspi3 via SPI (spi0.0) and want to read its content. I use the jedec-nor-spi dtoverlay so its available as MTD. However when I want to read the chips ...
2
votes
1answer
197 views

Pigpio not calling Callback for first rising or falling edge

I have some sample code (taken out of my larger program) that regularly (but not always) missing the first rising edge: #!/usr/bin/python import pigpio, time def callback(g, l, t): print("Callback ...
2
votes
0answers
60 views

Issues with Sequent Microsystems 8 relay board

I'm using the Raspberry Pi 3 Model B V1.2, and the Sequent Microsystems 8 Relay Board 2.0. The manual tells you to install this software from github. I installed this and was able to control the ...
2
votes
1answer
215 views

Pi Camera streaming via gpio

is there a way to transfer the video stream from one raspberry pi to another via gpio pins? One pi is In a closed container with the camera and the other pi drives the user interface. Networking is ...
2
votes
0answers
100 views

GPIO reading high (because its an input) at boot

I am making a thermostat and one of the issues I have with the pi is that on restart it sets all its pins to input which will provide power to devices, in this case a relay being used to switch on and ...
2
votes
1answer
65 views

fork() Process Issue on Channel Switching via Rotary Encoder

I have KY040 rotary switcher(encoder) as shown below picture. It is the scenario that there are 5 radio stations(simple html url) in urls.txt which are read into stations list in radyoCS.py, at every ...
2
votes
2answers
1k views

GPIO event handler triggers off rising and falling edges

I'm trying to set up a tachometer. I used a comparator IC to get a real clean signal on pin 21 but I'm getting iterrupts on the rising AND falling edges. #!/usr/bin/python3 import time import ...
2
votes
1answer
421 views

How to connect two cameras to one Raspberry Pi?

I want to use two pi cameras (V2) at the same time for a project. There are a few ideas that came into my mind Creating a camera MUX: 14 pins of the CSI port are connected to a bread board, and two ...
2
votes
1answer
716 views

UART pins not reading sensor output RPI3

This is my first pi project so im a bit new at this. Im trying to connect a senseair K-30 CO2 sensor to the pi via the UART gpio pins. This is the sensor I am using: https://www.co2meter.com/products/...
2
votes
1answer
259 views

Button isn't triggering in python script

Software guy here, first time doing hardware. Here is my breadboard setup (yellow is GPIO-8, green is ground): Here is my Python: import RPi.GPIO as GPIO from time import sleep GPIO.setmode(GPIO....
2
votes
0answers
141 views

Simulating electrical inputs to an Arduino and Raspberry Pi

I have an Arduino-Raspberry Pi system, with many sensors attached, that I want to try to virtually test (without either physical device) on Travis CI. Are there any extant tools capable of simulating ...
2
votes
0answers
382 views

Change pin for Wake-from-hold

There is this not-so-well-documented feature about shortening Pin 5 (GPIO3) to GND for booting a halted PI (see e.g. here) which is called wake-from-hold. As it is possible to change almost ...
2
votes
1answer
177 views

GPIO is not working

We recently bought two Raspberry Pi 3 B from Cana Kit. We observed that some of the GPIO pins are not functioning properly. More specific details below. We tried to change the state of GPIO pin 7 to ...
2
votes
0answers
374 views

Can I control 5050 RGB Strips with the Raspberry pi?

I have purchased 5 meters of a 5050 RGB Strip yesterday. I bought it for my PC case, but of course I don't want to use 5 meters in my case. I want to do some smart lighting in my room and a bias ...
2
votes
0answers
274 views

GPIO Edge detect setup on 3 pins, when one changes all callbacks are called

I have a PI setup with 3 sensors (reed switches) and 2 "outputs" to a relay. They are on pins (8, 10, 12) I have pin 3 setup to drive the first relay and pin 5 setup to drive the second relay. I ...
2
votes
0answers
173 views

Driving a HC-SR04 requires a 10 microsecond pulse, Java does 14. Any success stories?

I'm working on Android Things on an rpi3 dev kit, with the IMHO excellent Picon Zero hat. I'm trying to trigger and read the reply from a HC-SR04, which requires a ~10 μS trigger pulse, then ...
2
votes
1answer
111 views

Vibration-induced power loss problem

I am a pilot using a Pi 3 as an ADS-B receiver for a gyroplane. It works really well provided I don't try to have the Pi mounted to the aircraft anywhere. As soon as I do, the vibration seems to cause ...
2
votes
0answers
149 views

Best Way To Power Raspberry Pi Zero and External 4.5 - 36v Circuit

I am creating a drone where I have a Raspberry Pi Zero, and a Motozero. I need to supply the Motozero with power from 4.5 to 36 volts as well as the Raspberry Pi Zero. What is the best way to do ...
2
votes
0answers
217 views

multiple DS18S20 temp sensors without using 1wire

Can anyone tell me if it is possible to connect the multiple DS18S20 sensors to different GPIO ports and pull the temperature on different ports, as opposed to a single wire option where I can only ...
2
votes
1answer
5k views

How to set a GPIO pin to default HIGH before setting it to output?

I have a raspberry pi connected to a Sainsmart 4-channel relay, where each relay is activated by a LOW signal. When I set a GPIO pin to output, it defaults to LOW, which of course activates the ...
2
votes
0answers
651 views

Unable to change GPIO voltage

I have a Raspberry Pi 3 Model B, running Raspbian. I am using the GPIO pins for a project using PWM to controller a piezoelectric speaker. Everything seemed to be working fine, until earlier today ...
2
votes
0answers
409 views

GPIO problem. RPIO terminal issue

If I run gpio readall, everything works fine and I see all GPIOs. Terminal: rpio -i 7 Result: root@raspberrypi:/home/pi# rpio -i 7 Traceback (most recent call last): File "/usr/local/bin/rpio", ...
2
votes
0answers
1k views

Controlling 3 axis brushless gimbal motors

I am new to using the Raspberry Pi 3 and trying to control brushless gimbal motors with encoders to "look around" Using I2C, I have gotten them to read its orientation from BaseCam's Simple BGC GUI. (...
2
votes
0answers
2k views

pilight send raw code [433MHz]

I have set up a 433Mhz receiver and sender at my raspberry pi using pilight in order to remote control a power socket (Flamingo FA500S). Unfortunately, this one is self-learning and therefore not ...
2
votes
0answers
365 views

Can't Set/reset GPIO pins using nodejs, why?

I'm using Raspberry Pi model B Type 2 with ARM6 and Type 3 with ARM7. I have tested this code several times and after a week, when I tried, it is not working. Below is my node js program: var ...
2
votes
0answers
521 views

LED strip PWM on GPIO18 + mono audio output

On the RPi 3 I would like to control a WS2811 LED strip with PWM (GPIO18) by keeping the audio working. It looks like for the RPi Zero (I'm unsure for RPI 3 though) left and right channels of the ...