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

1
vote
0answers
29 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
22 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
votes
0answers
11 views

can anyone tell me where the raspberry physical computing projects are available ? need a other sites than our official site? [duplicate]

i just need the websites that are available for the raspberry pi electrical project.sites should not be same as our official site .projects should be for beginners and intermediate
1
vote
1answer
52 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. ...
0
votes
1answer
39 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
35 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
30 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
72 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
21 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
49 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
54 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
72 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
26 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
38 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
57 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
43 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
226 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
47 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. ...
3
votes
2answers
173 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
23 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).
0
votes
1answer
176 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
91 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
35 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
78 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
96 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
62 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
128 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
2answers
379 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(): ...
0
votes
0answers
42 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
43 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
66 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
563 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 ...
1
vote
1answer
196 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 ...
1
vote
1answer
45 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
221 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 ...
0
votes
0answers
41 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
77 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
48 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 ...
1
vote
1answer
98 views

Switching a Circuit on/off with a MOSFET

I have have a simple circuit that I want to drive with a raspberry pi GPIO pin and I want to use a MOSFET to control the circuit. My circuit will be using about 3-5v and 2-3a. I'm planning on using ...
0
votes
1answer
72 views

Sensors With Raspberry pi Model 2

Can i connect any Sensor with raspberry pi? For example, I have a water flow sensor like this one, and an ultrasonic sensor like this one. Is it possible to connect it to a Raspberry Pi? Or I'll need ...
1
vote
0answers
115 views

Can't open pwm pin

I know there are many questions about using pwm pins in RPi, but nothing helpfull for me. Here is my code with described error: #include "pch.h" #include "MainPage.xaml.h" using namespace ...
3
votes
1answer
76 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
83 views

USB Rx from GPIO

I'm trying to get Rx from USB via GPIO for reverse engineering. I'll use it for such as keyboard, mouse, USB fax modem etc... I want to get data from USB device and sending data to my another ...
0
votes
0answers
37 views

WebIOPi: can only manage some of the GPIO

I have a Pi B Rev 2 (not a B+) and I can manage the GPIO (IN/OUT HIGH/LOW) using a Python script (GPIO.setup() and GPIO.output()) I've tried using webIOPi and I can change GPIO 17,18.22,23&24 (IN ...
1
vote
0answers
133 views

Problem with ESC, brushless motor and Raspberry Pi

I have connected an ESC (an electronic speed control) with a battery and a brushless motor. The Raspberry is connected to the ESC to control it. I know - when I turn on the program that is on the ...
0
votes
1answer
85 views

Is there documentation for RPi.GPIO

Is there documentation for RPi.GPIO? I have searched the web and can't find anything. I know I can use pydoc or help() but this produces the following:- wait_for_edge(...) Wait for an edge. ...
4
votes
3answers
73 views

convert a pic to bit stream and write it to gpio

I am new to the Raspberry Pi and i would appreciate it if you could help me to get started. I need to build a serial communication system, and the first stage is to be able to take a file (lets say a ...
1
vote
1answer
81 views

Problem using Buttons to swich LED's on and off

Im making a prototype of a model lift shaft. The LEDs in this example will eventually be replaced with relays. Side Note For those who do not know, a limit switch is a microswitch plces at the ...
0
votes
0answers
20 views

Physical computing

Have tried the physical computing instructions for programming using both scratch and python. But both are not working I have literally followed all instructions even down to if there is a line ...