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
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
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
1answer
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
1answer
700 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 ...
4
votes
1answer
5k views

Read the value of an GPIO output pin

I've made a program using the wiringPi library that assigns GPIO pins to toggle at the press of associated number keys. I'd like my program to show the current status of the pins, even if they are ...
4
votes
3answers
4k views

LIRC remote control won't send (irsend: hardware does not support sending)

I'm trying to build a TV remote control using Raspberry Pi, and I get the following error when I try to send a command: pi@raspberrypi:~$ irsend SEND_ONCE Samsung_BN59-00937A KEY_POWER irsend: ...
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
1k 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) ...
4
votes
3answers
3k views

Multiplexing 4-digit 7-segment display is flickering

I connected a 4-digit 7-segment display to the GPIO-port. It uses 8 ports for the LEDs and 4 ports for multiplexing via PNP-transistors. It is running so far with a loop written in C program: while(1)...
4
votes
4answers
12k views

How to wirelessly transmit data in between Raspberry Pis?

Is there a way to wirelessly transmit data (preferably a string but numbers will do) in between 2 Raspberry Pis? The data must be transmitted without use of bluetooth or internet and have a range of ...
4
votes
5answers
4k views

DS18B20 w1-gpio Device Tree gpiopin NOT = 4

I have a HAT which blocks GPIO4 so I cannot use the default pin for the temperature sensor, but I just cannot get it to work on another pin! I just get lots of 00- instead of 28- in /sys/bus/w1/...
4
votes
1answer
4k views

how to generate smooth frequency ramp

I want to drive a stepper motor driver hardware by its pulse and direction inputs. I need to use a ramp function in order not to make stepper motor stuck. I need to increase the pulse frequency ...
4
votes
2answers
3k views

How to connect a 12V fan sensor wire to the Pi

I have a 3-wire 12v DC fan (Sanyo Denki 9S1212M4011). It's actually getting 15V because my "12V" wall wart isn't accurate. When the fan is not running my multimeter tells me there is 14V on the ...
4
votes
2answers
2k views

Read status of power led using sysfs

I want to read the status of GPIO35 on a Raspberry Pi 2 Model B using the sysfs on Raspbian with a 4.0.8-v7+ kernel. I can access other GPIO pins using /sys/class/gpio but the two leds are already ...
3
votes
2answers
6k views

Female Breadboard Jumper Cables

Can I use the inexpensive female/male or female/female breadboard jumper cables to temporarily wire sensors to the GPIO pins? http://www.ebay.ca/itm/QTY30-Breadboard-Jumpers-Wires-Male-Female-Arduino-...
3
votes
4answers
2k views

Raspberry Pi GPIO input voltage Limit

I am doing a project in which I have a component that outputs a 5 Volt signal. Since the Pi is only able to handle 3.3 V I connected the signal to a voltage divider. I used a 4.7 kiloOhm and a 2.2 ...
3
votes
1answer
6k views

Closing a circuit with GPIO

I'd like to use the GPIO pins on my RasPi to close a circuit. I don't want any power applied to the circuit either from or to the RasPi, just something as simple as touching two wires together to ...
3
votes
4answers
24k views

Can't Access TTY: Job Control Turned Off

I have a new Raspberry Pi with Raspian Wheezy installed and has several cables connected to it via the GPIO pins. However, I noticed if I have anything connected to them during boot up, the device ...
3
votes
1answer
314 views

Strange I2C behaviour

First of all: sorry for the title, I don't know how to describe further... Background: I'm working with the RDA5807M FM receiver chip. It worked fine for at least one month now. I just had jumper ...
3
votes
1answer
349 views

GPIO affected by audio playback

I recently found the PiFm project which sends a FM signal through a GPIO pin to effectively create a FM transmitter out of the Pi. A problem arises when you do a normal playback of a .wav audio ...
3
votes
1answer
2k views

How to use a GPIO pin after I put on a HAT?

