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
0answers
41 views

Is there a python coding method for reading the value of a GPIO pin

Recently I have been learning to prototype circuits on a couple devices, as I am inspired to one day design and develop embedded systems. The two devices that I have been prototyping with are the AVR ...
0
votes
1answer
280 views

Python Adafruit DHT11 error

I have a very simple Python program on my RPi0W to display DHT11 Temp and Pressure readings using SSH. I'm planning to build on it to develop a data logger using MySql. I tested the program and it ...
0
votes
0answers
397 views

GPIO mode in another file B different from the file A

I face a problem. File B has import from gpiozero which controls LED. The default GPIO mode is a BCM. While in file A, it allows NFC reader to read card which imports MFRC522. However, MFRC522 gpio ...
0
votes
0answers
55 views

Help with multiple inputs and responding to how long the inputs have been active

I'm using python 2.7.13 on a Raspberry Pi 3 The goal of my program is to send an email when an input is received (input goes low and I'm using software pull-ups) and then send out another email with ...
0
votes
3answers
1k views

Powering RPI 3 and using relay from same source

I want to build something of a smart home device such as a smart switch /outlet for example that controls something like a light. However, I don't know what the wiring should be Like, if it's possible....
0
votes
1answer
43 views

GPIO.event_detected() Python3 IDLE vs Shell execute startup

I have a script with GPIO.event_detected(port) to count number of times a hall effect sensor is initiated. My script works amazing when executed in python3 IDLE run module. Counts are accumulated per ...
0
votes
1answer
241 views

Cannot execute Python3 RPi.GPIO import from shell/rc.local

I have a python script with import RPi.GPIO as GPIO. When I execute in my Raspberry Pi3 Python3 IDLE, it runs just fine with no issues. If I launch the script with shell pi@my_user_name, it says "no ...
1
vote
1answer
2k views

Cloning RFID tags with Raspberry Pi 3 and RC522?

I've looked around a lot now and can barely find any information on how to clone RFID tags with the Raspberry Pi, I've seen plenty of content on how to do it using an Arduino but I would really rather ...
1
vote
2answers
579 views

Check relay module state

I found a few good answers and guides about how to control a relay module from the pi, however, I want to find a way to check its state/status from the pi, is there a way to determine if the relay is ...
0
votes
2answers
827 views

Open/Close Sliding Gate Using Raspberry Pi and Python

This is my first Raspberry Pi project. I’m a bit of a noob at the Pi, Python and other types of programming languages, as well as circuits and such. I’m trying to open my sliding gate to the entrance ...
3
votes
1answer
1k views

3.3 V and 5 V pins shorted — is the Pi dead?

I am new to Pi development now while working suddenly the cable wires of pin1 (3.3 V) and pin2 (5 V) got in contact for a short time then the Pi shutdown. When I turn it back on, only the LED red is ...
1
vote
1answer
239 views

Pi 3 reboots when GPIO 13 is given 3V

simulate this circuit – Schematic created using CircuitLab I am taking the 3V from Pi and giving it to COM of a relay. The NO goes to GPIO 13 of the same Pi. I have a 120V line that triggers ...
1
vote
0answers
111 views

Pin on off engine javascript nodejs

I have a little engine linked at pin 1 and 3. How can I turn it on and off throught nodejs? Is there also a way to control how many volts are sent (to make the engine faster or slower)?
0
votes
1answer
33 views

How can I make a web UI where the user can set time to trigger an output pin in nodejs?

I am running nodejs webserver on my raspberry pi 3 and I want to create a user interface where the user can set a specific time of a day and trigger an output on that particular time. I have tried ...
3
votes
1answer
251 views

My PIR sensor seems alittle keen to sense things

Before you tell me answers for my issue already exist I'd like to mention that I have checked previous answers and where similar issues have occurred I have tried to use their approved answer. So far ...
2
votes
1answer
1k views

Real time audio input for use in Python program

I am working on some audio manipulation with my RPI and have a question on how I should process the signals. Right now I have a USB adapter with an Audio In and an Audio Out. What I would like to do, ...
-1
votes
1answer
158 views

Dynamically set a timer for a GPIO event? — Using Flask + RPi to control a shop fan

I have a big fan in my shop that I can control via a quick and dirty Flask API i wrote that runs on the pi that controls my fan. I have a web app on my main server (also Flask) that I use to control ...
0
votes
0answers
53 views

