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
3
votes
1answer
853 views

RPi.GPIO mysteriously crashing when setting up pin

I'm trying to test the following simple "blink" RPi.GPIO Python script. import RPi.GPIO as GPIO LED_PIN = 18 # GPIO 18, (P1 pin 12) print 'A' GPIO.setmode(GPIO.BCM) # Broadcom pin-numbering scheme ...
3
votes
2answers
3k views

Connect GPIO output to second Raspberry Pi input

Is it safe to connect a GPIO output to a GPIO input?? For example: Set the GPIO input to GPIO.PUD_UP and connect it to GPIO output. Then when the output is HIGH, then the input is logic 1, and when ...
3
votes
2answers
11k views

How To Switch On/Off A Circuit using GPIO

I have a simple circuit that runs on 5 volts. Let's just say for simplicity that it is a circuit with an LED that lights up when a push button is pressed. The problem is that it has a push button ...
3
votes
2answers
4k views

What can I do on a Pi with an Infrared sensor but no Arduino?

So, in a recent batch of purchases from Adafruit, I picked up one of these $2 gadgets: http://learn.adafruit.com/ir-sensor/overview It can pick up signals from TV remotes and such. I'm wondering, ...
3
votes
3answers
7k views

5v Relay will not close (unless using GPIO cleanup)

This seems like it should be really simple, so maybe I am missing something. I am just trying to open and close my relay but all it does it open's and doesnt close. I can use GPIO.cleanup() to make it ...
2
votes
1answer
9k views

GPIO pin output stays high after setting to low

I'm working on a project in which I have to set a GPIO pin of the Raspberry Pi to high/low in order to signal a transponder which in turn communicates with a lock and opens it when it receives a high ...
2
votes
2answers
808 views

GPIO pins NOT working when using touchscreen

I have bought this touch screen. It looks and works great. I wanted to play round making a simple Kivy app with buttons that turn on/off LEDs and relays. But it seems that when the screen is ...
2
votes
3answers
9k views

PHP + PYTHON + LIGHTTPD + Raspberry Pi GPIO to control the Robotic Arm

I was able to control one arm of an OWI-535 (Maplin) Robot Arm using GPIO pins and python programming (via L293 driver) , so I tried to do the same using a web page created in PHP. Created buttons ...
1
vote
4answers
40k 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 ...
12
votes
3answers
21k views

Why cleanup the GPIO pins?

When running a program in Python, why would I want the cleanup command when using the GPIO's?
12
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 ...
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
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 ...
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 ...
4
votes
2answers
275 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 ...
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
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
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
1answer
530 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
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
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 ...
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
2answers
4k 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 ...
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
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
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

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
128 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
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
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
170 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
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
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
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 ...
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
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
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
2k 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
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
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
300 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 ...
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
484 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 ...
0
votes
1answer
575 views

Waveshare GSM/GPRS/GNSS HAT not connecting to Cellular network

I have this HAT i bought for a pi project I am working on. I get the device to power on, I can connect via USB from PC, and can connect from pi too. However, the NET LED just blinks every second, ...
0
votes
1answer
236 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 ...