Episode #125 of the Stack Overflow podcast is here. We talk Tilde Club and mechanical keyboards. 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.

Filter by
Sorted by
Tagged with
2
votes
1answer
2k views

Force detection of GPIO device connection/disconnection

How do I force the system to detect a GPIO device has been connected or disconnected? For instance, I'm playing with the DS18B20 temperature sensor, and I noticed that immediately after connecting it,...
2
votes
2answers
2k views

/sys/devices/virtual/gpio dissapears after installing RPi.GPIO on Archlinux ARM

...tinkered a bit with GPIO and Piface Digital. It was all ok until I had installed RPi.GPIO via pip. After that the directory /sys/devices/virtual/gpio disappeared and never showed up again. I had it ...
2
votes
1answer
654 views

LED resistor question

I'm fairly new to electronics and I'm in the process of creating a IR Birdbox using a Pi Zero and IR Camera. I have a quick question regarding the correct usage of Resistors for IR LEDs (Or any LEDs ...
2
votes
2answers
687 views

Strategy for controlling one Pi's outputs from another Pi's inputs via network

Im trying to use two Pi's as a bridge to trigger a garage doors button from an automation system that uses its own GPIO. My thoughts where give them each a static address and script one to ssh into ...
2
votes
4answers
4k views

Use RPi as a LIN Master to control slave nodes

I am trying to use the RPi as a LIN Master to communicate with a number of slave nodes on the LIN bus. I can send the correct bytes, starting with the sync byte of 0x55, and then the node ID, the ...
2
votes
2answers
2k views

How to operate a cooling fan using GPIO pins, RaspPi2

I have little to no experience with any form of computer software coding/editing but I have managed to get EmulationStation working (sort of) on my Raspberry Pi 2. I have a bought a fan and plugged it ...
1
vote
3answers
4k views

Make a pin HIGH every time RPi startsup

I want to make pin no.15 (GPIO 22) as HIGH automatically, when the RPi is powered up. (Raspberry Pi 3 Model B) The status of the pin is used for a power on logic. This pin is used to check whether ...
1
vote
2answers
154 views

Multiple RPi and multiple external 5V power sources. Connecting all GNDs = ok?

First off, I'm a noob when it comes to hardware/electronics. Barely started and not planning on getting too deep in it. I have a bit complex setup that boils down to multiple RPis (around 13, with ...
1
vote
4answers
161 views

program my robot with python

initially my question was about how to fix my code. You informed me that usage of that python class will not work with my setup of one motor. I agree and I want to instead use the GPIO library to ...
1
vote
1answer
743 views

GPIO Voltage tolerance for input

I have not been able to find the input tolerance on I/O pins, especially on the Input pins. If I apply a voltage 3.6v (3.3v +0.3) on an input will it be dangerous or is it ok ? Does somebody have a ...
1
vote
2answers
547 views

Serial communication using RS232C

I am new to Raspberry Pi and GPIO communication, I am going to make a program to create a communication between my laptop and raspberry via serial com. After referred some tutorial, little confused ...
1
vote
4answers
600 views

Where exactly are these GPIO pins located on Raspberry PI 2 Model B?

I am having hard time understanding the Raspberry PI 2 Model B's PINOUT. I have RTC Module I want to use with my PI, but no matter what I do there seems to be NO response at all from RTC. I even ...
1
vote
2answers
243 views

Using Pi to control a button on a HDMI switcher

I've been reading about how to use the GPIO to toggle a button on a thing I've taken apart. It's like this: Amazon I watched a video of a guy using an opto-coupler, what are the basics here? I'm ...
1
vote
1answer
446 views

I²S Pins on Raspberry Pi 3

I looked at the schematics of the Raspberry Pi 3 here but couldn't figure out which Pins are what, to use the I²S Interface. Which Pin-Numbers are for: Bit clock line? Word clock line? Multiplexed ...
1
vote
2answers
139 views

What happens to the GPIO voltage after shutdown?

I don't have a Raspberry Pi laying around at the moment and I would like to detect if my Raspberry Pi is shuted down. My Idea is that maybe after the Pi shutted down the Voltage at the 3V3 pin will ...
0
votes
2answers
3k views

Max gpio input voltage

If I set a gpio to be an input could I damage it by directly connecting it to 3.3V? AFAIK you can't but why do people use a resistor in between? Sorry if this question is stupid but I could not find ...
-1
votes
1answer
816 views

Is it possible to control 6v dc motors with pi?

Is it possible to control four DC motors with Raspberry Pi at the same time? If so, where can I find info on how can this be done (from the physical aspect)?
-2
votes
1answer
37 views

how can i connect 4 LCD screen, 4 cameras and 12 led lights to a raspberry pi and can they work simultaneously?

I want to build a prototype for an intelligent traffic signal system for a four-way cross junction, hence I need to connect 12 led lights i.e. red, yellow, green and 4 cameras for taking input images ...
19
votes
7answers
47k views

Multiple temperature sensors with a Raspberry Pi

I have seen plenty of examples for using one temperature sensor with the Raspberry Pi, however, how can I multiplex 5-6 temperature sensors to a Raspberry Pi? I want to read the temperature from ...
29
votes
3answers
14k views

Can Raspberry Pi reliably bit bang a 9600 baud serial and is there example code?

I am wondering how feasible it is to use bitbanging to drive a 9600 baud serial via the GPIO pins on the Raspberry Pi. Obviously, Linux is not a terribly good platform for bitbanging, as there is a ...
16
votes
4answers
63k views

Receive FM Radio on Raspberry Pi

I want to feed the FM radio signals to raspberry pi. Having a basic understanding of electronics, I figured out that a FM receiver and an ADC is required. Now I need help on how to proceed with the ...
13
votes
2answers
28k views

Properly wiring a solid-state relay to the GPIO pins?

tl;dr — I'd like to connect this relay to the GPIO pins on my Raspberry Pi B+. I'm looking into purchasing a solid-state relay for my Raspberry Pi. After a great deal of searching, I came ...
4
votes
1answer
8k views

Major trouble with nRF24L01+ controllers and the RF24 library

I've had a hellish last three days. All I've wanted to do is get an Arduino Uno and a Raspberry Pi B+ talking to eachother with these little guys, and after following many different tutorials, I've ...
12
votes
6answers
89k views

GPIO Pinout Orientation RaspberyPi Zero W

I looked over various websites providing the pinout explanation, especially this . But I have trouble to figure them to the real rpi zero. I mean in the following image provides the pinout Information:...
11
votes
2answers
9k views

How to install node.js with GPIO

I am trying to install node.js on my Raspberry Pi as well as GPIO. I am running a brand new install of Debian Jessie I could get nodejs v.0.10.29 installed. No matter what I do, this is pretty much ...
9
votes
2answers
18k views

What's the right way to run a python script as a daemon (service) in raspbian (or debian)?

I'd like to use my Pi as a home thermostat, with the control loop running in a python script. I want to run it as a daemon on raspbian (debian) at startup. There's an example bash script in /etc/init....
6
votes
2answers
7k views

Implement a GPIO function with a callback calling a asyncio method

I am testing a sensor attached to the GPIO in raspberry using python 3.5. The idea is something similar to this link. My code is: gpio.add_event_detect(4, gpio.RISING, callback=lambda x: self....
16
votes
3answers
83k views

How to correctly install the python RPi.GPIO library

I downloaded RPi.GPIO 5.3a from here: https://pypi.python.org/pypi/RPi.GPIO I extracted the tar file, cd into the folder and ran: sudo python setup.py install It ran through a bunch of stuff and ...
13
votes
6answers
14k views

GPIO: Why wire button to ground rather than +3.3v?

In most examples I've seen of wiring buttons to GPIO inputs, the button is wired so that when closed, a circuit is completed between the pin and ground, producing a low input on the pin. A pull-up ...
7
votes
3answers
12k views

How to read Analog 5V sensor ouput with Digital 3.3V GPIO?

I bought the "Sunfounder Sensor Kit" for Raspberry Pi 2, but the whole content is made for Arduino (5V). I have bought ADC, Level Shifters but I am stuck because I think I certainly miss a simple ...
2
votes
2answers
7k views

Electronics of a water pump [duplicate]

So, I would like to connect a water pump to my Pi and programatically turn the pump on and off. I am looking at this pump: http://www.cooking-hacks.com/immersible-pump-water-tube-for-open-garden-...
13
votes
3answers
5k views

Can I connect a 16x2 LCD screen to the 5V GPIO?

From what I've seen of articles and videos online, everyone seems to be using the 3.3V GPIO pin. I have an LCD screen which requires a 5V power supply and I wondered whether it would be safe to use ...
10
votes
1answer
2k views

If I power my Pi from GPIO, can I detect that it's not being powered by USB?

I'd like to create a backup power solution for my Raspberry Pi, and I'd like a notification to come up that the Raspberry Pi is running on this backup power. This notification has to tell me that ...
8
votes
3answers
2k views

Cambridge University Raspberry Pi Operating system development Guide Questions

I'm a high level app developer (C#, python) and I'd like to get my hands dirty with low level embedded application development. Cambridge University has posted a series of tutorials teaching you how ...
8
votes
6answers
17k views

Reed switch wiring

Working my way through a garage door project. I purchased a few of these but I'll be danged if I can find a consistent answer on how they're wired to a Rpi. My thought was just start hooking it up ...
7
votes
2answers
23k views

Count RPM/Frequency/Pulses on GPIO ports (Maximum?)

I'm planning to count the RPM of a RC Car which is controlled with a PI B+. But while planning the question occurs, how to count the RPM. My Idea is via a Sensor, which gives a Pulse every Round, and ...
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
1answer
13k views

How do I set CLK speed on SPI for Raspberry Pi

I have managed to get some sensible data trough the ADC(MCP3008), but I'm struggling to find out how to set the SPI-Clock. The ADC (MCP3008) uses 24 clock-pulses to make one sample therefore I ...
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 ...
3
votes
1answer
13k views

Measuring voltage and current of battery

I have built an audio amplifier and i am going to put a raspi there to make the input wireless. The whole system is going to be supplied by a 12V closed type acid battery. So what i would like to do ...
16
votes
5answers
4k views

Do I need to use a ribbon cable for GPIO?

I haven't gotten my R-Pi yet, otherwise I would've just tried it, but do I need a ribbon cable to use GPIO or can I just connect a bunch of wires from the pins to a solder-less breadboard?
13
votes
2answers
9k views

What are the different clock sources for the general-purpose clocks?

I'm trying to generate a clean 11.289 MHz clock signal from the general-purpose clock, GPCLK0 on GPIO4. The suggested route is to use the 19.2 MHz crystal as the source, which seems to work ...
12
votes
5answers
14k views

Can I read the amount of light?

I'm not sure how to say it, but I would like to read the 'amount of light' with my Raspberry Pi. By the 'amount of light' I mean a number between 0 and 100 (for instance) where 0 is no light/dark and ...
11
votes
3answers
4k views

Precautions to be taken while using the GPIO pins

As a newbie to the Raspberry Pi and electronics in general, I would like to start hacking around with the GPIO pins but any tutorial around the Internet warn me about frying the Pi one way or the ...
11
votes
3answers
9k views

Can I use the 3.3v pin instead of the 5v pin?

I am using a HC-SR04 ultrasonic sensors, and I don't have enough 5V pins on a Raspberry Pi, and I don't want to buy an expander. So is it possible to use the 3.3V pins on some of the sensors? What ...
10
votes
4answers
10k views

12V device to a Raspberry Pi

For my school engineering project, I have a coin acceptor device which I would like to link to the Raspberry Pi. However the device requires 12V in power. I have an idea of what to do to power the ...
8
votes
1answer
1k views

Locked (Atomic) Register read/write

I'm coding something using direct control of GPIO, there are some good resources around for this, such as http://elinux.org/RPi_Low-level_peripherals#GPIO_hardware_hacking ; the process involves open("...
8
votes
2answers
8k views

GPIO library for C

I want to utilize the GPIO pins on my Raspberry Pi 2, but I'd rather not use Python since I personally dislike the language. However, I cannot seem to find any information regarding the use of C, only ...
8
votes
3answers
5k views

How does the Raspberry Pi differentiate between multiple expansion boards?

I am just getting started with using the GPIO on the Raspberry Pi for various projects. There are many breakout boards for the RPi and many of those have pins in order to stack boards on top of each ...
7
votes
2answers
3k views

How to change the Pin used for the 1-wire Bus

By default the header Pin Nr. 7 us used by the 1-wire kernel module. I would like to change it to a one of the 4 new GPIO Pins of an Rev 2 Pi.