I got a Speaker pHAT for my Pi Zero. According to the pinout, it only uses 5 GPIO pins, so plenty of room to add something else. The problem is, I'm not sure what's the best way to physically attach ...
3
votes
2answers
659 views

Using an L293D chip (to control a motor) with a separate power supply

I've got an L293D Motor Driver chip powered by 4.5v via some batteries and am trying to send high signals via the GPIO library in Python to control a motor, however this does not seem to work. My code ...
3
votes
1answer
352 views

Does select/multithreading make sense when dealing with multiple DS18B20 and GPIO reads simultaneously?

As you may know, DS18B20 is not the quickest sensor and answers after around 750ms delay but, afaik, 1-wire is a relatively quick bus. I have multiple sensors connected to the board, which means if I ...
3
votes
1answer
2k views

Raspberry Pi Camera Not Showing Preview Onto Touch Screen

I have a 2.8 inch touch screen that plugs into the GPIO pins on my Raspberry Pi 3. https://www.adafruit.com/product/1601. I have a raspberry pi camera that I attached to the pi. I am using the ...
3
votes
1answer
2k views

How to make a remote pigpiod socket call?

The pigpio GPIO library seems to provide a mechanism to invoke the pigpiod demon remotely using TCP/IP sockets. However, there appears to be some details missing. For example: Do we use a TCP or ...
3
votes
2answers
392 views

Using Transistors and the GPIO, can someone please check my math?

I've done a couple of new schematics, this is my first time doing this, I was wondering if somebody could double check my math? Powering the RGB LED straight off the GPIO pins: http://i43.tinypic....
3
votes
1answer
8k views

Measure Voltage with Raspberry Pi? Using a MCP3008?

I have an MCP3008 ic. I am pretty new to the Raspberry Pi world, as anyone ever used the MCP3008 to simply measure voltage? I just am really not sure how I would go about doing it. Any advice would ...
3
votes
3answers
466 views

Is there any change in the GPIO mapping between Raspberry Pi 1 and Zero?

I'm currently building a hygrometer (according to tutorials like this https://www.sweetpi.de/blog/436/luftfeuchtigkeit-und-temperatur-mit-dem-raspberry-pi-messen) All tutorials are using the "normal" ...
3
votes
3answers
5k views

Can we determine the mode of a GPIO pin?

As I understand it, the mode of a GPIO pin can be INPUT or OUTPUT (and I think there may be other modes such as PWM and I2C). I believe that the mode of a pin is a global and that if two applications ...
3
votes
2answers
211 views

Water Level Detection Sensor 3.3 Volt vs. 5 Volt

I'm using a classic Water Level Detection Sensor or sometimes called Rain Water Level Sensor together with a RPI 3+ to detect water in a Pot (Link). So I don't need any analog reading but only the ...
3
votes
3answers
744 views

GPIO.input in a while loop without sleep

I need to catch a fast GPIO pulse in a while loop like so while True: if GPIO.input(11) == 1: sys.exit(0) the pulse is so fast (magnet passing by a switch), that if I add a sleep in the ...
2
votes
1answer
317 views

Is there a way to detect if a PiTFT display screen is connected?

I am trying to detect if a PiTFT screen is connected. Is there some kind of GPIO pin I can probe and detect it to some extent?
2
votes
0answers
31 views

Is this a bug in sysfs? - GPIO access control problems [duplicate]

Here's the code: #include <stdlib.h> #include <stdio.h> #include <sys/stat.h> #include <fcntl.h> int main(int argc, char** argv) { char buf[1024]; int fd = open("/sys/...
2
votes
2answers
4k views

How to change gpio directory for node.js pi-gpio?

I was wondering how to change the gpio directory for the node.js pi-gpio library. Whenever I try to run the script to change the pin it returns this error: "Error when trying to open pin 40 gpio-...
2
votes
1answer
5k views

How to output all audio on the I2S interface and audiojack by default?

