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
1
vote
2answers
953 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 ...
0
votes
0answers
14 views

Is it possible to consistently apply voltage to two or more devices?

I want to connect two or more of the following actuators to my raspberry pi: https://www.ebay.com/itm/Nano-Magnetic-Actuator-diy-micro-plane-model-servo-micro-actuator-0-5g-/183745663278 However, ...
0
votes
1answer
14 views

Is it possible program GPIO PINs using Microsoft MakeCode?

It is possible to run Microsoft Make Code on a Raspberry Pi. But it looks like I can select a bunch of boards but not a Pi. Is it possible to program the GPIO pins on the Pi by running Make Code on ...
0
votes
3answers
5k 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
1k 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
862 views

How can I turn on/off LED of RPi.GPIO in the same number key?

I am trying to write the following program (8Relay.py) using python on the Raspberry Pi. I want to use the input from a GPIO pin to turn an LED on or off, depending on what input was pressed (1~8). ...
4
votes
2answers
7k 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
38 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
1answer
35 views

Turn On/Off 3D printer projector with Python/GPIO

There are similar questions but I don't want to turn on the LED but the 3D printer projector(NQM Plus Light engine) for the image projection. The pins that I wanted to use are shown in the picture. ...
0
votes
2answers
1k views

Unable to read the RS232 attached GPIO pins the same way as USB serial port on Pi3

I maybe new to this, but I have the following configuration in place. Step 1: (Device 1){RS232}<=======(RS232 to USB cable)=======>{USB}(Pi) I have an RS232 to USB cable attached to the USB port ...
1
vote
1answer
4k views

How to start and stop python script using button

I've written some python code that should start and stop another python script (Datalogger) when a button is pressed. So when the Pi is booted up I'm wanting the button script to run and then once I ...
1
vote
1answer
846 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 ...
3
votes
1answer
51 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?
1
vote
0answers
146 views

How to connect ST7789 LCD to Raspberry Pi

I'm trying to connect to this LCD ( sry 4 japanese page:( use translate plz ) This monitor driver is ST7789, 7pins.[GND VCC SCL SDA RES DC BLK] And now I'm connecting to pi like this https://imgur....
3
votes
2answers
239 views

How to connect ST7789 LCD to SPI Bus 1 as 2nd screen?

I've been trying to get this ST7789 library working with the 240x240 1.3" display on the rpi0w Python lib https://github.com/solinnovay/Python_ST7789 So far I've set all the screen pins to the bcm ...
0
votes
0answers
22 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 ...
1
vote
3answers
125 views

How Can Rpi3B+ Detect MQ9 Gas Sensor's Carbon Monoxide Leakage, Without Using ADC?

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? ...
0
votes
0answers
25 views

Timed trigger for GPIO input

I'm running a raspberry pi system that records fish as they swim passed an IR break beam sensor at a fish ladder. So far the system works well but I'm trying to cut down some of the false triggers. ...
0
votes
1answer
52 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 ...
2
votes
0answers
23 views

PWM on pump not working as expected

I am attempting to run a PWM on a pump using rpi.GPIO using the following code: def run_PWM_on_pump(): gpio.setmode(gpio.BOARD) gpio.setup(8, gpio.OUT) p = gpio.PWM(8, 0.5) #also works at ...
1
vote
1answer
36 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(...
1
vote
1answer
256 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
97 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 ...
0
votes
0answers
22 views

Module not found Error

I am working on rasberry3 pi b+ model for my project and I did installed NOOBS zip file and stored in Micro SD card and put in SD slot on Rasberry Pi b+. When i'm compiling my python code for my ...
0
votes
1answer
56 views

How to run cylonjs in Raspberry-pi

I am trying to run cylon framework. I installed it using these instructions. Now I am trying to execute this sample LED blinking program. var Cylon = require("cylon"); Cylon.robot({ connections: {...
4
votes
5answers
17k views

gpio library on windows while developing

I am new to Python so maybe this is not an appropriate question. I am working on a project on Python that will use GPIO functionalities of the raspberry Pi. Right now, I am developing the python code ...
0
votes
1answer
133 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 ...
3
votes
2answers
2k 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
88 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
1answer
324 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 ...
0
votes
0answers
40 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 ...
0
votes
1answer
28 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-...
1
vote
2answers
160 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 ...
2
votes
1answer
56 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
179 views

GPIO modes without breaking serial

I am using and Adafruit BNO055 IMU and using their provided modules to read the data, i have been able to do so. However i want to be able to turn some of the GPIO pins to high as i want to control ...
0
votes
1answer
44 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
167 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
55 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
453 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
332 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
1answer
133 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 ...
0
votes
1answer
508 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
60 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
113 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 ...
1
vote
1answer
473 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
976 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 ...
0
votes
0answers
26 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
0answers
60 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 ...
0
votes
1answer
612 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 - ...
1
vote
1answer
67 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 ...