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
5 views

Remotely controlling a raspberry pi gpio [duplicate]

I have developed a simple web application on Django framework which I plan to host on PythonAnywhere. My idea is to display the web application on the Pi browser and once the user interfaces it, I ...
-2
votes
1answer
22 views

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

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
20 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
18 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
43 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
33 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
55 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
64 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
26 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
50 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
19 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
64 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
51 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
43 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
52 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
22 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
34 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
34 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
198 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
101 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
167 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
34 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
47 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
48 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
66 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
86 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
49 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
1answer
66 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
69 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
46 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
17 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
108 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
213 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
60 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 ...
1
vote
0answers
56 views

MPR121 capacitive touch is sensible enough?

I have a Rapsberry Pi 3 A+ with an Adafruit Capacitive Touch HAT for Raspberry Pi (MPR121) and the idea is to plug it to the wet soil of a plant and it detects when I touch the plant (or a leaf) and ...
0
votes
0answers
23 views

Motor-Potientiometer read and write, additional power source

I want to get and set values for a motor potentioneter ALPS RK16812MG from a raspberry pi. I found a similar approach here however, the answers in that forum suggest a different wiring with an ...
1
vote
0answers
84 views

Interrupts with MCP23017 using the mcp23017 dtoverlay

I'm at my wits end with this one. Okay, so we've got an MCP23017 with its INTA wired to the Pi gpio12 (bcm) in /boot/config.txt dtoverlay=mcp23017,addr=0x20,gpiopin=12 so far so good. I'm looking ...
-1
votes
2answers
193 views

Control motors and servos simultaneously (Python)

I have a Raspberry Pi 2B+ and some knowledge of Python. I need to control a DC motor, two servos and a LED simultaneously. The requirements are: Must control two servos, a LED and at least 1 DC ...
1
vote
2answers
35 views

Channeling a single circuit into 6 possible circuits based on gpio pin signal

I basically want a single input relay, with 6 outputs, that switches to any of the 6 outputs based on the gpio signal, if that makes sense. So the gpio signal would send a signal like 1-6 in binary ...
0
votes
0answers
44 views

trying to rotate 28BYJ48 and 2 NEMA17 stepper motors simultaneously but the rpi reboots each time

I am trying to control a 28BYJ48 stepper(Driver ULN2003AN) and 2 stepper motors NEMA17(A4998). I wrote the code using python using PIGPIO but the rpi turns off every time I try to run the code. I ...
2
votes
2answers
253 views

Safe power supply through GPIO pins

I'm designing a HAT and need to supply power to PI zero W and PI 3B+ through the GPIO headers[2&4]. The supply would regulated at 5V 4A (Would be sharing the same power supply with a Thermal ...
0
votes
1answer
83 views

enable software i2c on raspberry pi gpio

I am trying to interface more than one sensor with Raspberry Pi Zero W, which communicate using i2c interface. So far I am able to connect sensor to dedicated i2c and read the data. Want to know ...
0
votes
0answers
89 views

GPIO number vs Pin number. Which to use?

I am writing a code for an ultrasonic distance sensor. The code worked fine when i used the gpio numbering system for the wires connecting to the gpios and sensor. As soon as i connected the sensor to ...
0
votes
1answer
60 views

How can I use the RPI3 to generate a sawtooth with frequency around 20kHz?

I am trying to generate a sawtooth waveform from the GPIO, the frequency is high, 20 Khz. is pigpio library my best option?
1
vote
1answer
350 views

Runtime Warning: This channel is already in use

I am writing a code for Ultrasonic distance sensor. I have wired all the things perfectly and written the code for it but somehow it gives a runtime error of the channel already being in use. Below is ...
0
votes
0answers
77 views

Multiple raspberry pi's 3 synchronized image navigation

We have 7 raspberry pi's 3, each connected to the internet and an display. On each screen / raspberry pi is geeqie (image viewer_ running with an image slideshow. The goal is to have all raspberry pi'...
0
votes
0answers
41 views

raspberry pi and ltc 2873 cufd (RS 232 and RS 485)

I have a raspberry pi compute module 3 on an I/O board in which gpio 12 is contolling the mode in ltc 2873. If it is ground it will be working in the RS 232 mode. so if I have to write something into ...
0
votes
1answer
47 views

Help needed with GPIO and a remote controlled gate relay switch

I am very confused and hoping someone can point me in the right direction. What I would like to achieve is converting an external relay switch (from a normal everyday gate receiver) into a signal ...
-1
votes
3answers
111 views

How can i Get 5 Volt output with GPIO

I am using Raspberry Pi 3 B+ and I want to run a 5 volt DC motor with RPi.GPIO, I have written a code: import RPi.GPIO as GPIO from pip._vendor.distlib.compat import raw_input u = raw_input('how ...
0
votes
0answers
72 views

Multiple GPIO.add_event_detect callbacks results in incorrect expected output

I am currently working with a differential drive robot which has two wheel encoders connected to GPIO Pins 5 and 23. I managed to obtain velocity information based on the pulse time information ...