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.

474 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
5
votes
0answers
112 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
2answers
316 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 ...
5
votes
1answer
3k views

Reading HC-SR04 echo with wiringPiISR()

The following code works with the busy wait, but if I replace the while loop with a call to wiringPiISR() it always returns 0 for the distance. I also tried calling wiringPiISR() before raising the ...
4
votes
1answer
1k 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 ...
4
votes
5answers
4k views

DS18B20 w1-gpio Device Tree gpiopin NOT = 4

I have a HAT which blocks GPIO4 so I cannot use the default pin for the temperature sensor, but I just cannot get it to work on another pin! I just get lots of 00- instead of 28- in /sys/bus/w1/...
3
votes
1answer
84 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
97 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
2answers
2k views

Adding microphone support to the RPi 3B

I own a Raspberry Pi 3B and want to extend the sound capabilities. So what I need is sound output for speakers and headphones via a 3.5mm phone jack. In addition to that, I want to add an internal mic ...
3
votes
0answers
633 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
0answers
654 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 ...
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
415 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
780 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
531 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
1answer
101 views

Pi can't find 5th DS18B20

I am new in raspberry pi. In my research project, I would like to monitor ground temperature at 60 points. My team decided to set a monitoring system using raspberry pi. As a preliminary test, I ...
2
votes
0answers
55 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 ...
2
votes
0answers
28 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
24 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
24 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
0answers
38 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
0answers
69 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
59 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
1answer
110 views

Export GPIO pins from extender

I have PCF8574 GPIO extender connected to RPi. I use GPIO Sysfs. It is possible to write/read to/from extender pins, using command like this: gpio -x pcf8574:352:32 read 358 But i can not export ...
2
votes
1answer
392 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
619 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
237 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
126 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
1answer
153 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
246 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
160 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
98 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
147 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
214 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
4k 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
570 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
392 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
337 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
490 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 ...
2
votes
0answers
911 views

RPi Zero WiFi and USB OTG

I'm quite new to this kind of things, but I've jumped out with an idea of a device to give the ability to mount network shares as they where normal pendrives (like for TVs and other old devices). I ...
2
votes
1answer
637 views

Read RF from Remote trouble

I have myself a Raspberry pi and Arduino which I've equipped with a 433mhz transmitter (to the arduino) and a 433mhz receiver to the Pi. I can read the output fine from the transmitter in Pi console ...
2
votes
0answers
522 views

How to Set Up Driver Support for I2S Audio Codec

I am building a I2S audio codec using an ADAU1781 chip, which will communicate with the Pi via the GPIO pins. In my research I have found that there is an ASoC driver built into the Raspberry Pi ...
2
votes
1answer
67 views

Problems with my DIY floater

I've created a sort of sensor to detect whether the water level in my aquarium is too high or too low. Hardware part: See this schematic for how it works: So the red part floats on top of the ...
2
votes
1answer
410 views

Error when sending second start command to Cylon.js to blink LED

Using Node.js, express and cylon.js, I'm getting a post request and blinking an LED using a raspberry Pi. I receive the first post request fine, the code runs and the LED blinks. However on the second ...
2
votes
1answer
2k views

Kodi on a GPIO screen

I recently bought a 3.5 inch TFT touchscreen connected by GPIO to my raspberry. I finally managed to make it work with Raspbian. however, when I launch KODI, the image on the TFT freezes and KODI ...
2
votes
0answers
435 views

How to connect a servo feedback potentiometer?

I've taken apart an old RC car and have been trying to get my Raspberry Pi to run the car. At this point, I'm able to control the rear drive motor. The motor is connected to a L298N H-Bridge module. ...