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.
3,338
questions
30
votes
3
answers
17k
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 ...
4
votes
3
answers
3k
views
How to turn on a high current electrical device? (water heater)
I am looking into a project to measure the temperature inside a water heater and turning it on based on: time, temp, etc.
I am only on the theoretical phase since I am not sure it is possible.
I ...
11
votes
1
answer
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 ...
6
votes
2
answers
1k
views
Button & 2700 Ohm Resistor?
i have a flip switch and a 2700 ohm resistor and i want to read the state with python.
The code-part isn't a problem to me but is it possible to use this components to wire it up to the GPIOs to read ...
8
votes
4
answers
9k
views
How to detect whether there is voltage between two points via GPIO?
I'd like to detect whether an external device is switched on or off.
I found two pins where there should be 5V between in the first case, but the voltage may vary a bit and I don't wont to break the ...
15
votes
2
answers
8k
views
Can I use a One Wire File System through the GPIO?
I have installed owfs (under debian) just to realise the initial setup (1wire) works only through the USB port. owfs is short for One Wire File System. It's a standard for low end sensors, but I'm ...
4
votes
1
answer
805
views
How do I connect a DS18B20?
I'm trying to connect a DS18B20 to the GPIOs. I have successfully done so electronically, but I could only code the reset function because it's not that time critical. It is OK for that function to ...
9
votes
2
answers
7k
views
How to use Java to read/write data to/from the header pins?
I just got Java running on my Raspberry Pi which took a lot more screwing around than i had hoped. I want to be able to read/write data to/from the header pins from Java. How can I do this? Do I need ...
7
votes
1
answer
791
views
2 XBees on one Pi?
I'm looking to setup a timing system for my Pedal Prix team (like car racing with drivers changing, only with "recumbent" (sort-of laying down) bicycles, and here is my current setup:
RFID Reader to ...
3
votes
4
answers
9k
views
How to connect Raspberry to Grove Components?
Has anybody already connected some Grove Components to the Raspberry Pi?
How do I connect the system? And where can I find code tor program it?
17
votes
2
answers
8k
views
How do I read a button through the GPIO?
I considered myself out of this sort of beginner level stuff a long time ago, but I guess I'm not as smart as I thought I was because I seem to be having an exceptional level of trouble with it!
So I'...
15
votes
3
answers
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 ...
125
votes
9
answers
332k
views
How do I supply power through the GPIO?
I have seen some examples of people powering their Raspberry Pis by wiring a DC "barrel plug" style power supply to the 5V and GND GPIO pins.
What considerations should be taken when doing something ...
18
votes
5
answers
5k
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?
7
votes
1
answer
2k
views
Can I connect a buzzer to gpio without a transistor?
I have a buzzer with an internal resistance of 16.5 Ohms, which I have used with an Arduino and it worked fine, so I assume it is 5V.
Can I connect a buzzer to the GPIO pins without a transistor, or ...
46
votes
6
answers
24k
views
How to measure temperature?
What can I connect to the RPi to measure temperature? I think devices connected to the I²C or SPI would make most sense.
Here is a question about DHT-22 and other 1-wire devices. But at this stage it ...
5
votes
2
answers
2k
views
Outb in C to access GPIO
I have a basic understanding of the GPIO on the RPi. I want to adapt some of my previous software which interfaced my project board via the Parallel port via direct output to the PP address (0x378) ...
15
votes
2
answers
11k
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 ...
7
votes
2
answers
13k
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>...
9
votes
1
answer
5k
views
How do I bit bang I²C master?
I've installed RPi.GPIO. It doesn't support I²C yet, but can I use it to bit bang I²C?
I would just need the Raspberry Pi to be the master.
8
votes
4
answers
4k
views
What is the nominal GPIO Pin Output current?
What is the RPi GPIO Pin output current?
I assume it's more than 10mA since it can drive LEDs without any problem but what is the spec?
14
votes
5
answers
15k
views
Can I use a DHT22 as a temperature sensor for my Pi?
Is it possible to use a cheap temperature sensor such as the DHT-22 with the Raspberry Pi? I have found Arduino drivers for this and many similar things, and would be comfortable porting the code to ...
39
votes
3
answers
25k
views
What is the power on state of the GPIOs?
What is the state of the GPIOs when power is applied? eg High, Low, Hi-Z?
Also does any OS change the state of any GPIOs when it loads? Hopefully not.
23
votes
2
answers
19k
views
How can I control a 12V motor? [duplicate]
I would like to control (switch) some 12V DC motors using the GPIO pins. I do not have (or want to use) an expansion board. Nevertheless, I think this should be possible using a transistor switch (and ...
16
votes
2
answers
12k
views
What advantage does the Pi-Face addon board bring to the Raspberry Pi?
I have come across the Pi-Face addon board and am wondering what additional capabilities this unlocks for the Raspberry Pi.
From the website:
The 'added value' we want to provide is the hardware ...
32
votes
4
answers
34k
views
How can I use I2C to talk to sensors?
How can I talk to digital sensors over the I²C interface?
Hardware:
Which pins on the Raspberry Pi's GPIO can I use?
Software:
What I²C libraries are available?
34
votes
5
answers
59k
views
What SPI frequencies does Raspberry Pi support?
What SPI frequencies does Raspberry Pi support?
Additionally:
Are they all supported by the bootc.net SPI driver?
Are there any additinal things I should be cautious about when trying to ...
25
votes
4
answers
20k
views
How can I control Lego motors?
I'd like to find a way to make my Raspberry Pi control some Lego motors, and as a bonus I'd like to make use of one or more optical sensors.
Normally, Lego robotics make use of the Mindstorms "brick" ...
10
votes
3
answers
4k
views
Are there any expansion boards available for the GPIO?
Are there any expansion boards available for the Raspberry Pi for use with the GPIO?
15
votes
5
answers
16k
views
GPIO-UART-to-Arduino communication
I have been trying with no luck to get the Raspberry Pi talking to an Arduino. I am using a 3.3 V-to-5 V converter to swap voltages. I did put an LED on the UART TX pin, and it looks like it ...
29
votes
6
answers
18k
views
Can I use PATA cables for GPIO?
Raspberry's GPIO connector looks very similar to the old Parallel-ATA connectors. I do have several spare floppy/hdd PATA ribbon cables. Can I use these cables for GPIO? I know that GPIO has 26 pins, ...
14
votes
4
answers
3k
views
Is it possible to control a SRAM module via the GPIO pins?
I would like to attach a SRAM module to the RasPi.
My idea is to store sensitive (encrypted) data on the SD card but keep the key on a SRAM module. It would have its own backup battery (or ...
12
votes
1
answer
1k
views
Is it possible to communicate with I²C devices via the GPIO? [duplicate]
Is it possible to communicate with I²C devices via the GPIOs?
Also, are there any existing drivers or libraries that make this possible from Python?
110
votes
5
answers
251k
views
Can I use the GPIO for pulse width modulation (PWM)?
Can I use the GPIO as a pulse-width modulation output?
If so, how would I go about doing it and how many concurrent, distinct PWM outputs can I have?
14
votes
4
answers
3k
views
Is it possible to use the GPIO to program a PIC?
I'm referring to the PIC microcontrollers, specifically the 16f and 18f series - could the GPIO be used in this way?
If so, how?
29
votes
9
answers
25k
views
How can I control an RC servo?
I'd like to control a small RC servo (5 V, 500 mA) from the GPIO pins via Python.
Hardware
What are the required electrical connections?
Can I connect multiple servos to the Raspberry Pi?...
33
votes
9
answers
3k
views
Libraries for interfacing with the GPIO
What libraries are available for interfacing with the GPIO?
31
votes
3
answers
9k
views
How can I use the GPIO pins as digital outputs?
I've read that the Raspberry Pi has a number of input and output pins.
How can I switch them? (from Python?)
What voltage logic?
Do I need pull-up or pull-down resistors?
Do I need to switch the pins ...