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.

136 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
1
vote
0answers
163 views

Building MRAA for Java on Pi 2 B (raspbian)

i'm trying to use the MRAA lib to program the pins with java, but when I built the files, I can't find where the path was set, idealy it would be set on /usr/lib, but there's no mraa. Without it I can'...
1
vote
0answers
79 views

GPIO unexpected behaviour after 10 hours of running python script

I have a python script running as a service on Raspbian Jessie that watches for a button being pressed and lights an LED when it is done. Initially everything works as designed, however I have found ...
1
vote
0answers
571 views

starting and ending a script with a buttonpress

I'm trying to integrate a button into a simple alarm project of mine but am having trouble activating/deactivating the alarm with a button press. Using Raspberry Pi 2 - Raspbian Jessie My wiring is ...
1
vote
0answers
1k views

Image Processing With Windows IoT Core

I am a Newbie to Raspberry Pi Windows IoT core, I wanted to create a system to detect total number of Chairs/Tables present in a room for business, I researched a lot, I had a few sites stating that I ...
1
vote
0answers
308 views

Run brushless motor with esc

I have looked all over the internet on how to run a brushless motor with an esc through RPi.GPIO and have no results. I have tried simply wiring the esc as it is supposed to be and programming it ...
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
694 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
308 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
4k 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
27 views

Hardware Timed Servo PWM

I am working on a some time-critical system that will run image processing and controlling 4 SG90 servo motors. In short, I will do visual-servoing. In this topic, joan pointed out some library, ...
0
votes
0answers
15 views

ltp305 Dot Matrix Python Library not allowing me to use display.set_character()

I am trying to display a number on a Dot Matrix ltp305 display that increases with each button press, enabled by the pressing of a normal button connected to the GPIO. I am sure everything is ...
0
votes
1answer
62 views

RPi.GPIO: multiple buttons one callback function, ignore buttons while callback is executing

I have 4 buttons connected to my Raspberry Pi that call the same function when pressed. I'm using GPIO.add_event_detect to connect the buttons to the callback function. When one button press executes ...
0
votes
1answer
72 views

gpiozero button to raise SystemExit / gpiozero clash with GPIO.cleanup()

TL;DR: Since this is a long question I have the following problems: I'm looking for a good way to use gpiozero Button to raise SystemExit upon button press I have an imported module to drive an E-Ink ...
0
votes
1answer
146 views

PIR motion sensor HW-416-B does not behave properly. No motion but input is triggered regardless

So, this motion sensor works when it is taped to my desktop computer...but when I move it to the wall, specifically a higher spot on the wall, it just keeps giving back an input signal. So here is a ...
0
votes
0answers
16 views

How do I resolve import issues with multiple Python versions relative to PyCharm

I have searched everywhere for a beginner level understanding of how Raspbian/Ubuntu, etc. manages paths, which files I need to modify, how to use init.py, venv, etc. and it seems every time I install ...
0
votes
2answers
127 views

RPi.GPIO: Check if a pin is being used

During development, I frequently encounter this warning, as expected. My threaded code frequently prematurely terminates during experimentation. Steppers.py:26: RuntimeWarning: This channel is already ...
0
votes
0answers
36 views

How to set event handler for a GPIO in Mathematica for Raspbian

I wish to program my Raspberry Pi using Mathematica (rather than Python). One basic functionality easily done with Python is to set event handlers which triggers a function when some event is ...
0
votes
0answers
47 views

MAX98357A Adafruit amplifier no output

I'm trying to connect the MAX98357A Adafruit board to a rpi Zero W. I've followed their documentation for installing and testing it. The installation went ok with no errors but at the test i got no ...
0
votes
0answers
13 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
0answers
36 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
995 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
49 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
38 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
0answers
68 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
58 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
1k 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
45 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
47 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
33 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
22 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
267 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
0answers
31 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
73 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
615 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
156 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
180 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
316 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
888 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
279 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
517 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
45 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
70 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
0answers
73 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
479 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
98 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
0answers
2k 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
2k 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 ...