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

Cannot get Pi to detect button release?

I can detect the button press no problem but I also need the release. I am using this button. I have connected it using these. It is connected to GPIO19 (the third-from-last pair of pins (lengthwise ...
3
votes
2answers
8k 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
2answers
1k views

pull up resistors from rpi-gpio.js

I want to use the internall pull down resistor. In python the setup method accepts a parameter for that, like: GPIO.setup(18, GPIO.IN, pull_up_down=GPIO.PUD_UP) according the rpi-gpio.js ...
1
vote
1answer
302 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
votes
1answer
35 views

Arduino to Pi reads high all the time [closed]

I'm trying to read a signal coming from an Arduino through a wire attached to pin 24 of the Pi. The problem is the Pi reads high all the time. I tried to do a pull up using GPIO.setup(24,GPIO.IN, ...
0
votes
2answers
522 views

RPi.GPIO not working at all

I have just started with the GPIO on my raspberry pi but can't get any of the code to work. import RPi.GPIO as GPIO import time GPIO.setmode(GPIO.BCM) GPIO.setwarnings(False) GPIO.setup(18,GPIO.OUT) ...
1
vote
1answer
628 views

Raspberry Pi 3 with Feetech FS90R servo

Currently I have a very basic setup where I have a FS90R continuous servo running on a my Raspberry Pi 3 using Windows IoT and a C# based application. I'm trying to get the servo to pin using the ...
0
votes
1answer
1k 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 ...
4
votes
2answers
16k 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. ...
0
votes
0answers
12 views

RPI Stops Reading Micro SD Card If I Plugin PI Fans before it and Vice-versa

facing issues with the heat sink casing that I bought it got 2 fans. So, if I connect the fans before the boot RPI doesn't read the micro SD card and no green light. But, if I remove the fans ...
0
votes
1answer
36 views

Two unrelated GPIO scripts interfere with each other

I have two completely seperate python scripts involving the GPIO that runs on startup. The issue i'm having is that when I call the turn fan on or off it sometimes triggers the halt script I have and ...
1
vote
1answer
2k views

Why is HC-SR501 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
1answer
715 views

Raspberry Pi - Press for on / Press for off switch

I've begun tinkering with using electronics and am also new to using Python. I was wondering if someone could help me please? What I'm trying to achieve is to use an on/off switch to run a motor - ...
0
votes
3answers
173 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
115 views

speaker and mic with Raspberry pi 4

I'm making a project, a surveillance camera with audio. Live feed from my localhost webpage. the live camera part is now okay and working, my problem is the "intercom" part. I don't really ...
0
votes
1answer
196 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 ...
0
votes
0answers
31 views

Can a threaded callback function modifying pins with interrupt detection in the main thread lead to an infinite loop?

I'm using RPi.GPIO and making a switch matrix which waits for rising or falling edges caused by switch toggles in the rows, triggering a scan of all the switches. I have one interrupt for each row, so ...
1
vote
1answer
2k 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 ...
2
votes
1answer
72 views

GPIO inputs don't work on Raspberry 4 running Ubuntu

I have several RasPIs set up with Ubuntu Server 18.04 64Bit. One freshly setup up RasPIs 3B+ and two 4Bs. On all I can run the following minimum script without any error messages: #!/usr/bin/env ...
0
votes
1answer
59 views

How to clean up gpio pins properly?

I'm a newbie with Raspberry Pi as well in python and node red. So my goal with my project is to make a DIY irrigation systemm. I have an RPi, which reads value from the soil moisture sensor and ...
-2
votes
1answer
31 views

How do I connect my 24 pin fpc to dip breakout board to my rpi zero w?

So I am working on a type of headset and I bought the adafruit 1.3 ips with 24 pin fpc connector and st7789 driver and I'm thinking of using a breakout board to do it. What I don't know is the pin out ...
0
votes
0answers
77 views

Powering capacitive soil moisture sensor from 5V Pin

I'm completely new to RPi, and I'd like to make a garden project, at first I would like to measure the soil moisture. I purchased one of these sensors https://www.amazon.com/Analog-Capacitive-Moisture-...
0
votes
3answers
6k views

Error installing RPI.gpio

I'm a new enthusiast trying to learn with raspberry pi so I apologize if I don't use the correct programming terms... The problem that i'm having at the moment is that when I try pip install rpi-gpio ...
0
votes
1answer
2k 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()...
3
votes
1answer
281 views

Sending a binary data stream to a GPIO at a certain frequency

I would like to send a random binary data sequence to a rpi GPIO at a particular frequency and then read the data stream off a scope. Is there a way of implementing this through python?
0
votes
1answer
61 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 ...
0
votes
2answers
111 views

PWM issues with pigpio and RPi.GPIO

I am using Pi Zero W with latest Raspberry Pi OS. I have a backlight of an LCD that I am trying to control via PWM. If I use RPi.GPIO I get flicker at anything other that 100% (or 0%) duty cycle. As ...
0
votes
0answers
47 views

I2C, SPI and Python Libraries with Raspberry Pi 4b

I've been working with RPi.GPIO so far but I have had issues with PWM and edge detection, which are well known issues with RPi.GPIO, anyway, after some research I'm considering using a different ...
0
votes
1answer
53 views

How to make more efficient reading of GPIO

My (python) program (on Raspberry Pi zero W) turns on/off a GPIO pin (connected to a relay module) depending on the RSSI signal of my phone (connected via bluetooth) and the status of one more GPIO ...
16
votes
4answers
93k views

How to correctly install the python RPi.GPIO library

I downloaded RPi.GPIO 5.3a from here: https://pypi.python.org/pypi/RPi.GPIO I extracted the tar file, cd into the folder and ran: sudo python setup.py install It ran through a bunch of stuff and ...
1
vote
0answers
35 views

PIR sensor always high with Raspberry Pi3 without breadboard

I have a HCSR501 PIR motion sensor, which has 3 pins (Vcc, Out, Gnd) that I've connected to 5V, GPIO 26, and Gnd respectively. Despite following all the steps in tutorials for interfacing the sensor, ...
0
votes
0answers
36 views

Using a port expander AND other GPIO pins

I'm working with a port expander for the pi to run four stepper motors from python. It was working great until I tried to also use a GPIO pin on the pi (not on the port expander) as an output. I was ...
1
vote
2answers
679 views

GPIO Inputs Update Priority

What I'm wondering what is the update rate of each GPIO when used as inputs. What I'm actually doing with the Raspberry PI 3 is a pulse counter. I basically have 7 GPIOs set up as inputs and ...
0
votes
1answer
65 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
87 views

function to wait for any of the buttons press

I'm working on a project that use four buttons to navigate in a menu. The root options of the menu have nested options etc. The buttons don't have hardware de-bouncing. My ultimate objective is to ...
3
votes
2answers
5k 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
45 views

GPIO.input(24) is coming back True when it shouldn't be (false button presses)

I have a button in a working circuit. Within sys/class/gpio/gpio24, value changes properly (it becomes 1 when pressed down, 0 otherwise). When I use GPIO.setup(24, GPIO.IN) within python, GPIO.input(...
0
votes
1answer
28 views

Not getting a full 3.3V instead getting like 0.7V on a GPIO pin

Okay so I ran the following code and I am seeing ~0.70V on the GPIO pin and not 3.3V. Why could that be? #import the GPIO and time package import RPi.GPIO as GPIO import time GPIO.setmode(GPIO.BCM) ...
0
votes
2answers
82 views

Using PWM with RPi.GPIO in Python

Scenario: I want to control a PC fan using the Raspberry Pi. The 4-wire-fan (MGT9212UR-W25) has its own power supply (12V) and can be controled via PWM. I would like to control it with a Python script ...
1
vote
1answer
1k views

Raspberry Pi 3 GPIO pins always active

Wiring setup for Rpi: I have an rpi 3, and I've recently started experimenting with the GPIO side of things. I'm new to electronics in general, although I do computer programming regularly. I have a ...
0
votes
2answers
46 views

RPi.GPIO Cleanup() only specific pins?

Im using the Pi to control some relays, that in turn switch some light bulbs. some code for clarification: def do_work(job): try: duration = int(job.Duration) gpioPort = int(job....
1
vote
1answer
34 views

Can Rpi GPIO pins be used to drive a DC motor? [closed]

I tried to GPIO pin to high and I cannot see output voltage. I try every solution but no one works for me. import RPi.GPIO as g g.setmode(g.BOARD) g.setup(16, g.OUT) g.output(16, g.HIGH) I look GPIO ...
0
votes
1answer
705 views

Frequent 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
2answers
27 views

using RPI 3.3v and 5v pins as reference for level shifter [closed]

As the title says, simply, can I use the 3.3v and 5v power pins on the GPIO connector as the reference voltages for a level shifter, or do I need some other reference?
0
votes
0answers
28 views

Raspberry Pi3 - Controlling 4 DC motors

I need to feed 4 DC motors of 5V on my Raspberry Pi 3 Model B using PWM (Pulse Width Modulation). Currently, I have the next components: 2 NPM transistors, 1 L293D integrated circuit, resistors (220 ...
0
votes
1answer
332 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
1answer
38 views

PWM problem in a frequency less than 100Hz

I have attached a fan to pin #17 (through a transistor of course) and am writing a script to turn the fan on for a specified duration with a specified PWM duty. #!/usr/bin/env python import os ...
1
vote
1answer
507 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 ...
4
votes
3answers
4k views

Raspberry Pi camera doesn't work only displays red light

When I run my code, I get this error: No data received from sensor. Check all connections, including the Sunny one on the camera board The red light on the camera module glows, but doesn't ...
1
vote
3answers
464 views

How Can Rpi3B+ read MQ9 Gas Sensor?

I already have bmp180 sensor connected to raspberry pi 3b+, now I want to add MQ9 sensor like this https://e-radionica.com/en/mq9-gas-sensor.html Is connection straight forward like the bmp180? ...

1
2 3 4 5
13