Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

2
votes
1answer
29 views

LED not blinking

Raspberry Pi Zero Wireless I have a Pi Zero connected to a breadboard using the GPIO Extension Board and ribbon cable. I have followed several of the basic blinking LED tutorials. One jump cable is ...
1
vote
0answers
71 views

RPi.GPIO - Properly Wiring and Setting Up Pins for Button Inputs

Edit: Breadboard, schematic, and code updated. I accidentally fried my Pi by shorting it out through the GPIO pins, so I figured it would be a good idea to ask for some help before trying my current ...
-1
votes
1answer
25 views

python basic problem in developing raspberry pi 3 GPIO skill

this is a part of a code for picroft skill: def handle_command_intent(self, message): if message.data["command"].upper() == "BLINK": self.speak_dialog("ledblink") the "data" and "...
0
votes
1answer
39 views

Writing to GPS HAT on Raspberry Pi Zero W Never Returns Anything

I have attached a GPS HAT to a Raspberry Pi Zero W running RASPBIAN STRETCH WITH DESKTOP. When I SSH in to run a simple Python script that writes to the HAT serial port, nothing happens and I am not ...
1
vote
0answers
40 views

Problem counting pulses

I want to count pulses and find the frequency. Here is the picture of pulses from the oscilloscope: Obviously, frequency is around 1/2.3 ms = 420 Hz. First I tried this program: import RPi.GPIO as ...
0
votes
2answers
30 views

Raspberry Pi Detects I2C Device Sometimes

I have my MPU-92/65 connected to my Raspberry Pi and it's sometimes detected but not always. $ i2cdetect -y 1 0 1 2 3 4 5 6 7 8 9 a b c d e f 00: -- -- -- -- -- -- -- -- -...
0
votes
0answers
25 views

gnd pin to a gpio

My pi was on a robot and a ground wire of the battery back that was driving the motors accidentally touch a gpio pin on the pi. After that my pi began heating up whenever it's plugged in. Is my pi ...
1
vote
1answer
31 views

Controlling electromagnets in clock display

I have an electromechanical 7-segment clock display with each segment controlled by an electromagnet. A segment is 'on' depending on the polarity of the last pulse to its electromagnet. Can anyone ...
1
vote
1answer
65 views

Use Raspberry Pi GPIO to sync multiple video players. Possible?

Is it possible to use GPIO to sync multiple RasPi video players? As shown in the picture below, I need to sync 16 RasPi video players. The master RasPi will trigger the video players (start, stop, ...
0
votes
0answers
20 views

How to create installer files in Raspberry pi

I have created a program in Raspberry pi and I am running it using the command python myprogram.py . Is it possible to create the installer file of this program? that means after installing this ...
2
votes
2answers
149 views

How fast can GPIO pins toggle?

I'm currently using Python's RPi.GPIO module to toggle some pins, and I want to know how quickly it can do this. I need the pins to be toggled on the schedule of a ~50 mhz FPGA clock, which I'm ...
0
votes
1answer
68 views

ImportError: No module named 'RPi'

I am trying to make a humidity sensor using this code import RPi.GPIO as GPIO import dht11 import time import datetime # initialize GPIO GPIO.setwarnings(False) GPIO.setmode(GPIO.BCM) GPIO.cleanup()...
0
votes
1answer
46 views

Read GPIO pin on web page

I was able to control an led from a web page using the following code. when I call http://myip/pinon.php it will light up the LED and http://myip/pinoff.php will turn off the LED. pinon.php <?php ...
2
votes
2answers
192 views

Short pulse detection about 35ms, is it possible

I got somewhat short pulse 35ms, I written script in python using RPi.GPIO, using event and callback. Is it possible to detect so short pulses? On related question how close to 3V3 I need to get? I ...
0
votes
1answer
36 views

Get measured value of gpio vibration sensor (SW420)

I've managed to connect 2 SW420 vibration sensors to my rpi3 and can identify a vibration event on callback. However, I'd like to get the measured value (voltage change?) from the sensors, to see ...
1
vote
0answers
23 views

pigpio monitor GPIO not detecting change correctly

I am having trouble detecting a level change on pin 16 (or any other pin). My script is as follows: import RPi.GPIO as GPIO from time import sleep GPIO.setmode(GPIO.BOARD) GPIO.setup(16, GPIO.IN, ...
0
votes
0answers
64 views

Issue with FC-51 IR sensor

I am developing a robot with raspberry pi. To detect obstacles I am using FC-51 IR sensor. This is my current code. import RPi.GPIO as GPIO import time GPIO.setmode(GPIO.BOARD) ObstaclePin = 18 ...
-3
votes
1answer
130 views

Which is the standard python library for Rpi other than GPIO library? [closed]

Which python library is best one to use for programming RPI? I want to program RPI zero and Rpi 3 model B+ using python. I know that there is a GPIO library available for RPI. However, in its readme ...
1
vote
2answers
55 views

Testing my low frequency generator

I have my pi hooked up to a shaking device, and I'm looking to drive it at relatively low frequencies. My code looks like this: # Import the necessary header modules import RPi.GPIO as GPIO from time ...
0
votes
0answers
34 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
77 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
44 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
16 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
170 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
16 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
90 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 ...
0
votes
1answer
307 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
84 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
133 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 ...
1
vote
1answer
173 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
46 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
20 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
0answers
20 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
50 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
235 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
41 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
29 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
82 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
236 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
23 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
124 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
0answers
17 views

RPI2 Display Background image in 3.5 TFT LCD

when i am tring to display background image in 3,5 TFT LCD connected with Raspberry pi 2 (Ubuntu Mate Os) as per below mentioned comment, Screen gets blank (white). SPI interface is already enabled. ...
0
votes
0answers
94 views

Python shutdown script RuntimeWarning: A physical pull up resistor is fitted on this channel

I realize that this question has been asked and more or less answered previously, but I still have a question about it. I am running a shutdown script on a Raspberry Pi 3 which is written in python. ...
0
votes
1answer
441 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
691 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
1answer
438 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
255 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
1answer
759 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
42 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
220 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. ...