We’re rewarding the question askers & reputations are being recalculated! Read more.

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
7
votes
3answers
2k views

Using jumper cables to turn on LEDs

Currently I have my LED's anode connected to the GPIO pin that controls it and the cathode is attached to a resistor and the other end of the resistor is on my breadboards - rail. How can I use jumper ...
7
votes
4answers
15k views

Accessing gpio pins using c program in raspberry pi

I am using raspberry pi with Debian Wheezy 18-09-2012 image. I can access gpio pins with Wiring pi tool. But I would like to know is any other method that we can access gpio pins directly without ...
7
votes
5answers
53k views

How to connect a graphic card to Raspberry pi?

I want a way to connect a graphic card like nvidia or amd to raspberry pi do you think has a way to do that?
7
votes
5answers
14k views

GPIO Interrupt debounce

I was following this guide, Raspberry Pi GPIO interrupts in kernel space, to create a kernel module handling GPIO interrupt. The problem is that this code doesn't have software debounce implemented. ...
7
votes
2answers
4k views

Permissions on /dev entries

I'm waiting for my Pi. From reading the tutorials and books on doing i/o on the Pi I'm getting the impression that linux makes entries in /dev on the fly, which is nice, but they're owned by someone ...
7
votes
3answers
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?
7
votes
2answers
987 views

Issue with push button on raspberry PI

I'm currently working with Raspberry Pi. I have implemented push button(switch) program using python. But, When I press the switch, then if condition is true and data stored but when I release the ...
7
votes
1answer
537 views

How can I wire a Raspberry Pi to an 8-relay board in a tidy professional manner?

I want to connect a Raspberry Pi to an 8-relay board, such as this one. Together with ground and power this amounts to ten wires. One option to connect the two is by using female to female jumper ...
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 ...
7
votes
3answers
20k views

Setting GPIO value on boot

I'm a semi-linux newcomer and i have a question: I need to set some GPIO pins in this way: (pin 18 out, pin 17 in) (actually i'm doing this via WiringPi(pyton) trought this commands) gpio export 18 ...
7
votes
3answers
3k 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?
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 ...
7
votes
1answer
8k views

Using a class function as callback

I want to set a callback function to run when an event occurs in a GPIO. I'm designing a class and I want to have the callback method inside it too. Here's an excerpt of the code: import RPi.GPIO as ...
7
votes
1answer
428 views

Is there a difference from one GND pin to another?

There are 4 ground pins on the GPIO are they all the same? Are the extra pins just there for convenience? I have an expansion breadboard does it matter which gnd slot I plug into?
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.
7
votes
2answers
17k views

Automatically run a program as root for GPIO?

I have a Raspberry Pi running Raspbian that I want to auto-login and then automatically run a program that uses the GPIO as root. I have auto-login working as per this website. What is the best way ...
7
votes
2answers
6k views

Jumper function on relay modules

I purchased some very inexpensive one, two and four relay modules on AliExpress that I believe are commonly used with Arduinos. I noticed that the two relay modules have a three pin jumper block (JD) ...
7
votes
1answer
4k views

How do I connect a buzzer to GPIO?