Supervisor restarting python app on GPIO event detect

I'm using supervisor to monitor a long running gunicorn/flask process on my pi that monitors my garage door with a reed switch on a GPIO pin and GPIO.add_event_detect. The problem is every time the ...
0
votes
2answers
651 views

GPIO.add_event_detect requires root

I am trying to run a program using GPIO from a normal user. I checked that /dev/gpiomem has the correct permission (root:gpio 0660) and that my user is member of group gpio. The following works ...
0
votes
2answers
958 views

GPIO does not read 3.3 v input with a resistor

I am having some issues trying to read 3.3v directly from the same Raspberry. I tried the next connections: With the first case, using a direct connection to 3.3 v I did not have a problem. The ...
0
votes
1answer
99 views

Clarifications on RPi.GPIO callback usage

I have just started working with the GPIO library and I would like to have a clarification on the way the library works. It's about the usage of add_event_detect when a callback function is used. From ...
0
votes
0answers
295 views

Using RPI 3 with Carberry as a LIN Master and display data on 7" display

I'm looking at purchasing a Carberry (expansion board for the Raspberry Pi) to read LIN slave messages and display them on the Raspberry official 7" display. However I'm having trouble determining a ...
0
votes
1answer
2k views

error installing RPi.GPIO on Python

I am trying this out for the first time with not much success I recently bought latest Raspberry PI 3 B+ I am trying to install RPi.GPIO via python 3.7 on my windows 10 machine. I have successfully ...
-1
votes
2answers
4k views

How to run python file from php script [closed]

I have all files placed under var/www/html folder. When I click my button on web page the php file must run the python file and give the ouput at the GPIO pins. But nothing is happening so. Anybody ...
0
votes
2answers
2k views

4x4 Matrix Keypad code in C

i am having a very hard time finding a purely C program for the Raspberry Pi and the 4x4 membrane matrix keypad. i can find python, c#, stamp, c++ and a couple java. however, C is completely missing ...
1
vote
1answer
643 views

Rpi 3 B enable gpio pin using assembly

I'm trying to enable a GPIO pin on raspberry pi 3 B using assembly. I tried to do the same on raspberry pi 1 and it worked, also it worked when I used raspbian command to enable it and then I tried ...
0
votes
2answers
4k views

Installing RPi.GPIO on Ubuntu Core

I have Ubuntu Core installed on a Raspberry Pi 3. The purpose is to use the Pi as the brains of a robotic system I am building so executing Python code which interacts with the Pis' pins through GPIO ...
0
votes
0answers
115 views

Turn ON raspberry pi with HI signal

I wish to start/shutdown my raspberry with my car ignition: When signal low - PI is off When signal hi - PI is on The first problem is described in many threads like this one and is straight forward ...
0
votes
2answers
983 views

GPIO.wait_for_edge and signal.signal()

I have the below sample code that is trying to implement a safe shutdown mechanism ( yet to fully implement) For some reason, I am not able to catch any signals using the registered signal handlers. ...
-1
votes
1answer
203 views

convert py file for RPIO to RPi.GPIO [closed]

According to Joan's instruction. First, git clone https://github.com/metachris/RPIO.git cd RPIO sudo python setup.py install sudo python3 setup.py install and sudo python3 jjy.py I made a jjy ...
2
votes
1answer
412 views

RPi threading too slow

So I have rpi wheeled robot, with wheel encoders and I want to always keep the track of the encoders and to be able to access the value when ever I need it. Basically, I created a thread, which ...
0
votes
0answers
71 views

python error from RPi.GPIO

Im getting an error "Error waiting for edge" In this script: import RPi.GPIO as io import time from picamera import PiCamera from datetime import datetime #PIR setup pir_pin = 4 io.setmode(io.BCM) ...
0
votes
1answer
374 views

Frecuent missing data error on DHT11

First of all, as this question involves a raspberry, python, Rpi. Gpio module and hardware build, I thought this was the place for it. In the past I've done some work around Dht11 sensor and python ...
0
votes
1answer
414 views

Controlling High voltage devices with Raspberry Pi

Can I control high voltage (here 5V) to power a led lamp and a fan(both operating at 5v) from Raspberry Pi GPIO only using a transistor . Or should I isolate both the circuits using a relay or octo-...
0
votes
1answer
57 views

Disable buttons while the mp3's they trigger are playing [closed]

