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.

116 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
1
vote
0answers
684 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
302 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
2k 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
26 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
25 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 ...
0
votes
0answers
29 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

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
0answers
58 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
169 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
1answer
32 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-...
0
votes
0answers
74 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
43 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
95 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
67 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
209 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
108 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
81 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
122 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
449 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
2answers
107 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
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
0answers
346 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
41 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
716 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
58 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
53 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
346 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
62 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
349 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
84 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
497 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
1answer
352 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 ...
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 ...
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
0answers
1k views

Failing to turn on a LED with GPIO Pins (Raspberry Pi 3 B V1.2)

I'm trying to play around with my RaspberryPi a bit and I'm failing miserably... ANY help ist highly appreciated! I'm on a brand new installation of Raspbian, after "apt-get update && apt-get ...
0
votes
0answers
252 views

ESC PWM Duty Cycle between 20 - 70

I've wired my ESC and my Motor and I'm able to spin it at different speeds, but it only works between 20 - 70 DutyCycle. How can I make it start spinning at 1 and max throttle at 100? I'm using ...
0
votes
0answers
252 views

Playing audio mess with GPIO.add_event_detect in Python

I have these lines of code running in Python on my Pi 3: os.system('mpg123 -q /usr/local/marbik/public/evilcave.mp3 &') GPIO.add_event_detect(17, GPIO.FALLING, callback=GPIO17Callback, bouncetime=...
0
votes
0answers
112 views

GPIO pin being set to input upon exiting program

I have this code: import RPi.GPIO as GPIO import time try: GPIO.setmode(GPIO.BOARD) GPIO.setup(3, GPIO.OUT) GPIO.setup(12, GPIO.OUT) GPIO.output(...
0
votes
0answers
295 views

RPi.GPIO is never reachable after upgrade to Python3

yesterday I run an install of Python3 on my Raspberry Pi 3. The preinstalled Python version was 2.7.1 If I run a scrip now, i reveive the following error message: import RPi.GPIO Traceback (most ...
0
votes
0answers
175 views

Unable to set GPIO.HIGH. GPIO.LOW

I am trying to control a relay with Pi3B. Whenever I run GPIO.setup(port, GPIO.OUT) my relay starts working, then any other command I try, eg. GPIO.output(port, GPIO.HIGH) or GPIO.output(port, GPIO....
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: {...
0
votes
0answers
28 views

HDMI output is off once I connected my pi to an oscillscope

I connected the +5v and gnd of my raspberry pi to an oscilloscope. Once I did that, my screen gave me a blank screen as if it is not getting any output from HDMI of raspberry pi. I turned off/on the ...
0
votes
0answers
101 views

PIR sensor GPIO

[CIrcuit1By default PIR input pin(middle) is HIGH. When i run the below code, gp.input(27) always gives me value 1. My code: import RPi.GPIO as gp import time gp.setmode(gp.BCM) gp.setup(2, gp.OUT) ...
0
votes
1answer
461 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) ...
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
0answers
211 views

Why after adding GPIO.cleanup to my code it still show the GPIO channel warning?

I wrote some python to blink a led. Without the GPIO.cleanup method, I had the following warning: "This channel is already in use, continuing anyway". Then I did tempo=1 import RPi.GPIO as GPIO ...