The Stack Overflow podcast is back! Listen to an interview with our new CEO.

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
3
votes
2answers
1k views

Where are the uarts on the raspberry pi 4?

The raspberry pi 4 has at least two uarts (as shown here), I know where I can connect to one of them. Pins 8, 10 and 12 have a uart as an option. Source: This site describes accessing uart1, where ...
2
votes
1answer
38 views

How to connect EEPROM to Raspberry Pi 3?

I was wondering on how to connect an EEPROM chip to the Raspberry Pi 3? And any suggestions on which EEPROM chip model is best to use with RPi3?
0
votes
0answers
18 views

pad4pi (rpi_gpio) Library “registerKeyPressHandler” not working as expected

I'm currently writing a python program, that initializes the fingerprint sensor at first then showing the number of used templates on the fingerprint sensor after pressing "1" on the matrix membrane ...
2
votes
1answer
43 views

How to install a library on the Raspberry pi 3 without internet?

I've to install the RPI.GPIO library on my raspberry pi 3, on the other hand, I don´t have acess to the internet in this. I'd already download the library in another computer and put this in my USB ...
0
votes
1answer
34 views

Why the same GPIO pin is not working anymore?

I was working with a very simple code: import RPi.GPIO as GPIO GPIO.setmode(GPIO.BCM) GPIO.setup(24,GPIO.OUT) GPIO.output(24,GPIO.HIGH) But after running one time when I am running the code nect time ...
2
votes
2answers
141 views

Is there any built in LED connected with GPIO pin?

In Arduino a built in LED is attached with number 13 Digital pin. Is there any LED like Arduino in Raspberry Pi,which I can use to test my code?
0
votes
2answers
47 views

Communicate with GPIO HIGH/LOW between 2 PIs

I have 2 raspberry PIs 1x PI3 and 1x PIZero with camera attached. I want to set up a system to have a output GPIO pin on the PI3 and a input pin on the pizero connect so that when I set the PI3 pin ...
0
votes
1answer
49 views

RPi.GPIO “flush” interrupts

Intro It seems to me that when one adds and event detection, then removes it and the adds it again, something strange happen: 1) an event is removed to the "detection list"; 2) the event happens; 3) ...
1
vote
1answer
324 views

Is the gpio readall command compatible with RPi 4?

It's already a while since I got my Pi 4, but never used the gpio readall command until yesterday. I have run into an interesting error. pi@raspberrypi:~ $ gpio readall Oops - unable to determine ...
1
vote
1answer
88 views

GPIO pin (BCM 12) acts differently on PI3 and PI4

The following code is running on PI3 and is working perfectly fine. I try to provide a short description of what the code does. In this code I first set the BCM 12 as the pin of interest for my sensor ...
0
votes
1answer
74 views

Barcode Scanner using RX & TX (GPIO) PIN

Im having some issues reading from a barcode scanner module.. The scanner works just fine if it is used with a USB adapter, my goal is to use the RX & TX GPIO of my RPi to control it. What I am ...
0
votes
0answers
25 views

RPi 3B power supply and external USB Hub issue

I am building a project with a custom USB hub attached to one of the RPi USB ports. On the custom hub I attach 7 USB devices powered by their own batteries. The custom USB Hub is equipped with an ...
0
votes
1answer
24 views

Commercial PIR intergration with Raspberry pi zero

Here is the problem I face. I have a commercial PIR and wondering if it can be seamlessly connected with my pi zero w and how. PIR specs: https://www.thecrowgroup.com/cr/uploads/2019/03/Datasheet-...
0
votes
0answers
46 views

RPI GSM Add-on SIM800 AT commands are not working

I am trying to send sms using RPI Add on v22 module and Raspberry-pi 3+. I have mounted this module on top of Raspberry-pi. When I use minicome using minicom -D /dev/ttyS0 -b 115200 -o I get the ...
1
vote
1answer
63 views

GPIO PWM. ESCs still run different after calibration

I’m putting a quadcopter together. I’m using a python script to calibrate the ESCs... they beep like a blinking led when I give them power. Then I run the calibrate script and they give me the proper ...
0
votes
1answer
33 views

2 Motors functioning unevenly - right motor gets more power than the left

I'm trying to execute this piece of code to run 2 motors on my robot. The code is really simple it's just repetitive. For some reason that I can't figure out, the motors run unevenly. Here is the ...
2
votes
1answer
106 views

pi4 no module named gpio

