Questions tagged [rpi.gpio]

rpi.gpio refers to the package name of a Python module for accessing the Raspberry Pi's GPIO pins. The module allows GPIO pins to be initialised, turned on, and turned off. It uses a functional programming style.

Filter by
Sorted by
Tagged with
0
votes
1answer
489 views

Gpio pins are triggered even without input

Basically it hooks up to a 12v relay: https://drive.google.com/drive/u/0/folders/0BxdLxDCD6HidZDFfWHhjWEZHYVU If button is pressed, it should send high to the relay. The problem I encounter is ...
0
votes
2answers
2k views

RPi.GPIO library working in python 3.4 but not in python 2.7

I am using raspberry pi model 3. I was exploring RPi.GPIO library and I realized that the code shown below works in python 3.4 but not in python 2.7. The worst part is I am not getting any error ...
0
votes
1answer
145 views

Weird behavior of Raspberry Pi GPIO ports

I am trying to manipulate the GPIO pins using python. I have used many examples from the web. However, I noticed weird behavior of GPIO ports. 1) If I make a port high, it becomes high momentarily ...
0
votes
1answer
179 views

GPIO modes without breaking serial

I am using and Adafruit BNO055 IMU and using their provided modules to read the data, i have been able to do so. However i want to be able to turn some of the GPIO pins to high as i want to control ...
3
votes
3answers
5k views

Hyperterminal for RPi: data transfer from device to RPi

I have a strength meter device (look at the photo), and I want to transfer data from it to Rpi2 (Raspbian OS). Transferring data to Windows easily accomplished through the Hyperterminal program. ...
4
votes
2answers
32k views

GPIO: Warning Channel already in use

gpio.py:5: RuntimeWarning: This channel is already in use, continuing anyway. Use GPIO.setwarnings(False) to disable warnings. GPIO.setup(8, GPIO.OUT) That is what I get after I run: import RPi....
0
votes
1answer
989 views

How can I run GPIO.wait_for_edge and an GPIO.add_event_detect on the same pin?

The code I'm trying to run looks something like this: import RPi.GPIO as GPIO sensor=4 def cb(r):#r is just accept the argument passed by add_event_detect c=GPIO.wait_for_edge(sensor,GPIO.RISING,...
0
votes
1answer
330 views

Why is my GPIO not switching my attached relay?

I have a relay attached to a Raspberry Pi B+ GPIO via two wires, one wire is attached to physical pin 6, a ground pin, the other is attached to physical pin 15 (GPIO. 3, BCM 22, wPi 3). I have a 2 ...
3
votes
0answers
551 views

RPi.GPIO autocompletion

Is there any way to have auto-completion when working with the RPi.GPIO in Python? I don't see it having any Python sources that could be used for it. I'm using IntelliJ IDEA, which uses PyCharm's ...
1
vote
1answer
1k views

Even setting a pin to output activates the relay

I'm trying to control this relay with my rpi2 b+. The problem is, when I do GPIO.setup(myPinNum, GPIO.OUT) this activates the relay. When I then do GPIO.output(myPinNum, True) or GPIO.output(myPinNum, ...
1
vote
1answer
4k views

I want to toggle a pushbutton and display it on tkinter GUI

I want to toggle a pushbutton and show its changes on a label using tkinter. If I press the button it shows "on" on the label and when I press again it shows "off" on the label So I try these codes ...
1
vote
3answers
606 views

raspberry pi as input, changing input value to high

i would like to read a high value for my gpio pin as right now my input value to the pi is reading from a digital sensor either 0v(low) or 0.9v(high). however i do know that 0.9v is too low to allow ...
1
vote
0answers
121 views

What will happen if I Power-ON RPI simultaneously from GPIO Header Power pins and Micro USB?

What will happen if I Power-ON RPI simultaneously from GPIO Power pins and Micro USB? For RPI1,RPI2 & RPI3
1
vote
1answer
5k views

Wiring a 3 pin toggle switch to Raspberry Pi 3

I have this small 3 pin toggle switch - just toggles left and right - it has its three pins aligned left, center and right. No datasheet for it - not sure where it came from - most likely a starter ...
0
votes
1answer
271 views

Flashing Red LED on RPi2 when relay is switched on

I have a RPi2 to which is connected a 4 channel relay board and a LDR sensor module. The connections are as follows: Relay Board VCC => Pin #2 (5V) Relay Board Ground => Pin #6 (Ground) Relay Board ...
2
votes
1answer
2k views

connecting common anode rgb led

