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
3
votes
1answer
7k views

Differences in GPIO between Raspberry Pi 2 B and 3 B

Is there any difference in the GPIO layout between Raspberry Pi 2 B and 3 B? If yes, please provide the differences.
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) ...
6
votes
2answers
9k views

Flow meter Raspberry circuit and problem receiving pulses

I am trying to connect a flow meter YF-S201 to Raspberry Pi B+. It has three wires --> Red -> 5V --> Blac -> Ground --> Yellow -> Signal I have a doubt with the cicuit, The flow meter works in 5V ...
3
votes
1answer
286 views

What is the license for RPi.GPIO?

I can't find a copy of the RPi.GPIO python package license. PyPi suggests there is one but can't point me to it. Does anyone know where to find a copy of the license?
-1
votes
1answer
162 views

Want to close garage door if it's been open for X minutes

I've followed a youtube tutorial on configuring a rPi with a magnetic reed switch and relay switch to allow for my garage door to be opened and closed via Homekit on my iPhone. It works great. The ...
1
vote
1answer
214 views

3 pin 801s sensor

I plan to use the following guide with a Pi 1 B+ and 2 801s vibration sensors. https://github.com/Shmoopty/rpi-appliance-monitor/blob/master/README.md However, their example uses a 4 pin 801s whilst ...
1
vote
1answer
4k views

How to write string and variables on LCD with lcd_string

I'm trying to write a simple string on the first line of a LCD screen just using the standard GPIO library and so far I can't figure out how to print a string and a variable on the same line with ...
1
vote
0answers
351 views

GPIO.wait_for_edge misbehaving in a loop

I have square signal attached to the pin 23 and am running the following code to detect how long does the pulse width last: import RPi.GPIO as GPIO import time SENSOR_PIN = 23 GPIO.setmode(GPIO.BCM)...
0
votes
3answers
3k views

Raspberry Pi and RF module MX-RM-5V power through gpio and noise?

i have a tiny RF 433mHz project with my Raspberry Pi 3 Model B v1.2 and Arduino Pro mini. My Raspberry works as a receiver and Pro mini as a transmitter. I have wiried the popular RF receiver MX-RM-...
0
votes
1answer
801 views

Python controlled LCD and Button

I'm trying to use a button to scroll through messages on an LCD display. I got a kit from Amazon which has a whole bunch of buttons, sensors, LEDs, etc. It also came with code to do various projects, ...
0
votes
1answer
435 views

Save TTL pulse input time while recording video from Raspicam

I am recording video using Raspicam and saving the video buffer as well as timestamp for each frame using the following script: import io import time import datetime as dt from picamera import ...
1
vote
0answers
364 views

Why did my Raspberry pi blow up?

Thanks in advance for reading guys. Last night I set up a circuit to see if I could heat up a resistor to about 60(ish) degrees C but do it with the resistor part of the circuit on paper. This ...
0
votes
2answers
63 views

RPi.GPIO python code fails only in .py file

I am trying to control a servo with RPi.GPIO import RPi.GPIO as G G.setmode(G.BOARD) G.setup(5, G.OUT) p = G.PWM(5, 60) p.start(7) p.ChangeDutyCycle(50) p.stop() G.cleanup() When I run sudo python ...
1
vote
2answers
103 views

Simulating two wires touching

I found this motor from an old piece of equipment. When a button is pressed, the battery powered motor turns on. When I took apart the button, its functionality was to make two metal plates touch each ...
4
votes
2answers
2k views

Compute module 3 ttyAMA0

just got my hands on the new CM3, flashed a fresh raspbian image on it and noticed ttyAMA0 is not there (it has been used for bluetooth since raspberry pi 3). the only way to get it back is to change /...
0
votes
1answer
163 views

What is this servo to Pi connector?

I'm trying to connect this servo to my RPi3 with as little wire as possible. What is this red, black, green wire called that allows me to connect a servo to my Pi?
0
votes
2answers
2k 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
2answers
659 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 ...
1
vote
1answer
86 views

