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.

130 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
1
vote
0answers
1k views

kernel Disabling IRQ #49

I am using the RPi_GPIO library in a python shell to read a raw wireless signal using the wait_for_edge() function in a loop like so: while True: GPIO.wait_for_edge(26, GPIO.RISING) print 'R' ...
1
vote
0answers
2k views

Raspberry Pi 2, Windows 10 IoT Core, 433Mhz Transciever

Anyone had any success receiving RF signals with any circuit board transceiver (like NRF24L01, RF1100SE, CC1101, etc) on a rPi2 with Windows 10 IoT Core? I had this working fine on rPi/python, but ...
1
vote
0answers
689 views

how to read from a GPIO pin when it changes?

I create an app that must detect when the lights(LEDs) changes their status (on->off or off->on) monitor this to a site.I create this app in client side with node.js and use rpi.GPIO package from here....
1
vote
0answers
305 views

Adafruit 16x2 RGB LCD scrolling down?

So I'm working on a little project to show a fortune on this 16x2 LCD. I've been successful so far, but when it came to longer fortunes, it would just cut off. How would I go about scrolling downwards ...
1
vote
1answer
3k 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 ...
0
votes
0answers
24 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 ...
0
votes
0answers
56 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
0answers
40 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
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 ...
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
71 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 ...
0
votes
0answers
42 views

Using a GPIO pin as output and input

Good morning everyone, i'm working in a project that involves having an state pin and button detection. The escenario is the following: when raspberry pi finish booting, a pin is pulled HIGH (this ...
0
votes
0answers
23 views

Remote GPIO on rpizero with Buster

I want to turn on a gpio output and receive input from a gpio input. This is all initiated from a webpage. I am making an ajax call to a php file which itself runs the python script. It does not work....
0
votes
0answers
18 views

Threading with GPIO and Push Buttons

I'm trying to loop some code in the main function of the program, while running a thread in the background that's listening for a button press through GPIO. I can see that the thread is running, ...
0
votes
0answers
226 views

pyaudio - Alsa warnings on Raspberry pi

I am trying to send data through 3.5mm jack. In that process, Everytime i'm getting these warnings import pyaudio p = pyaudio.PyAudio() The following warnings are: Expression '...
0
votes
0answers
26 views

Flashing of LED

This is my first post here so HELLO and sorry if I'm posting in the wrong place. I had assigned a time limit of 40s for led blinking. Can I pause the blinking of this led and make another led to blink ...
0
votes
0answers
79 views

Raspberry Pi connect to external RFID Module FDX-B/Animals

I have purchased an RFID reader which is supposed to be able to read implants that are in animals RFID https://www.ebay.com/itm/134-2K-AGV-RFID-Animal-Tag-Card-Reader-Module-TTL-FDX-B-ISO11784-85-...
0
votes
0answers
23 views

Ifconfig, interrupt device and enc28J60 spi1

Good morning I have configured and connected an enc28j60 card to the spi1 port of my raspberry pi3 and I have found the error in the photo that does not make the ethernet port work. I ask you for help ...
0
votes
0answers
24 views

Interrupt Servo once movement has initiated

I'm new to python and RPis. I'm building my own robot to learn. I manage to control my little robot and move it around, as well as moving the pan camera with my keyboard. While I was searching for a ...
0
votes
0answers
24 views

Why does EmulationStation block GPIO event loop?

I am working on a custom startup script for the Kintaro super kuma 9000 (link is down ATM) case for my raspberry pi 3B+ Here is the minimal example: import RPi.GPIO as GPIO import os import time ...
0
votes
0answers
27 views

Rpi 3b Simon Says Button Help

I'm just starting out with my pi and wanted a little project so I decided I'd try and create the game "Simon Says". I rigged up 4 buttons and 4 LEDs on a breadboard, etc. The aim of the game (for ...
0
votes
0answers
29 views

What happens if a GPIO “in” pin is accidentally configured as “out”?

I have a 433MHz receiver connected to a GIPO pin (which is configure as "IN"). I was wondering what happens if the GPIO is accidentally configured as "OUT" during reboot, shutdown, or when another ...
0
votes
0answers
20 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
0answers
34 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
0answers
166 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
316 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
27 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
143 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
59 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
182 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
28 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 ...
0
votes
0answers
71 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 ...
0
votes
0answers
362 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
0answers
125 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
126 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
0answers
161 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 ...
0
votes
0answers
632 views

Python script wait for button press before starting/stopping a separate python script

I've written a python script (shown below) which starts and stops another separate python script (datalogger) once a button is pressed. The datalogger script records logic levels (0 or 1) and stores ...
0
votes
3answers
161 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
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()...
0
votes
0answers
433 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 ...
0
votes
0answers
42 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
0answers
1k 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
62 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
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
0answers
64 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
0answers
408 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
91 views

python error from RPi.GPIO

Im getting an error "Error waiting for edge" In this script: import RPi.GPIO as io import time from picamera import PiCamera from datetime import datetime #PIR setup pir_pin = 4 io.setmode(io.BCM) ...
0
votes
1answer
680 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
0answers
1k views

Controlling a LED on a Raspberry Pi 3 with PHP

I want to control a LED using PHP on a Raspberry Pi 3 via web page. I have installed Raspbian on RPi 3. I have installed apache2 php5 libapache2-mod-php5 and the wiring Pi library. I can access my ...
0
votes
0answers
1k views

GPIO callbacks throw segmentation fault

I am using callbacks to sense obstacles in a small robot. A left sensor and a right sensor. Therefore I add an event twice. Now when the callback is called I remove the event and then later add it ...