I have a PS1240P02BT piezzo-electric buzzer. I want to drive it with a software generated 3.3V 4KHz square wave from one of the GPIOS. What kind of resistor do I need between the buzzer and the GND ...
7
votes
1answer
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.
7
votes
1answer
14k views

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 (...
7
votes
1answer
1k views

Raspberry Python Libraries

I am currently working with a Raspberry Pi (Model B+) and have some experience with Arduino (and it's derivates). Now, there are three Libs for GPIO access with Python for the Pi: WiringPi (...
7
votes
1answer
326 views

Determining correct J3 jumper setting on Compute Module IO Board

The Raspberry Pi Compute Module Development Kit Quick Start Guide says that prior to using the kit, the IO bank voltage jumpers (which power the GPIO banks) should be checked. However, I can find no ...
7
votes
1answer
6k views

Can header pin 11 be used as GPIO17 in Windows 10 IoT?

I have an Energenie RF transmitter add-on board which fits onto the Raspberry Pi header (for more details, see https://energenie4u.co.uk/res/pdfs/ENER314%20UM.pdf). This board allows the Raspberry Pi ...
6
votes
3answers
1k views

GPIO status after python code is closed

I intend to write a python script to change the status of GPIO pins. The code will receive arguments through sys.argv, change the state of some GPIO pins, and close afterward. My question is: Do the ...
6
votes
3answers
768 views

Is this behaviour of GPIO pins normal?

I am using this tutorial: https://www.youtube.com/watch?v=b6ZagKRnRdM to connect that relay board to my PI, everything works fine, but I have noticed that till the GPIOs are set to out the 2 smd leds ...
6
votes
4answers
7k views

How can I control the red LED again

I just acquired the latest Pi-3. In the Pi B+ and Pi 2 it was possible to access both the red and green LED through /sys/class/leds/led0 and /sys/class/leds/led1. After setting up the Pi 3, I have ...
6
votes
2answers
1k views

Can I power a 3V water pump using the 3V3 pin?

Zero experience here. Would it be possible to connect a simple water pump that requires 3V to the 3V3 pin of the RPI? And in case the answer is no: Why not? What other power source would then be the ...
6
votes
4answers
41k views

How to identify the USB to Serial wire mismatched?

I am not alone, I experienced a similar problem as: "...instead of having the pin connections described as they should be they were mismatched so GND is described as TXD, TXD as RXD, and RXD as GDN." ...
6
votes
4answers
22k views

RPi GPIO as a high-speed square wave generator

I'm trying to make RPi generate high-speed square wave through its GPIO pin. My code controlling GPIO output is based on this article The essential part of my code is the following: speed = 1000000;...
6
votes
1answer
558 views

2nd LED not working when connected to different GPIO port

I am trying to make 2 LEDs flash but I have connected both to different GPIO ports. Both LEDs are being used with a 220 Ohm resistor. my red LED is connected to GPIO4 (Pin #7) while its ground is ...
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....
6
votes
1answer
20k views

GPIO pin states on powerup [duplicate]

Can't seem to find a solid answer to the power on state (before the O/S loads) of the GPIO pins. IE Do the pins default state set to input/output pull ups enabled etc.. My quick analysis has shown ...
6
votes
3answers
8k views

Is the GPIO configuration changed for Raspberry Pi Zero

When I wanted to start working with Raspberry Pi Zero, I presumed the GPIO configuration is the same as for A+, B+ and Pi2 and I wanted to confirm it is true. However, I couldn't find an official ...
6
votes
4answers
13k views

Global name GPIO is not defined errors on WebIOPi

I have Raspberry Pi 2 Model B v1.1 (NOOBS v1.4.2 Raspbian loaded), and I installed WebIOPi 0.7.1 to use it in order to blink a LED on attached to GPIO24 and GND by WebIOPi page. While I tried to use ...
6
votes
2answers
4k views

Virtual UART ports

I want to use a Rpi to interface with 3 atmega ics in an embedded system but the pi seems to only have one uart port. I know arduino can emulate a serial connection over two io pins, will this be ...
6
votes
1answer
3k views

GPIO callbacks in any language

I know the linux kernel has a language agnostic GPIO interface through /sys/class/gpio which can be manipulated with echo, cat, etc. How can this be used to create event driven callbacks ...
6
votes
2answers
3k views

Is there a way to make a regular GPIO pin into a Tx UART pin?

I'm working on a project that is going to need two different UART interfaces. Is there a way to make a regular GPIO pin into a Tx UART pin, I don't need an Rx pin too. Is there a software solution ...
6
votes
2answers
13k views

Sending Commands from PC to Raspberry Pi via USB

I am currently doing a project with the Raspberry Pi as a controller connected to a PC via USB and using the Pi to send commands to other devices connected via GPIO pins. Simplified version: ...
6
votes
2answers
3k views

Cannot read input to SDA/SCL GPIO pins

I'm totally stumped trying to figure out how to read input to the SDA/SCL GPIO pins on the Pi. Context: I have a Wiegand 26 RFID reader that I would like to read data from. The idea is that I get the ...
6
votes
1answer
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 ...
6
votes
3answers
9k views

RPi 2 and 3.95 TFT ili9488

I have bought a 3.95 inch TFTLCD for Raspberry Pi (ILI9488 from mcufriend) and I can't get it to work. I am just mildly experienced with Raspberry and Linux, but the way this type of screen was shown ...
6
votes
3answers
6k views

What is a failproof method for testing a GPIO pin?

So, basically, I've been trying to get my raspberry pi to get the room temperature from a DS18B20 1-wire temperature sensor. I've read only GPIO 4 is capable of this, and I think for some reason GPIO ...
6
votes
1answer
2k views

AD7705 analog to digital converter with RPi, viable?

I have a couple of AD7705 chips I'm attempting to use with my RPi to read the analog pins from a sensor that spits out 0~4V. Nice, detailed datasheet for the ADC is here: http://www.analog.com/...
6
votes
2answers
2k views

How to resolve a short circuit?

I'm building a morse transmitter. When the volume is up and I press a button it's beeping. (Also using JME8 I coded a program to get the signal from GPIO 17 and decode the morse to characters.) The ...
6
votes
4answers
1k views

Powering Pi with a 5V regulated power supply

I am considering this 5V regulated PS module. I have a coin acceptor that connects to a board. I am going to cut the coin acceptors 12V cable and put the -ve and +ve behind the regulated power supply ...
6
votes
3answers
10k views

How fast is GPIO+DMA? Multi I2S input

I want to connect multiple I2S ADCs to RaspberryPi and record multi-channel audio. I calculated that it requires copying GPIO input port to RAM at 3072kHz (or every 0.33µs). I want to do it using DMA. ...
6
votes
2answers
5k views

Raspberry Hardware simulator to practice on

I don't own a raspberry (it's in the mail) and would like to practice coding and interacting with the IO ports to turn on LED lights. Is there an gui hardware simulator someone can point me too? I'...
6
votes
1answer
3k views

Would it be possible to use the DS1302 made for Arduino?

I got some spare DS1302 chips that I'd like to connect to my Raspberry Pi to use as a RTC, but I'm not so sure how to. How would I go about it?
6
votes
1answer
6k views

Raspberry Pi as slave

I am using a Pi compute module and wish to make two of them to communicate to each other. I have hooked up some slave I2C devices to it (RTC, Temperature sensor). So I don't think making Pi as slave ...
6
votes
1answer
3k views

Status of DNC (Do Not Connect) GPIO pins in Rev1?

From some links, it seems that the Rev1 has a few "DNC" (Do Not Connect) pins. However, the diagram on eLinux wiki shows some of them as GND, others as powered (3.3V or 5V). There's also a relevant ...