I'm currently running Raspbian on a Raspberry Pi 3. I want to output all the audio that would normally go to the audio jack output also go to the I2S interface (on GPIO pins 12 BCK, 35 LRCK, 40 DOUT). ...
2
votes
1answer
204 views

How to connect Pi to a homemade board, and communicate with it?

I'd like to make a small "MCU" consisting of a camera, a mic, some LEDs, and probably a cheap ARM CPU. I'm calling this my "SMIC" (streaming media IC). I'd like to connect this SMIC MCU to a ...
2
votes
2answers
350 views

GPIO Display an Buttons dont work

i bought a pi 2 B last week with a ready to use 16x2 Display + Keyboard wich i pluged in the gpio pins. It looks exactly like this picture: When i start the pi, the background display lights up like ...
2
votes
1answer
7k views

Problems Regarding Raspberry Pi Project with MQ-2 Gas Sensor

Recently I have been learning Python implementations on Raspberry Pi's GPIO system. I'm interested in wireless sensor network examples and decided to make a fire alarm system using MQ-2 sensor as the ...
2
votes
3answers
577 views

Detecting 5v from external source using voltage divider

I'm working on detecting whether or not an external 5v supply is on or off and found a few helpful related questions, specifically this one: Detecting 5V output from USB charger via Raspberry Pi From ...
2
votes
1answer
451 views

Soldering question

Beginner question. I have my circuit working, now I want to wrap up the pi and its cables in a clean fashion. For the external 5V charger I am using for the LED screen I can branch out, cut the pi ...
2
votes
1answer
1k views

Multiplexing 20 buttons into the RPi GPIO

I have 20 microswitches like this: How would you wire them to the RaspberryPi's GPIO, using multiplexing techniques? PS: here is a related discussion about multiplexing but it's theoritic and doesn'...
2
votes
1answer
5k views

gpio: command not found

With my raspbian I used to use the command gpio. Unfortunately, I forgot how I installed it, or if it came installed by default in Raspbian. Now I'm playing with UbuntuCore for RaspberryPi, and I ...
2
votes
1answer
519 views

GPIO stopped working under Python after using SPI

I'm using a Gertboard, and the GPIO Python demos were running fine. I started using/modifying the DAC and ADC demo code, and now I can't output to GPIO using Python (e.g. the Gertboard leds-rg.py ...
2
votes
2answers
930 views

Using incrontab to read GPIO's

I tried the following: In rc.local, I have: echo 24 > /sys/class/gpio/export echo 25 > /sys/class/gpio/export echo in > /sys/class/gpio/gpio24/direction echo in > /sys/class/gpio/gpio25/...
2
votes
1answer
1k views

Write floats to gpio

I want to control an LED Strip via the gpio PIns of my Raspberry pi 2. I found some ways for example using Python or WiringPi. But I need to use "non absolute values" like "put Pin 0 to 0.2 and Pin 2 ...
2
votes
1answer
1k views

How to connect rs232 board to PI

How to connect this rs232 board to the PI?
2
votes
2answers
3k views

controlling two motors with an L293D

Update: Can I possibly use the TLC5940 to control two motors? So there is a lot of talk about controlling two motors. My plan is two build a RPi robot and at minimum I need to have it control ...
2
votes
0answers
3k views

Daisy Chaining MCP23017 & Addressing

I'm looking to daisy chain multiple MCP23017 chips (upward of 10) to essentially give me more IO to play with from my Pi. I've started to work on the circuit diagram, but I'm really lost with all ...
2
votes
1answer
2k views

GPIO general use pins stuck in HIGH position

I am trying to do "LED Blink" with GPIO and Python on my RPi B+. I am using my breakout board with a breadboard and am jumping pin 11 (GPIO 17) > resistor > LED > jump to pin 9 (GND). I am using the ...
2
votes
3answers
9k views

Compile linux device driver in Raspbian

I have some problems with compiling & building a simple gpio driver that I wrote( after THIS documentation). I have a Raspberry Pi Model B+ ( not sure if it's relevant to the question) with a ...