Mistakenly purchased common anode RGB LEDs and haven't been able to find any examples showing how to connect to Raspberry Pi 3. All diagrams describe the common cathode type. I understand the logic ...
0
votes
2answers
1k views

Door sensor data sent to pi wirelessly

I am trying to start a project with my rpi where I can send data from door sensors to the rpi wirelessly. I just cannot figure out the hardware that I would need to complete this. I am looking at ...
2
votes
1answer
5k views

ImportError: No module named Rpi.GPIO

I use Raspberry Pi 3, model B. I have installed Rpi.GPIO 0.6.2 successfully from https://pypi.python.org/pypi/RPi.GPIO Then I tried to import Rpi.GPIO as GPIO but it says: ImportError: No module ...
3
votes
1answer
4k views

Control 5m of WS2812 LED Strip: Wire it up

I want to control 5m of WS2812 LED Strip with my Raspberry Pi, which will be placed around two Ikea Billy shelves. I read some articles and tutorials regarding this topic: http://popoklopsi.github....
2
votes
2answers
1k views

GPIO 02 and 03 seem always high when used as an input (with pull down resistors attached)

Hopefully this question isn't too silly on my part... but I am very new to this - so I am very likely missing something obvious :) So, the background... I have relays which I want to control them ...
0
votes
1answer
843 views

Problem with WebIOPi and Raspberry Pi 3

I installed WebIOPi on my Raspberry Pi 3, I use the patch for Pi 2 and 3 from this Github repository: https://github.com/doublebind/raspi. I can run the WebIOPi service, and the webpage appears in my ...
1
vote
2answers
1k views

Multiple rotary encoder raspberry pi 12C GPIO

