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.

Filter by
Sorted by
Tagged with
5
votes
1answer
17k views

Live video streaming embedded in a web page [closed]

I have created a web page to have both live video streaming and some button controls to control the robotic arm interfaced to the RPi GPIO pins. For button controls, I used php coding. The php coding ...
5
votes
3answers
6k views

Can I transform GPIO pins into a CAN bus

I need a CAN bus and the Raspberry Pi doesn't have this. So, I would like to know if it is possible to transform some GPIO pins into a CAN bus. Which libraries would permit this? I would like to ...
5
votes
1answer
6k views

Max current from 3.3v power pins (for RPi model B+) - Higher Than You Were Told!

There are many references to a maximum limit of 50mA when sourcing power from the two 3.3V power pins on the GPIO (just for clarity, I am NOT referring to the I/O pins). However, I suspect this ...
5
votes
2answers
4k views

Automatic shutdown of Pi Zero on low battery

I am trying to build a battery powered Pi Zero, using a LiPo battery and the Adafruit Powerboost 500. I would like to be able to use the low battery output (LBO) on the powerboost to tell the Pi to ...
5
votes
1answer
32k views

Use an Android tablet display with Raspberry Pi

I want to use my old android tab (dead) display with Raspberry Pi. I am thinking of connecting screen via I/O ports of Raspberry Pi. I need to find display driver for tabs screen, as my Tab is dead, ...
5
votes
1answer
1k views

Simple Custom 1-Wire GPIO Communication Protocol between Master PI and Slave PI

