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
1
vote
4answers
39k views

Adding 5V fan to GPIO 2 and 6

I want to add a 5V fan to the RaspberryPi, I tried to activate gpio pins via /sys/class/gpio export files, I did not succeed yet, I guess pin 2 and 6 have both direction out ? Do I have to take ...
1
vote
2answers
9k views

ITEAD PN532 on Pi 3 with libnfc

For the past weeks I have been trying to get the ITEAD PN532 NFC board working on a Raspberry Pi 3 running Raspbian Jessie (2016-03-18) using libnfc. Here's some info on the board itself. It has two ...
14
votes
3answers
2k views

How do I connect my printer to the serial GPIO pins?

I've purchased a Mini Thermal Printer from Adafruit. The documentation states: This printer is ideal for interfacing with a microcontroller, you simply need a 3.3V to 5V TTL serial output from ...
11
votes
5answers
13k 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 ...
11
votes
3answers
20k views

Why cleanup the GPIO pins?

When running a program in Python, why would I want the cleanup command when using the GPIO's?
9
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 ...
7
votes
1answer
13k 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 (...
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'...
5
votes
3answers
6k views

Do the GPIO registers have the same addresses on the new Raspberry Pi 2?

So I just found out that the Raspberry Pi 2 came out, and I'm wondering whether stuff like this would work on it without any modifications (except for recompiling it for ARMv7 of course). This piece ...
5
votes
1answer
17k views

Live video streaming embedded in a web page [closed]

I have created a web page to have both live video streaming and some button controls to control the robotic arm interfaced to the RPi GPIO pins. For button controls, I used php coding. The php coding ...
5
votes
2answers
2k views

Impossible to scan RFID tags using libnfc, PN532, and RPi3

I recently bought this NFC/RFID reader PN532 module V3 I want to use it with my raspberry pi 3. I have install and configured the library libnfc. The PN532 is connected with I2C. I have well enabled ...
4
votes
1answer
6k views

Connecting a standard telephone through GPIO

I am wondering if you can interface a standard, RJ11 telephone through GPIO, and input an output through the phone, even using asterisk to connect to voip. The phone I have is a GE model number ...
3
votes
2answers
6k views

Connecting multiple devices via I2C

http://www.modmypi.com/raspberry-pi/breakout-boards/adafruit/adafruit-pwmservo-driver-16-channel-12-bit-pca9685 How do I connect two I2C devices to my R Pi? Specificaly 16 Channel 12 Bit PWM Servo ...
3
votes
2answers
3k views

SDIO on GPIO 22-27 - what about SD-card-detect?

I followed this thread to enable ALT-3 on GPIO 22-27 to be used with a SDIO device. Using raspbian jessie with kernel 4.1 on a Raspi 2 I enabled the sdio-overlay in the /boot/config.txt. The systems ...
3
votes
1answer
4k views

Can Raspberry Pi drive a PCB speaker directly?

I have this PCB speaker I really would like to mount to my Raspberry Pi model B but I am not sure if I can connect it directly to the 3.3VDC and a GPIO? As far as I can tell it is from 0.1W to 0.2W ...
3
votes
1answer
510 views

Is there a way to read the pullup status of a GPIO pin in python with, or if not, without pigpio?

I've discovered pigpio and am starting to learn to use it with Python. I thought I would use it to "discover" the pullup status of a pin before setting it, but while mode has both .set_mode() and ....
3
votes
3answers
7k views

Multiple Callbacks from GPIO interrupt

I created a quick program that uses the GPIO library to create an interrupt with a callback that is initiated when a (pink) button is pressed. It works, but when the button is pressed and then ...
3
votes
2answers
36k views

How do I send data from the Raspberry Pi to the PC

My project is to use the Raspberry Pi to send data taken from the "micromouse" to the PC. The micromouse will run in the maze, and then data will be sent to the Raspberry Pi most likely through the ...
3
votes
3answers
4k views

connecting a USB to Serial TTL PL2303HX to Raspberry Pi

I have a USB to Serial TTL PL2303HX (Prolific chipset) that I would like to connect to my Pi. My Pi model is 2011.12. The USB to Serial adapter has 5 PINs labeled as follows: 3V3 TXD RXD GND +5V I ...
3
votes
1answer
1k views

Raspberry Pi IR Sensor stays HIGH when it shouldn't

I have a Raspberry Pi that has an IR sensor on it, and a Arduino that has IR LEDs hooked up to it. I am sensing when something is put into a box, but not when the item is taken out (callChris() is ...
2
votes
1answer
3k views

Raspberry Pi multiple NFC readers

I am building a Raspberry Pi B+ powered survey device. It would use NFC scanners for multiple choice questions. It should display a question on LCD screen and the user should have his NFC tag scanned ...
2
votes
1answer
3k views

Is it safe to use the GPIO P6?

I have seen a number of tutorials on using GPIO P6 to work as a power switch. Is this safe? Does this approach do a "safe shutdown" - sudo shutdown -h now? From a tutorial: For this hack, we will ...
2
votes
1answer
107 views

Pi can't find 5th DS18B20

I am new in raspberry pi. In my research project, I would like to monitor ground temperature at 60 points. My team decided to set a monitoring system using raspberry pi. As a preliminary test, I ...
2
votes
3answers
4k views

How to control a 3V laser from GPIO

What's the best way to control (turn on and off) a low-power 35mA 3V laser from a Raspberry PI GPIO pin? The RPi GPIO pins support the right voltage but each can supply only a maximum of about 16mA, ...
2
votes
1answer
3k views

ADS1256 Python Libraries

So the other day I got myself a Waveshare High Precision AD/DA Expansion Board for my Pi-3. The ADC on the board is an ADS1256, and I am having trouble finding code libraries to use with it. ...
2
votes
1answer
7k views

Set pullup from command line

How do I set the pullup using /sys/class/gpio/gpio$PIN/ echo 1 > /sys/class/gpio/gpio$PIN/value does not seem to work.
2
votes
1answer
8k views

Set default baud rate on /dev/ttyAMA0 and keep after reboot

I have a ITead Studio GPS attached to my RasPi Model B 2.0's UART serial port and it's specifications require baud rate to be set at 38400. I am using gpsd on Raspbian, which attempts to use baud ...
1
vote
3answers
8k views

To Access the gpios from webpage by executing python code

I'm a student in electronics department doing a project on home automation using Raspberry Pi (for bulbs, fan, temperature and camera). I want to access the GPIO pins from a web interface to execute ...
1
vote
3answers
2k views

Correct wiring for 433MHz transmitter/receivers?

I have ordered some of these commonly used 433MHz transmitter/receiver units with the intention of using my Pi GPIO pins to send and receive radio signals. I have my approach mostly figured out, but ...
1
vote
2answers
4k views

spidev.xfer2 in python gives IOError: [Errno 22] Invalid argument

I am currently trying to follow this tutorial. I keep running into errors for the RPi part. I have received several error related to SPI. I removed SPI from my blacklist and followed the instructions ...
1
vote
1answer
11k views

Wiring up a ILI9341 TFT Screen + Touch

I've bought a ILI9341 TFT LCD Screen + Touch to my Raspberry pi. The screen is the MI0283QT-9A "TFT PROTO", from Mikroeletronika. Here is the link to the producer's page. It has an ILI9341 chipset, ...
1
vote
2answers
256 views

Relay status led's are blinking but the relay coil is not activating

Devices I am using are: 1) Songle 2 channel relay module - https://www.electronicscomp.com/2-channel-5v-relay-module-with-optocoupler?gclid=...
1
vote
1answer
297 views

Using PyAudio breaks GPIO18 PWM mode ? (driving LED strip with rpi_ws281x and listening MIC with PyAudio) [RPi Model B 512MB ARMv6]

I'm trying to drive a RGB LED strip with RPI's GPIO18 in python with rpi_ws281x library while listening to USB Microphone connected to the RPI to finally send colors depending on audio frequencies ...
1
vote
1answer
2k views

turn screen on and off with motion sensor

I'm working on a project which will use a PIR motion sensor to turn on a connected HDMI monitor when there's someone in the room, and turn it off when they leave. I'm new to Linux, but not to Python. ...
1
vote
3answers
125 views

Command/control latching relay using gpio pin only

first off, I'm a noob when it comes to hardware/electronics. Barely started and not planning on getting too deep in it. Now, what I am trying to do may not be possible, hence this question. I have ...
1
vote
2answers
1k views

What kind of connector do I use for the Pi's GPIO pins?

Does the Raspberry Pi have its own connectors for the 26 GPIO pins? If not what connectors do Pi users typically use for connecting these pins to peripherals?
1
vote
2answers
1k views

PiFm on raspi-zero

I'm having some issues with PiFm on the raspberry pi zero - I found this thread but nothing to alleviate my problem. PiFM not working for me I installed PiFm on a raspi-zero and it seems to be ...
1
vote
1answer
5k views

Start/stop Fan at certain time

I have connected a fan to my raspberry pi with a transistor that sits on pin 5 ( GPIO 5 ).' I followed an online "guide" to make it. I would like to make a script that makes it run during the day, ...
1
vote
2answers
7k views

Power Raspberry Pi Zero W through GPIO

I have read that it is possible (if not advised) to power the Raspberry through the 5V Pin and using a Ground Pin as well. This configuration works on my Raspberry Pi 1 and my Pi 2 as well. Now I have ...
0
votes
1answer
226 views

Do I need a resistor for a 3v3 led? [duplicate]

Begginer question, if the output voltage of the raspberry pi is 3.3v and my led voltage is 3.3v, do I still need a resistor? As far as I understand, if the voltage is the same you don't need to add a ...
0
votes
1answer
232 views

GPIO outputs not changing on specific GPIO ports

I'm using a Rpi B rev2 and I'm having problems changing the output of ports 2,3,4,5,6 (BCM). All the other ports work perfectly. I searched for documentation and I see the only thing that sets these ...
0
votes
4answers
482 views

Is it possible to shut off a Raspberry Pi 2 b using the GPIO pins?

I know there are plenty of guides out there for making a switch that uses the GPIO pins to shut down the Pi, but all of them use quite a lot of circuitry, but what I want is to just put a paper clip ...
0
votes
1answer
1k views

Using a switch, not push button, to play mp3s

I'm trying to setup a switch on a breakout board which, upon flicking the switch, will allow me to play a short mp3, then loop a second mp3 until I switch it off. When I do so, I want it to play a ...
0
votes
1answer
475 views

How to measure mains frequency safely via GPIO

I would like to measure the mains power (120vac/60hz) to know precisely when the voltage drops to 0, but in a safe manner for the pi - one solution would be to use a high-value resistor bridge that ...
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
1answer
5k 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 ...
5
votes
1answer
3k views

Can you connect multiple GPIO pins, to one ground pin?

I'm questioning whether connecting multiple GPIO pins (which to my knowledge are 3 volts), to one ground pin, is going to damage my Raspberry? I want to connect GPIO pins to breadboard, pass the ...
5
votes
3answers
4k views

Connecting blue LED (3.3V)

I've recently started doing basic diode connections (red and green diodes). I've also got blue diodes, but there's one thing that prevented me from connecting them already, namely - the specs say they'...
5
votes
1answer
3k views

Using BCM GPIO pin numbers with wiringPi C library

I'm a GPIO newbie experimenting with getting my Raspberry Pi to blink an LED with C using the wiringPi library. The example code at http://wiringpi.com/examples/blink/ (blink.c) compiles perfectly and ...
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 ...