I found this PEC11-4215F-S24 rotary encoder on Adafruit (https://www.adafruit.com/products/377) and I want to use three of them - or another rotary encoder - to use it in my Raspberry Pi project. I ...
1
vote
1answer
1k views

Hardware Volume Control - Runeaudio - HifiBerry Amp+ - Python

Okay, so I am building a sweet vintage style boombox for my nana using a RCA Victor X551 case, a Rpi3, running runeaudio. I have most of everything figured out, but could use some help with the ...
2
votes
0answers
203 views

Web interface to monitor and execute python script [duplicate]

I am building an automated piece of lab equipment. Overall the system works as follows: Python -> Rpi GPIO -> relays -> Actuators (on delay-> off delay, repeat) This loop runs for about 48 hours. I ...
1
vote
1answer
1k views

Python picamera exposure_mode night not working

This program is coded within Python. As I wanted to get my raspberry to be aware of the current time(night or day) and being able to upload a video that is using night vision from the normal cam....
1
vote
1answer
68 views

Using a Pi B with a 40pin GPIO paddleboard?

I posted a question a while back about interfacing GPIO pins directly into a breadboard. Someone replied use a paddleboard/cobblerboard! and so I did. I bought this paddleboard. But... It's ...
2
votes
1answer
286 views

Why can I connect to the GPIO pins using the gpio program, but not with the Python package RPi.GPIO?

I have a Raspberry Pi A+ and I'm running Raspbian GNU/Linux 8.0 (jessie). When I use the gpio command in bash I can connect to the GPIO ports, for example turning on a LED: gpio mode 25 out gpio ...
1
vote
1answer
318 views

Sunfounder temperature sensor module

I have a Sunfounder temperature sensor module and a Raspberry Pi 2 Model B. I want to use this to create a temperature logger, but nothing is working as I expected it too. The temperature sensor has ...
1
vote
0answers
159 views

Building MRAA for Java on Pi 2 B (raspbian)

i'm trying to use the MRAA lib to program the pins with java, but when I built the files, I can't find where the path was set, idealy it would be set on /usr/lib, but there's no mraa. Without it I can'...
1
vote
0answers
79 views

GPIO unexpected behaviour after 10 hours of running python script

I have a python script running as a service on Raspbian Jessie that watches for a button being pressed and lights an LED when it is done. Initially everything works as designed, however I have found ...
0
votes
1answer
389 views

GPIO not working as i want

Yesterday I received my raspberry pi 3 and installed Raspbian. I am trying to use it with this relay, but when i tried to use GPIO using the commands like echo 4 > /sys/class/gpio/export The ...
1
vote
1answer
900 views

Raspberry pi 2 - Check if anything is connected to the pin

I am making a game with the raspberry pi, which can be played for 1-4 players. I just wanted to know, if there is a way to count the number of buttons connected. I want to determine the number of ...
2
votes
2answers
9k views

GPIO control relay with button

I'm wondering if it's possible to have my momentary button control a relay in Python whilst I'm holding the button down? Currently, I'm able to control the relay with a small python script, switching ...
1
vote
1answer
3k views

TypeError: not all arguments converted during string formatting Raspberry Pi

This program is pretty simple. Whenever a user waves both hands across 2 PIR sensors, it should print out a message in console that displays which GPIO ports has being activated. The raspberry pi uses ...
1
vote
0answers
76 views

Why do I need to run GPIO as root even with GPIO Ver 0.6.2? [duplicate]

Trying to use GPIO in Python, but it only works if I change to root. Why? The description for GPIO Ver 0.6.2 indicates that root is no longer needed?
2
votes
1answer
1k views

Detect GPIO button press within time limit

I've got a photo booth program I'm working on that takes the photo of the user and displays it on the screen for 5-10 seconds. At the end of that 5-10 seconds, I'd like the booth to reset unless a ...
1
vote
1answer
726 views

SPI control of WS2801 LEDs, fails when using GPIO interrupts

I have three libraries (is library the right word?) that I'm using in my Python code: An Adafruit NeoPixels library, which comes from the rpi_281x library to control them via PWM, on GPIO pin 18. ...
1
vote
1answer
900 views

How would I make this python script keep running and not just stop after running once?

Im working on a game for my RPi3 B running raspbian, whenever I run this py script from the command line it runs once and stops, I would like it to stay open and keep running as it waits for a knock ...
0
votes
2answers
6k views

Problems with GPIO Edge Interrupts

I have the following circuit hooked up with a big button. Note: I am actually using a Pi Zero, not a Pi 2. I took some code from this example to run the following python script: #!/usr/bin/env ...
0
votes
0answers
210 views

Why after adding GPIO.cleanup to my code it still show the GPIO channel warning?

I wrote some python to blink a led. Without the GPIO.cleanup method, I had the following warning: "This channel is already in use, continuing anyway". Then I did tempo=1 import RPi.GPIO as GPIO ...
3
votes
2answers
5k views

PIR Sensor Consistent False Positives

So, I'm trying to set up my raspberry pi to take input from a PIR sensor in order to automatically turn on a monitor when it detects motion. If no motion has been detected in 60 seconds, the monitor ...
1
vote
1answer
648 views

GPIO pin Status

Is it possible to know if there is something plugged on the pins ? I made a web interface to control the Raspberry pi 3 remotely and I want to activate the pin where the relay is pluged but I don't ...
5
votes
1answer
894 views

How to Check GPIO pins simultaneously?

Can you give me an idea on how to check the statuses of specific GPIO pins if it is HIGH or LOW? My project is all about checking the statuses of GPIO pins (6 GPIO pins). I want to check all of the ...
3
votes
0answers
203 views

How Can I Properly Ground My RPI To Avoid Static Interference?

I have researched every where for this problem and cannot find a direct answer. I am currently working on a project which involves a large 20ft conveyor belt transferring product into a Plexiglas box ...
0
votes
1answer
111 views

Raspberry Pi 2 Pin once set to high does not return to low

I'm using a Raspberry Pi 2. Part of my project requires the Pi to activate relays, for which I intend to make a pin high for a while and then return to low. However once I set a pin to high, it ...
2
votes
2answers
3k views

Using GPIO pins 14 and 15 as general purpose

I understand that in order to use these two pins as general purpose I will need to disable UART. I tried following these instructions but /etc/inittab doesn't exist on raspberry pi 2 as far as I can ...
0
votes
1answer
329 views

I can't get three LED lights to turn off and on in an order

I'm setting up 3 LED lights to turn on automatically in a specific order using a Raspberry Pi 3. I coded it with Python. At first I had two and it worked. Then, I added a third with the same program ...
5
votes
4answers
10k views

How do I make a device tree overlay for just a single GPIO?

How do I make a device tree overlay which turns GPIO 7 on my Raspberry Pi Rev 2 Model B to a HIGH OUTPUT pin? EDIT: I require the pin to be this way as early as possible. That is why I am thinking of ...
0
votes
1answer
135 views

Which GPIOs are OUTPUT and HIGH at startup?

I need such a GPIO for an LED that must be on as soon as possible after the PI is started up. I've played with the device trees but documentation on those is sparse (in my opinion).
4
votes
1answer
2k views

i2cdetect on Raspberry Pi kernel 4.1.18-v7+ takes 115 seconds

I have tried on two different Pi's (2 and zero) with fresh installs and have the same problem. I have i2c enabled via device tree via raspi-config. When I run i2cdetect -y 1 without anything plugged ...