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
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 ...
2
votes
1answer
6k views

How to set a GPIO pin to default HIGH before setting it to output?

I have a raspberry pi connected to a Sainsmart 4-channel relay, where each relay is activated by a LOW signal. When I set a GPIO pin to output, it defaults to LOW, which of course activates the ...
1
vote
2answers
937 views

I2C Send Start Stop Commands using Python

I'm using a PCA9585 board with an I2C interface to control LED lights. I can control each LED separately or control them all at the same time. What I would like to accomplish is to program multiple ...
-2
votes
1answer
641 views

GPIO pins available for switches

Among all the 40 GPIO pins, how many of them are available to connect a switch for on-off information? I counted more than 24 GPIO_* connections here, but are they all available via Python? import ...
2
votes
2answers
1k views

pull up resistors from rpi-gpio.js

I want to use the internall pull down resistor. In python the setup method accepts a parameter for that, like: GPIO.setup(18, GPIO.IN, pull_up_down=GPIO.PUD_UP) according the rpi-gpio.js ...
2
votes
3answers
2k views

Control Servo Using Raspberry Pi 3 But Not Moving

For the student project funbots(https://github.com/melvinma/funbots), we had some problems controlling a servo using PWM. We have limited tools to diagnose the issue and please kindly help. Setup: ...
3
votes
1answer
6k 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
8k 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
263 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
146 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
192 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
3k 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
315 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
2k 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
690 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
383 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
342 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
61 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
93 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
150 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
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
2answers
596 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
85 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
588 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
218 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
1k 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
321 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
5k 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
472 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
376 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
379 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
423 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
135 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
129 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
5k 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 ...
3
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
696 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
21 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
5k 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
259 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
929 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
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
326 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?
1
vote
1answer
538 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)?