I am using this python script to use 2 buttons to trigger 2 different mp3 files in a museum exhibit. As the files are 30 minutes long, I have also added a stop button to stop the playing mp3 so that ...
0
votes
1answer
1k views

Need a GPIO button to stop the currently playing mp3 file

I am using a RPi3 in a museum to connect to 2 buttons via GPIO. Each button plays an mp3 file. I used the Adafruit guide here: https://learn.adafruit.com/playing-sounds-and-using-buttons-with-...
0
votes
2answers
273 views

Allowing uwsgi to make GPIO calls

I've got a Raspberry Pi Zero W acting as a Flask python server that listens for webhooks, then runs a function to turn on a motor until the GPIO pins read a certain combination of inputs. I used to ...
-1
votes
1answer
706 views

GPIO pins always set to high

I have many pins on my raspberry pi GPIO constantly set to high, and I can't seem to set them to low, even after GPIO.cleanup(). Is my Pi faulty? Some seem to be set to low, and I can't set them to ...
1
vote
1answer
335 views

Precision of Raspberry Pi GPIO outputs voltages [closed]

Raspberry Pi has several output voltages, GPIO outputs theoretically giving exactly 0V for False and exactly 3.3V for True, 3.3V line and 5V line. However, how precise are these outputs? Can the ...
0
votes
1answer
230 views

Unable to get input from RPi3 GPIO serial, crashes when using RX pin

I have a sensor which spits out information via serial and I am trying to receive that input on my Raspberry Pi 3 via the serial RX (BCM pin 15). I'm using the wiringPi library in a C++ program to ...
0
votes
1answer
303 views

Connect multiple concurrent MCP23017 to Raspberry Pi

So I want to control multiple (12) RGB LEDs using the raspberry pi. I have 6 connected to the GPIO ports on the pi itself and want 6 connected to 2 MCP23017. I cannot seem to get them both to show up ...
1
vote
0answers
561 views

How can i emulate a ps/2 keyboard with raspberry pi3

So I am working on an medical machine which runs on microcontroller(So,No OS).It gets the input from ps/2 keyboard. I would like to automate it. I would like some basic idea and some help on how to do ...
0
votes
2answers
296 views

Can't set GPIO to LOW/HIGH PySerial

Hello I wanted to blink a LEDS. I have Raspberry Pi 3 B+ and I have LED connected to PIN 4 5v Power. The LED lights but I can't OFF LED ledPin(4) GPIO.setmode(GPIO.BCM) GPIO.setwarnings(False) GPIO....
1
vote
1answer
3k views

No module named 'RPi.GPIO'

I looked everywhere for answers and non worked, hopefully i will have someone who can help me, simply I want to turn on and turn off a led and I have this code > import RPi.GPIO as GPIO import time ...
1
vote
0answers
104 views

GPIO not producing power but gpio readall says it should [closed]

I have Raspberry Pi 3 model B, running RaspbianOS. I was trying to work with GPIO, but the pins were not producing power. I was using RPi.GPIO library in python to turn on and off the pins. I tried ...
1
vote
0answers
152 views

Raspberry pi shutdown when running python code

i have a python code which is running and has no errors, it is connected with arduino uno using nanpy firmware and lcd which has the library of adafruit/Adafruit_Python_CharLCD and it uses gpio BCM, ...
1
vote
0answers
149 views

conflict GPIO pin (between setting a pull-up resistor and a hat not claiming to use that pin)

I have a raspberry PI 3 (Raspbian) with HifiBerryDac+, running Mixxx. I wanted to run a pythonscript (2.7) which would allow users to automatically restart Mixxx by pressing a button (in case they ...
2
votes
0answers
532 views

PI Zero W, Running NodeJS and reading sensors - bad performance [closed]

I am doing a little project for my pet snake and that is a Terrarium controller with my Raspberry PI Zero W. Just for fun I created it using NodeJS since I am a bit familiar with it. A friend of mine ...
0
votes
1answer
47 views

How to find a suitable `herz` value for a Low Inertia Solar Motor [closed]

I would like to use a Low Inertia Solar Motor-1820 RPM with the Raspberry Pi. More specifically, I want to control its speed using pulse width modulation (PWM) as is explained in this video ...
-1
votes
2answers
562 views

Why is my script running twice when i autostart through .bashrc?

I'm sure this has been answered before but I can't seem to find the solution that works. I am running the latest Raspbian on an RPi 3. I created a bash script named "loop.sh" that loops through two ...