I have 2 Raspberry Pis in my system. One can be 'docked' to the other one and some time later it can become 'undocked'. While docked, the 2 Pis will have a connection between 2 GPIO pins ( 1 pin on ...
5
votes
2answers
3k views

Simulate GPIO pins

I would like to do some simulation of the Raspberry's GPIO pins, e.g. for automated testing and developing the scripts on another host that is not the RPi. Are there any existing tools/scripts(...
5
votes
3answers
12k views

RF24 communication with Arduino

I have been trying for ages to work this problem out and can't figure it out. I have two nrf24 transceivers, one connected to the raspberry pi and the other connected to an Arduino. My code for the ...
5
votes
2answers
1k views

Are there any GPIO pins guaranteed to stay low during startup?

As usual, this is a huge project and rather than have the entire thing on here, I'll try to keep it short but try to get all the pertinent information included. I have a mobile robot chassis with ...
5
votes
1answer
2k views

Correctly grounding a circuit

I have a very simple circuit using the Adafruit breakout Pi cobbler kit with a HC-SR04 ultrasound module. The circuit works fine (I can trigger and read the echo back) but it doesn't seem to be ...
5
votes
2answers
3k views

Electrical characteristics of GPIO

Is there a spec sheet anywhere which lists the electrical specifications for the varios GPIO pins on the RPi revision B? For example, if they are open collector etc, output voltage, max input voltage, ...
5
votes
2answers
9k views

Where is the GPIO header file (“linux/gpio.h”)?

I've been reading about the linux GPIO functions and tried to make a small example using the function gpio_is_valid, but the compile fails because it can't find linux/gpio.h. #include <iostream>...
5
votes
1answer
3k views

Pi to Pi Communication over GPIO / USB

I have a Pi Zero that I would like to use to communicate with a B+. In theory I can connect an adaptor cable and a WiFi or Ethernet USB dongle to the Zero, and do the same on the B+. However, as an ...
5
votes
1answer
368 views

Adafruit LED Backpack with Windows 10 core

I have purchased the 4-digit 0.54" 14-segment Alphanumeric (https://www.adafruit.com/products/1911). I noticed there are helper classes for Python and Ardunio, but there isn't anything for Windows 10 ...
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 ...
5
votes
1answer
1k views

How can I use the RPi GPIO to make a headphone sensing audio jack?

I am working on a project that involves a raspberry pi acting as an internet radio client which the public can access by plugging their own headphones into a 3.5mm (1/8”) jack. They will have access ...
5
votes
0answers
132 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
721 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 ...
5
votes
2answers
1k views

Accidentally connected 3.3v gpio pin to 5v gpio pin

So I had the GPIO diagram upside down (haha). SO I connected the 5V Power pin on the header to the 3.3V Power pin on the GPIO. It was only for a second or less. My RPi still works fine, but I wonder ...
4
votes
3answers
2k views

rPi2 model B v1.1 smoke comes out near power port

I am trying to control 2 motors using the E-gizmo Motor driver shield but suddenly smoke comes out near the power port of the raspberry pi 2 so I immediately unplugged the power supply. After that, I ...
4
votes
3answers
18k views

Plug a 5 V fan to GPIO 1 and 2

Regarding to the following picture, I understand that I can plug a 5 V fan by plugging it in between pins 1 and 2. Is this right (+ on 1 and - on 2?)? My need: Plug a 5 V fan to run all the time the ...
4
votes
3answers
10k views

Debouncing buttons with RPi.GPIO — too many events detected?

I'm using RPi.GPIO to handle events from a simple pushbutton. Pushing the button connects the associated GPIO pin (4) to ground. I would like to trigger an event when the button is released (e.g., ...
4
votes
6answers
19k views

Raspberry pi maximum relays that I can connect

I want to control multiple relays in my house using the raspberry pi. How manny relays can I control using it ?
4
votes
3answers
6k views

Is there any reason to use multiple ground pins on the P1 header?

I'm building a Pandora device based on the Pi which uses the P1 header with Adafruit's Pi T-Cobbler breakout. The 3.3V pin (P1-01) powers 6 momentary buttons each with the following circuit: The 5V ...
4
votes
3answers
1k views

Multiple GPIO Buttons

I've seen a tutorial here that shows me how to do this: But what I want to do is like this: I want to have multiple buttons and distinguish between them. The graphic I painted depicts the desired ...
4
votes
3answers
2k views

Powering multiple PI's with one power source

here is an unusual question. I have NOT found ANYTHING answering my question which is why I'm here. My question is this: I am about to make a server cabinet for 4 Raspberry PI's it USED TO BE the 2 ...
4
votes
2answers
12k views

How To Switch On/Off A Circuit using GPIO

I have a simple circuit that runs on 5 volts. Let's just say for simplicity that it is a circuit with an LED that lights up when a push button is pressed. The problem is that it has a push button ...
4
votes
4answers
4k views

Infrared NodeJS

I just orded my RPI a while ago (Haven't recieved it yet), and this is just completely out of curiosity, but will I be able to connect some sort of IR receiver, and get it's input in Node? Or is this ...
4
votes
2answers
12k views

Raspberry Pi 3 model B “dtoverlay=gpio-shutdown”

To my /boot/config.txt on Raspberry Pi Model B I added: dtoverlay=gpio-shutdown,gpio_pin=3,active_low=1,gpio_pull=up Right now nothing happens when i shorten GPIO#3 with ground. What else needs to ...
4
votes
2answers
30k views

GPIO: Warning Channel already in use

gpio.py:5: RuntimeWarning: This channel is already in use, continuing anyway. Use GPIO.setwarnings(False) to disable warnings. GPIO.setup(8, GPIO.OUT) That is what I get after I run: import RPi....
4
votes
2answers
342 views

Random GPIO values when ribbon cable is connected

I've installed the GPIO python library to read/write to GPIO pins. To get the state of the pins I'm using "gpio readall" which displays a table with all the pins from the RPI and I can see which pin ...
4
votes
4answers
80 views

gpio turning on/off relay, seems backwards

I have a Raspberry Pi 3b and wired to a 4 port relay I got from Amazon: https://www.amazon.com/JBtek-Channel-Module-Arduino-Raspberry/dp/B00KTEN3TM/ Everything is working, but it seems backwards to ...
4
votes
2answers
2k views

Is there a max current that can be supplied when powering the Pi from the pins?

I want to power my Pi Zero from the header pins, pin 2 and pin 6 specifically. I know that my Pi Zero can consume up to 120mA, and my power supply can provide up to 500mA. I've heard that the 3.3v ...
4
votes
2answers
4k views

100% processor usage with WHILE loop in Raspberry Pi

I am using wiringPi Library and using this library to read data from GPIO Pins attached to a PIR Sensor. I am using a while loop which reads input data. If there is a motion it will print motion. ...
4
votes
1answer
3k views

Using Pi's built-in audio as general-purpose DAC?

Any common Audio output on any electronic device is in essence a two-channel Digital-to-Analog converter, where the voltage sent to each of the channels (Left, Right) powers the electromagnet that ...
4
votes
2answers
8k views

How do I wait for interrupts in different languages?

I have a IR photo gate sensor that I have attached to my Raspberry Pi, and it is working nicely as I test with WebIOPi and a C program using the wiringPi library. I would like to use some other ...
4
votes
4answers
8k views

Android Things: How many PWM pins on Pi 3 Model B?

I'm interested in using the Android Things on the Pi 3 Model B, but I need to access a minimum of 4 pins and use them for PWM control. On the pin-out diagram on Google's Android Things site, there ...
4
votes
1answer
9k views

Internal USB port redirected to GPIO pins

I'd like to make my Raspberry Pi a little more compact by moving a USB device inside the box, since there's so much empty space in there. I thought I could make this reasonably flexible by running ...
4
votes
1answer
3k views

How to use Arduino devices with Raspberry Pi?

I bought "RFID RC522" & "GY-NEO6MV2", and I need a useful guide for both of them in order to use them with Raspberry Pi 3 Model B. I also want to know if there is a guide or a course for using ...
4
votes
2answers
1k views

Use 3.3V regulator on 5V rail with GPIO

I would like to run a the LD1117H linear 3.3V regulator on my Pi's 5V rail in order to provide more current than the 50mA that the onboard 3.3V rail provides. My concern is that this is not entirely ...
4
votes
1answer
1k views

Can I write and read the pins of the GPIO just by using the shell?

I do not have programming skills, but I have some knowledge using the command line of the shell. Is it possible to get access to the GPIO just from the shell ?
4
votes
6answers
3k views

Connecting multiple ds18b20 digital temperature sensors to different GPIO ports

There are loads of examples of using the ds18b20 temp probe, or even multiples all to GPIO pin 4, and then running: modprobe w1-gpio modprobe w1-therm cat /sys/bus/w1/devices/28-*/w1_slave The ...
4
votes
3answers
1k views

Does Raspbian come out of the box with some GPIO C library?

Does Raspbian come out of the box with some GPIO library for C, or if not, does it have any in the standard repository? Sure I could just download and compile any of the libs on my own from .tgz but ...
4
votes
2answers
16k views

How to trigger GPIO event using an active infrared sensor

Trying to get an active infrared sensor to trigger an event on a GPIO pin. I'm using python and the RPi.GPIO library on an RPi model B. Some background info, not sure how relevant it is, but I'm a ...
4
votes
1answer
1k views

how to set and read the value for a gpio pin?

I got a new raspberry-pi and I am playing with LED's. I am trying to understand how the gpio-pin value is set. Does it read somewhere from the file system? I was going through a node.js module which ...
4
votes
2answers
840 views

Which GPIO pins does the Pi Zero camera use?

I'm working on using the Raspberry Pi Zero camera as well as other sensors simultaneously. But while trying to figure out which GPIO pins the camera uses, so I know which ones I have left for other ...
4
votes
2answers
301 views

Solution to limited GPIO pins

I am working on a project in which I need to accept 64 ON/OFF input signals into my Raspberry Pi. Is it possible by using four 16 channel multiplexers? How? If not, then I have found out in other ...
4
votes
2answers
829 views

Prevent wake-from-halt

I have an SMBUS (I2C, SMART Battery/charger) communication connected to the RPi: Pin 3 GPIO2 SMBUS SDA Pin 5 GPIO3 SMBUS SCL When pin 5 is connected, the system will wake up after approx 5-20 secs ...
4
votes
1answer
731 views

GPIO stuck in High Mode

I'm new to this whole RP world, and I'm trying to learn it. I've been trying to follow this post, and connected my Pi this image below Connection between Pi and Adafruit T-Cobbler Plus Wiring ...