I am trying to import rpi.gpio in my geany on pi4, but it comes with error no module named gpio. The odd is that i updated pip and python and installed successfully with sudo apt-get install python3-...
-2
votes
2answers
77 views

Runtime warning: This channel is already in use, continuing anyway [duplicate]

I'm trying to fix this code for a robot with multiple sensors. The values of TRIG and ECHO are input through another part of the code. Set this at the beginning of the code def init(): GPIO....
1
vote
1answer
38 views

Value of GPIO.input() automatically change

I have a simple code that read the input from pin 17 (BCM). import RPi.GPIO as GPIO from time import sleep GPIO.setmode(GPIO.BCM) GPIO.setup(17, GPIO.IN) try: while True: print(GPIO.input(17))...
0
votes
1answer
51 views

/etc/init.d/lirc doesn't exist

I am working on creating an IR remote for an older TV using my GPIO, primarily using this tutorial http://www.raspberry-pi-geek.com/Archive/2015/10/Raspberry-Pi-IR-remote#article_l1. However, when I ...
2
votes
1answer
65 views

I2C Communication between Arduino and RPi failing when Arduino is sending data

I'm trying to read some data from the Arduino slave and when I receive the data it shows some numbers but not the correct ones. I'm using node and i2c-bus module, also tried with wiringPi but got the ...
0
votes
1answer
43 views

Water Sensor Pull_Down

I've got the classic Iduion Water Sensor (Link) and I want it to simply detect the presence of water but I get unreliable readings when using it like this: import RPi.GPIO as GPIO import time GPIO....
4
votes
1answer
77 views

How to Monitor GPIO Input Indefinitely Without Recursion

I actually joined StackOverflow to ask this question because I wasn't sure it was RPi specific, but as I was thinking about how to form the question, I realized it might be GPIO specific (for some ...
2
votes
0answers
239 views

How fast can GPIO pins toggle on the Pi 4?

Benchmarking of the Pi 4 using the Python GPIO Zero library shows a significant increase in the frequency of toggling a GPIO pin on and off compared to previous models. This result is attributed to ...
1
vote
1answer
35 views

Pausing code execution till a button is pressed

I'm trying to pause code execution till a button is pressed and this is what I came up with. I have not tested this but can anyone tell me if this is the right way to go about it? Button 'pressed' is ...
0
votes
1answer
56 views

Is there a piece of hardware which enables hotplugging sensors to the breadboard?

The idea is the following: I have a Raspberry PI connected to a breadboard. To this breadboard, I would like to connect (digital and analog) sensors and actuators while the PI is running. Or remove ...
1
vote
1answer
26 views

RC522 modules stop working when more than 2 are connected

So, here's a synopsis of what I am trying to do. I want to put 3 RC522 readers side by side inside of a book, facing the cover, that will be constantly on, using a Rpi zero W. When an RFID chip gets ...
1
vote
0answers
76 views

raspberry pi3 + fingerprint

I'm looking for a way to connect fingerprint scanner with raspberry pi3 using python. I'd like to use only gpio or hat (not usb) interface. I'm searching for a while without figured out, so I've ...
1
vote
1answer
69 views

False Contact Closures - Do I Need Physical Pull Up Resistors to Resolve?

I'm running Raspbian Jessie 4.9.35-v7+ on a Pi 3 Model B. I cobbled together a basic python script to monitor a GPIO pin and send a network signal to a remote application, made two copies of the ...
1
vote
1answer
119 views

Raspberry Pi 3 B+ was connected to NRF24L01 in the following manner as in diagram but Raspberry pie not working after that why? [duplicate]

I connected VCC to 3.3V and GND to 5V of raspberry pie mistakenly. Now raspberry is only showing red light on and no green light blinking. What might be the probable reason. Is there any solution so ...
-1
votes
1answer
81 views

Segmentation fault error. Trying to loop a python program [closed]

I'm using AT commands to send data over http, but the problem is that sometimes the program has an error and wont run again until I reboot and the GSM. Im using a crontab and also running the file as ...
0
votes
1answer
23 views

Corrupted image file when using win32 [closed]

What things make the file is corrupted and not readable as an image file?! if the sd card is read-only, this prevent that I able to take a copy from it??!
2
votes
0answers
39 views

How to run 3 Input scripts from 1 script

I've got an alarm system with 3 inputs and 3 outputs. But so far each input is controlling the outputs from it's own script. I did this because I wanted to get one thing at a time working on its own. ...
1
vote
1answer
37 views