Getting a LED to light with a push switch, using a raspberry pi and breadboard

I am having some problems getting my LED to light properly. I am using a push switch. What is happening is that when I run the code, the LED starts on, and when I press the button, it turns off. ...
0
votes
2answers
715 views

Getting NMEA string from GPS module to your Raspberry PI B+ [duplicate]

I would like to ask if it possible to get NMEA code/string from a GPS module that connected to one of the GPIO of a Raspberry?
0
votes
1answer
222 views

Rpi not catching all GPIO Inputs

I'm currently using a RPI2 b running linux to check for when a pulse is received from an arduino (3.3v). Something to note is that I'm also reading data from uart and writing it to a file at the same ...
4
votes
1answer
2k views

Failed RPi.GPIO installation on OS X

I am creating a server for the Raspberry Pi and I am partially writing the code using OS X. I need the RPi.GPIO module to make my script run, (even if I don't use it). After calling pip3 install RPi....
3
votes
1answer
2k views

I can't get RPI.GPIO working

I have just gotten a raspberry pi 3 model b for x-mas. In a short time I have come a long way. In a python script that I am making, I need to control two buttons (sense what one is pressed) so button....
1
vote
1answer
338 views

Stepper Motor Trouble

I have the 28BYJ-48 stepper motor, and I simply want to make it move forward or backward to make a robot car with RPi. I tried many of the sample codes in the internet, but the motor is not really ...
5
votes
1answer
6k views

Can we use other GPIO pins as I2C

I would like to connect multiple I2C devices to my Raspberry Pi. Can I do that? What do i need to take care? Also is there any library which will output I2C on other GPIOs?
0
votes
1answer
502 views

npm rpi-gpio installation failed with multiple error messages, why?

I'm using Raspberry Pi model b Type 3 with ARM7 processor. I checked the internet connection, and i tried to install the npm rpi-gpio multiple times even after restarting the pi. I'm using Raspbian ...
2
votes
0answers
410 views

Can't Set/reset GPIO pins using nodejs, why?

I'm using Raspberry Pi model B Type 2 with ARM6 and Type 3 with ARM7. I have tested this code several times and after a week, when I tried, it is not working. Below is my node js program: var ...
1
vote
1answer
420 views

pigpio Python module doesn't always set GPIO pin modes for SPI

I am using the pigpio Python module's SPI functionality as a master (communicating with an external SPI slave). In the same Python script I'm also using my own bit-banged SPI driver on the same pins (...
2
votes
1answer
448 views

I Can't Getr my PN532 NFC Module to work with Raspberry PI2

I have a Raspberry PI 2 and a PN532 NFC Module, but I can't read it I keep getting this errors when I run nfc-list: error libnfc.driver.pn532_spi Unable to wait for SPI data. (RX) ...
-1
votes
1answer
136 views

RPI GPIO Ports default on?

My LEDS connected to ports CE1 and CE0 are automatically on at startup. Is this normal? I have included a code that turns them all off when I run the script.
-1
votes
1answer
136 views

LEDS Connected to GPIO [duplicate]

How many LEDS can be connected and ON at once to the RPI GPIO without burning out the system?
4
votes
2answers
6k views

Getting feedback from a hall sensor with Raspberry Pi

This is my first Raspberry Pi project and I'm a Python newb. I've got a geared motor + driver + separate power supply (for the geared motor) + hall sensor. I know the "physics" and the way ...
4
votes
1answer
1k views

Trouble using spidev after RPi.GPIO

I'm using a Pi 3B to interface with an SPI device. My program is written in Python 2, the Pi is the SPI master and the external device is the slave. I am using both the spidev module and the RPi.GPIO ...
2
votes
1answer
813 views

How to make loop movement of a servo?

how to make a loop movement of 6 servos controlled by pots, while pressing the button saves the movement once pulled out the loop start. #!/usr/bin/env python # servo_pot.py # 2016-07-25 # Public ...
1
vote
0answers
22 views

Is the Raspberry pi the best choice for my 24V compressor IoT project? [duplicate]

I am building and outdoor IoT refrigerated mailbox with a DC 24V compressor with few sensors like (temp, approximately, LED lights, LED Screen). I'll be controlling the 24VDC compressor power supply ...
0
votes
2answers
6k views

RPi.GPIO not found in virtual environment

I'm working on a python project based on OpenCV .. after installing the opencv from this link : http://www.pyimagesearch.com/2016/04/18/install-guide-raspberry-pi-3-raspbian-jessie-opencv-3/ And ...
0
votes
1answer
289 views

GPIO outputs not changing on specific GPIO ports

I'm using a Rpi B rev2 and I'm having problems changing the output of ports 2,3,4,5,6 (BCM). All the other ports work perfectly. I searched for documentation and I see the only thing that sets these ...
0
votes
1answer
2k views

Control GPIO pin from multiple python scripts using RPi.GPIO

I have two python scripts to control an output pin in my RPi 3. The first is an interrupt service that scans a button, the second is triggered from the shell. I want to be able to run both ...
2
votes
0answers
970 views

Is it possible to have 5V output from a GPIO pin? [duplicate]

I want to make a small rc car using the raspberry pi. I tested the 3.3V and 5V output for the motor and of course I'd really prefer the 5V output, it is much faster. From what I read, the GPIO pins ...
0
votes
3answers
2k views

How to disable I2C pins in Raspberry Pi 3 (jessie)

I need to use the SDA and SCL pins in the GPIO headers. How do I convert them to normal GPIO pins?
1
vote
0answers
87 views

Is it possible to change boot state for gpio in windows iot core

is it possible to change the initial boot state of the gpio pins using windows 10 iot core? Per the documentation, by default 2-8 are pullup, and 9-27 are pulldown. I'd like to change it so more are ...
0
votes
2answers
498 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
346 views

Is there any way to add electret microphone on raspberry-pi zero?If yes then how?

Is there any way to add an electret microphone on pi-zero?
2
votes
1answer
597 views

Can I solder the Pi-zero hardware on its back side? If Yes then How and what are the effects on it?

I am working on raspberry pi zero 1.3 , I wanted to add a bluetooth 4.0 on its back side , So Is that possible with zero1.3 to solder on back side to add a hardware(BLE4.0)?
4
votes
1answer
781 views

PWM dc motor using L293D weak sound

This is the problem: using this tutorial and Adafruit_Python_GPIO libs when start pwm and step up with DutyCycle and frequency I hear a weak sound from motor but unfortunely it doesn't move. Wiring ...
3
votes
1answer
541 views

Is there any way to add a spy camera on raspberry pi zero through GPIO?

I have to add the spy camera on my pi zero 1.3 However, I'm just wondering, would it be possible to connect a camera module through GPIO? Pi Zero with a spy camera would be a cool thing :-)
0
votes
2answers
603 views

“Activating” a button upon other buttons being pressed

I'm working on some simple automation for a haunted house. The idea is to have 3 inputs (will be capacitive sensors, right now I'm using buttons), an led, a button, and a relay. When all three ...
0
votes
1answer
2k views

Setting up Sensiron SHT1x Humidity/Temperature probe

Other view of wiring I've been trying to set up the SHT10 sensor from adafruit.com and have been having problems. I think I have the sensor connected properly to my raspberry pi 3 through a ...
0
votes
1answer
521 views

Gpio pins are triggered even without input

Basically it hooks up to a 12v relay: https://drive.google.com/drive/u/0/folders/0BxdLxDCD6HidZDFfWHhjWEZHYVU If button is pressed, it should send high to the relay. The problem I encounter is ...
0
votes
2answers
2k views

RPi.GPIO library working in python 3.4 but not in python 2.7

I am using raspberry pi model 3. I was exploring RPi.GPIO library and I realized that the code shown below works in python 3.4 but not in python 2.7. The worst part is I am not getting any error ...

1
5 6
7
8 9
13