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.

GPIO stands for General Purpose Input Output and can be used to receive and send signals to and from simple electronics from the Raspberry Pi. Questions about software controller GPIO are also on-topic.

Introductory Questions

The following questions are introductory questions on subjects relating to the GPIO.

Make sure any external devices connect to these pins have matching voltage levels or you could damage your Raspberry Pi.

Mind the maximum current that GPIO pins can sink/source - both per pin and in total. Exceeding those limits could (permanently) damage the Pi.

3376 questions
76
votes
5 answers

What is the maximum current the GPIO pins can output?

What is the maximum amount of current that can be pulled from a single GPIO pin? Does the maximum current decrease if current is being pulled from multiple GPIO pins? From my research, I've found: An Arduino can pull 40 mA People on the forums…
spuder
  • 1,153
  • 1
  • 9
  • 14
63
votes
1 answer

What are the min/max voltage/current values the gpio pins can handle?

I want to start using the GPIO pins but I am worried about short circuits or using too much amperage and frying my raspi. What are the Min/Max Voltage and Current values rasppi can handle? What is the typical voltage and current? How sensitive is…
John
  • 915
  • 1
  • 8
  • 12
54
votes
10 answers

Access GPIO pins without root. No access to /dev/mem. Try running as root!

I've made a python script using the RPi.GPIO library. I need to run it without root but I get this error when running it with "python ./script.py": No access to /dev/mem. Try running as root! I've read in many places that you no longer need root…
JoeyCK
  • 718
  • 1
  • 5
  • 10
33
votes
9 answers

Libraries for interfacing with the GPIO

What libraries are available for interfacing with the GPIO?
ramblinjan
  • 4,030
  • 7
  • 33
  • 52
30
votes
5 answers

What is a pull up resistor? What does it do? And why is it needed?

I have come across many simple circuits that show how to switch on an LED or something else. Pull up resistors are often mentioned. What do they do? Some GPIO pins require pull up resistors and others do not, what is the difference?
Matthew Rohrich
  • 403
  • 1
  • 4
  • 8
29
votes
6 answers

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: But I cannot figure out on real rpi if the 5V…
Dimitrios Desyllas
  • 475
  • 1
  • 5
  • 9
23
votes
2 answers

How can I control a 12V motor?

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 some resistors). So, assuming an external 12V DC…
Darren Wilkinson
  • 2,912
  • 4
  • 26
  • 27
15
votes
3 answers

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 the Raspberry Pi's 5V GPIO pin? If you can't use…
Mark Ingram
  • 879
  • 3
  • 11
  • 18
13
votes
4 answers

Raspberry PI and fingerprint scanner

How can I make Raspberry PI work with a fingerprint scanner like this? I found something for Arduino only (http://learn.adafruit.com/adafruit-optical-fingerprint-sensor) Are there any tutorials for the Raspberry or libraries? I couldn't find…
brgsousa
  • 243
  • 1
  • 2
  • 6
13
votes
2 answers

Why are there 8 ground pins on the Raspberry Pi?

On the image below the pin layout is shown for the Raspberry Pi and it can be seen that there are 8 GND pins for only 2 5V + 2 3.3V pins. What is the purpose?
Mehdi Nellen
  • 317
  • 2
  • 6
13
votes
5 answers

GPIO Pin Explanation

My Pi 2 kit came with the following GPIO pin reference card. In addition to showing all of the 5V, 3.3V, GND, and GPIO pin numbers, it has additional information on some of the GPIO pins like TXD, RXD, UART, CLK, PCM, DE0, CE1, SPI, DIN, DOUT, PCM,…
kspearrin
  • 285
  • 1
  • 3
  • 6
13
votes
2 answers

How do I avoid a temporary short circuit from destroying the PI?

I have a Pi 3b+ in a MIDI foot controller and part of the I/O is a pair of expression pedal sockets. After, ahem, getting the tip and sleeve round the wrong way, they are working correctly now. But, during testing, I disconnected one while the…
fret
  • 264
  • 2
  • 9
10
votes
2 answers

RPi as a Sound Level Meter?

For my daughter's science fair project (Computer Science and Math category), she'd like to use the RPi to go around and measure whether different loud sounds are above the threshold of pain and are damaging our ears. She's a 6th grader, but she has…
user5769
  • 109
  • 1
  • 1
  • 3
10
votes
2 answers

Which GPIO pins are usable without any modifications?

I've found that many of the GPIO pins are not usable on a stock installation of Raspbian with gpio-admin. For example, I wired up a relay to GPIO 21 only to find after some debugging that it didn't work as desired. Its neighbors GPIO 17 and GPIO 22…
notlesh
  • 233
  • 1
  • 3
  • 9
10
votes
2 answers

GPIO Voltage Thresholds

It is obvious, that 3,3 V is a HIGH, and 0 V is a LOW at a GPIO input pin. But I am looking for the exact voltage thresholds for the GPIO input pins. I have a Pi B+ and a Pi 2. Watching this video (for an older Pi) I get: LOW: 0 - 1.19 V HIGH: 1.34…
Dennis
  • 201
  • 1
  • 2
  • 5
1
2 3
29 30