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.

learn more… | top users | synonyms

0
votes
0answers
15 views

Serial data rate change intInterface using pi zero

I have serial control link between operator's control panel and explosives handling robot vehicle. Both control and robot use old microprocessor/firmware limited to 4800 baud rate. Needed upgrade ...
1
vote
1answer
18 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
33 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'...
2
votes
1answer
38 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 ...
0
votes
1answer
30 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
15 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
38 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
45 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
20 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 ...
0
votes
2answers
57 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
44 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
30 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?
1
vote
1answer
37 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
62 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
53 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
1answer
57 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
36 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 ...
1
vote
1answer
119 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 ...
0
votes
0answers
22 views

Why do my motors stop running properly upon second click?

My PHP files run motors, Forward.php makes them go one direction and Backward.php in the opposite. For some reason when I open the page and I for example press the up button it works fine, the motors ...
1
vote
1answer
51 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
64 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 ...
0
votes
0answers
99 views

ImportError: No module named RPi.GPIO

I have installed RPi.GPIO. The RPi.GPIO works on python independently, but when I try to import RPi.GPIO on opencv2, I get an error: Traceback (most recent call last): File "cam.py", line 2, in <...
0
votes
0answers
30 views

Callback fired multiple times for GPIO

I put together a relay controller for some light and sound effects for a parent production at my son's school. I have very lax timing requirements, but my callbacks are intermittently firing 1,2, and ...
2
votes
0answers
41 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
59 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 ...
0
votes
2answers
48 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
236 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 ...
0
votes
0answers
81 views

unable to fix ERROR Can't open the device /dev/ttyUSB0 (No such file or directory)

I tried running an object file which worked before but now when I run it it throws an error stating ERROR Can't open the device /dev/ttyUSB0 (No such file or directory).I'm using Jessie lite. pi@...
3
votes
2answers
261 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
24 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).
1
vote
1answer
242 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 ...
4
votes
1answer
113 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 ...
0
votes
0answers
41 views

L298N Stepper Driver in separate thread

I have a 2 NEMA 17 stepper motors and for each motor I'm using the L298N driver. It works great on my rpi using gpio and I'm able to have decent control of the steppers. My question is how can I ...
-1
votes
1answer
96 views

webiopi simple 3 wheeled robot, not functioning

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; ...
0
votes
1answer
137 views

GPIO.wait_for_edge on 2 channels at once?

So, I have 2 buttons set up on pins 17 and 27. buttons = (17, 27) GPIO.setup(buttons, GPIO.IN, pull_up_down=GPIO.PUD_UP) I need to accept input from EITHER of these for a set period of time. I ...
0
votes
1answer
75 views

Blink script gives me “name error 'BCM' is not defined”

I recently purchased a Raspberry Pi 2 and I am trying to run a simple a simple Blink program but getting this error: name error 'BCM' is not defined This is my script import RPi.GPIO as GPIO ...
2
votes
2answers
154 views

How can I disable GPIO warnings?

I get the following warning: Python says to add this command GPIO.setwarnings(False). Where do I put this command, in the file or in some system file?
1
vote
0answers
61 views

starting and ending a script with a buttonpress

I'm trying to integrate a button into a simple alarm project of mine but am having trouble activating/deactivating the alarm with a button press. Using Raspberry Pi 2 - Raspbian Jessie My wiring is ...
1
vote
2answers
571 views

GPIO=webiopi.GPIO, attribute error : module object has no attribute 'GPIO'

With this Python script I am getting errors: import webiopi import math GPIO = webiopi.GPIO # Left motor GPIOs L1=4 L2=17 # Right motor GPIOs R1=19 R2=21 def left_stop(): GPIO.output(L1,...
0
votes
0answers
44 views

R-Pi B+ PWM pulse outputted counter

I am relatively new to using R-Pis I have a question with counting number of pulses. The task that I have is counting the number of pulses that the R-Pi is outputting. I am using the .PWM function. ...
0
votes
2answers
47 views

Driving a 4 digit 7 segment common cathode from GPIO

I have 8 330 ohm resistors wired up to 8 gpio pins (8 anodes), then I have the 4 cathodes wired to 4 other gpio pins. I tested all my connections with a multimeter and everything looks good. Then when ...
0
votes
1answer
79 views

Wiegand GPIO read not working all the time. Works most times but hangs on some reads

I'm extremely new to Python, I've been learning a bit over the last couple weeks. This is what I've managed to come up with. I'm pretty over the moon the code works most of the time but it doesnt work ...
5
votes
1answer
569 views

I need to control 8 LED's but I can only control 3? [helpful pictures attached]

I'm very new to electronics in general, but I want to build a small project where I can individually control (from a GPIO pin) 8 LED's. From what I understand, each GPIO pin on the Pi (Pi2 model B V1....
1
vote
1answer
241 views

GPIO True and False seem to be reversed

I'm using the GPIO pins on my Pi under Raspian to control a relay and a computer fan. In Python 2, the command GPIO.setup (18, GPIO.OUT) Immediately supplies power to the pin and triggers the relay....
1
vote
1answer
48 views

Issue with reading GPIO pin with GPIO.IN

In one of scripts we are sending HIGH to pin 17, import RPi.GPIO as GPIO GPIO.setmode(GPIO.BCM) GPIO.setup(17, GPIO.OUT) GPIO.output(17,GPIO.HIGH) And in another script reading GPIO as, import ...
1
vote
4answers
361 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?
1
vote
1answer
49 views

GPIO Callbacks and How to Use Them

I'm building a prototype lift shaft, as many of you may know. And I was wondering what the best GPIO callback is, and how to use it. I've tried RPIO, bu I couldn't download it. And I've heard of 'edge'...
0
votes
0answers
50 views

FSR to Raspberry Pi values

Can someone help me with python script that will read FSR (force sensitive resistor) values and display on monitor? I already have the circuit set up using the Adafruit tutorial. I need a Python ...
1
vote
1answer
81 views

Allow sudo only to run one Python script that accesses GPIO

I have a simple Python script that controls three LEDs. I want to limit the sudo command for my user counter (member of group pimem) to just run this script and because it access the GPIOs also allow /...
-1
votes
2answers
53 views

RPIO Module installation

I've been trying to install the RPIO module onto my pi. so far, no luck because my pi is without internet at the moment (I only have internet on my laptop through mobile tethering). Does anybody know ...