How Can I Determine Why My Python Script Is Terminating?

I'm running Raspbian Jessie 4.9.35-v7+ on a Pi 3 Model B. I cobbled together a basic python script to monitor a GPIO pin and send a network signal to a remote application and made two copies of the ...
1
vote
1answer
498 views

Why is PIR motion Sensor always on?

I'm trying to make an alarm system but the motion sensor is always on as soon as the script is run. I've posted a question about a different problem i was having with this project so it'll confusing ...
1
vote
3answers
164 views

How to stop LEDs blinking when button is pressed

I've got 4 LEDs, a buzzer and a button. There's an add_event_detect to switch the LEDs and buzzer on and off. The callback methods works find when the outputs are just on continuously until another ...
0
votes
2answers
299 views

Reading only 0 from ADC using RPi SPI

Everytime I try to read analog channel 0 from ADC, it only prints 0. I am confused why. I shorted MISO and MOSI on my RPi to check SPI send/receive and it was working. But if I test it after properly ...
2
votes
1answer
61 views

While reading RC522 RFID reader keypad won't work

I am using pimylifeup library to read RFId card. But after id, text = reader.read(), I don't get reading from 4×4 keypad. I tried with both BOARD and BCM numbering to read keypad. I have to exit the ...
1
vote
2answers
58 views

Connecting RPi to a motion sensor

I'm new to working with RPi GPIOs, and I never studied electronics so bear with me on this newbie question. I have an RPi 2 Model B, and I'm tasked with detecting a motion detector alarm going off. ...
-1
votes
1answer
76 views

Sg 5010 servo 360 degree modification not working [closed]

As per the video tutorials out there, I opened the motor, took out the potentiometer and measured its resistance at max. Its a b5k pot so it measured 5kohm I put 2.5k ohm from each pin (s and -) and ...
1
vote
1answer
114 views

I would like to switch on the Raspberry GPIO using an NPN transistor (2n2222)

Hello guys I am currently working on a project. and I would like to turn on a GPIO pin when my LED on the circuit below turns on. I'm lost to where I should tie my input GPIO pin. please help. Thanks!
-2
votes
2answers
115 views

Python: how can a delay the repeat of my print command?

My objective is to program a print out a reading, but I want to delay the reprint so that its not spamming me with the reading constantly. try: cpuFile=open("/sys/class/thermal/thermal_zone0/temp","...
1
vote
0answers
70 views

Display drivers for RaspberryPi3B+

I am trying to get a 3.5 inch RPi Display working on my raspberry pi. I have written my sd card with raspbian and the pi works well (red LCD glows all the time , and greed LCD flickers (fades on and ...
1
vote
2answers
132 views

Sixfab LTE IOT HAT throwing continuous AT Command

I was working on getting my new Raspberry Pi HAT that I have received and tried the simple example just to see if it is working fine. I have not been able to send a text message to my mobile phone. I ...
1
vote
1answer
98 views

Two stepper motors with python

I want to make a motorized rc paddle boat type machine for fun. I plan to use two stepper motors to spin two wheels on either side of the boat. I am controlling it with python. I have a master script ...
1
vote
0answers
74 views

RF 433Mhz reciever not finding remotes

I'm having some trouble with my 433Mhz receiver on my pi. I first tried to read the signal my Nexa PET-910 and 433Mhz doorbell sent on the pi, but I could not get any usable data, just noise, or no ...
0
votes
1answer
18 views

Error installing rpi.gpio on minibian

I am new to raspberry pi and following a series of online tutorials. I installed minibian according to the tutorial. everything was working fine until I had to install rpi.gpio. I am getting the ...
2
votes
2answers
134 views

More Digital Inputs

I am working on a project where I need 50 Digital Input/Outputs. Each one of the 25 of the Digital Inputs will be connected to a small piece of metal, triggered by Capacitive Touch with a finger and ...
1
vote
1answer
379 views

I am using a RFID reader module MFRC522 with my raspberry pi but it is not working with python 3

I am using RFID reader module (MFRC522) with my raspberry pi and when I run the script with python 2 it works fine and reads the RFID tag but when I run it with python3 I get an error - No Module ...
5
votes
1answer
68 views

Is there a GPIO current limit function available, and where is the documentation?

I have read that limits may be programmed for the output current of GPIO pins. However, after reading several online versions of Broadcom's data sheet for the SoC, I've found nothing to corroborate ...