We’re rewarding the question askers & reputations are being recalculated! Read more.

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
12
votes
2answers
30k views

Controlling many LEDs with few GPIO pins

I successfully completed my hardware "hello world" using this guide: http://www.raspberrypi-spy.co.uk/2012/06/control-led-using-gpio-output-pin/ Now I'd like to move on to bigger and brighter things,...
18
votes
3answers
24k views

Why are some GPIO pins HIGH when the Raspberry Pi boots up?

I have an easy circuit wired up, with an LED connected to pin 18 on the BOARD reference. I run a simple program to put pin 18 to HIGH, which turns the LED on, and then a couple of seconds later, I set ...
131
votes
1answer
322k views

What is the difference between BOARD and BCM for GPIO pin numbering?

When using the RPi.GPIO library in Python you have to call import RPi.GPIO as GPIO and then GPIO.setmode(GPIO.BOARD) or GPIO.setmode(GPIO.BCM) What is the difference between these two options?
40
votes
4answers
57k views

Can I use Raspberry Pi in commercial production?

I'm quite new to Raspberry Pi. I recently started hacking my new RPI with raspbian and working on a video streaming project. I finished my prototype and things are ready for production. RPI is ...
15
votes
4answers
14k views

How can I use more GPIO ports on the Raspberry Pi?

I am currently planning a project for a course at school which involves using the Raspberry Pi - however I'm worried that I will not have enough GPIO connectors for the inputs and outputs that I will ...
16
votes
7answers
43k views

Getting more than 26 GPIO pins

I would like to be able to output 75 digital out signals from the Raspberry Pi. However it has only 26 GPIO pins. Precise timing is not critical as long as it is within 1 second. I need to be able ...
1
vote
1answer
2k views

Touchscreen drivers disable GPIO interface in Python

I'm working on a raspberry pi (2B) project that is using a Waveshare 7" LCD Capacitive touchscreen that interfaces with the raspberry pi through HDMI (display) and USB (touchscreen). The ...
4
votes
3answers
4k views

I am getting ghosting/bouncing on my digital input

I am meassuring data pulses from my electrical meter, giving me one pulse per Watt used. I have 4 electrical meters connected to my Raspberry Pi model B. I have connected them directly like this (no ...
2
votes
2answers
138 views

More Digital Inputs

I am working on a project where I need 50 Digital Input/Outputs. Each one of the 25 of the Digital Inputs will be connected to a small piece of metal, triggered by Capacitive Touch with a finger and ...
-1
votes
1answer
90 views

Sg 5010 servo 360 degree modification not working [closed]

As per the video tutorials out there, I opened the motor, took out the potentiometer and measured its resistance at max. Its a b5k pot so it measured 5kohm I put 2.5k ohm from each pin (s and -) and ...
4
votes
2answers
30k views

GPIO: Warning Channel already in use

gpio.py:5: RuntimeWarning: This channel is already in use, continuing anyway. Use GPIO.setwarnings(False) to disable warnings. GPIO.setup(8, GPIO.OUT) That is what I get after I run: import RPi....
4
votes
3answers
50k views

PHP to execute Python scripts for GPIO

I found this code somewhere, that can execute Python scripts from PHP. I've installed apache2 on the Pi and I'm able to access the PHP script. But when I press the HTML buttons, nothing happens! :( ...
4
votes
3answers
18k views

Plug a 5 V fan to GPIO 1 and 2

Regarding to the following picture, I understand that I can plug a 5 V fan by plugging it in between pins 1 and 2. Is this right (+ on 1 and - on 2?)? My need: Plug a 5 V fan to run all the time the ...
3
votes
1answer
2k views

UART RX stops reading data after working correctly

I'm trying to read an continuous stream of data from my device (laser altimeter). The device is connected to the UART Rx pin of raspberry Pi 3B+. Everything works fine with this python code: import ...
3
votes
2answers
7k views

How fast can GPIO pins toggle?

I'm currently using Python's RPi.GPIO module to toggle some pins, and I want to know how quickly it can do this. I need the pins to be toggled on the schedule of a ~50 mhz FPGA clock, which I'm ...
2
votes
2answers
2k views

GPIO input connected to garage door button

I would like to connect the garage door's button to a GPIO input on my Pi. I want to be able to trigger actions when someone pushes the button. I am able to read the status of a basic switch using ...
3
votes
1answer
2k views

Security issues in PHP executing PYTHON scrips

So I've got a PHP script thats capable of executing Python commands (to control GPIO), thanks to the users of StackExchange. My previous question here. Now I'm able to control the GPIO pins from a ...
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.
2
votes
2answers
2k views

/sys/devices/virtual/gpio dissapears after installing RPi.GPIO on Archlinux ARM

...tinkered a bit with GPIO and Piface Digital. It was all ok until I had installed RPi.GPIO via pip. After that the directory /sys/devices/virtual/gpio disappeared and never showed up again. I had it ...
16
votes
2answers
17k views

What hardware do I need to turn Raspberry Pi into a TV remote controller?

I would like to control my TV using a Raspberry Pi. I would like my Raspberry Pi to act like a TV remote controller. What kind of hardware do I need to make it? Do I need something like IR emitter, ...
16
votes
3answers
83k views

How to correctly install the python RPi.GPIO library

I downloaded RPi.GPIO 5.3a from here: https://pypi.python.org/pypi/RPi.GPIO I extracted the tar file, cd into the folder and ran: sudo python setup.py install It ran through a bunch of stuff and ...
6
votes
0answers
1k views

Running RPi on Solar Panel and battery [closed]

I’m quite new in electronic projects and so my basics are quite limited. I've been reading a lot regarding this topic (refer to the title) and I’m currently planning to buy the suitable Solar Panel, ...
4
votes
5answers
5k views

PiFM not working for me

I followed the steps found here & consulted this site. But I just get complete silence on 100.1 or other frequencies. No sound at all. Please tell me what it means. I really want to see & use ...
13
votes
4answers
6k views

How to include RPi.GPIO in a python CGI script with lighttpd?

I've recently setup python to work with lighttpd via CGI (see here). But the minute I go to include RPi.GPIO, the script stops executing (I'm assuming because no HTML gets output), but there is no ...
12
votes
5answers
14k views

Can I read the amount of light?

I'm not sure how to say it, but I would like to read the 'amount of light' with my Raspberry Pi. By the 'amount of light' I mean a number between 0 and 100 (for instance) where 0 is no light/dark and ...
7
votes
1answer
1k views

Raspberry Python Libraries

I am currently working with a Raspberry Pi (Model B+) and have some experience with Arduino (and it's derivates). Now, there are three Libs for GPIO access with Python for the Pi: WiringPi (...
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?
3
votes
2answers
5k views

PIR Sensor Consistent False Positives

So, I'm trying to set up my raspberry pi to take input from a PIR sensor in order to automatically turn on a monitor when it detects motion. If no motion has been detected in 60 seconds, the monitor ...
3
votes
1answer
869 views

RPi.GPIO mysteriously crashing when setting up pin

I'm trying to test the following simple "blink" RPi.GPIO Python script. import RPi.GPIO as GPIO LED_PIN = 18 # GPIO 18, (P1 pin 12) print 'A' GPIO.setmode(GPIO.BCM) # Broadcom pin-numbering scheme ...
2
votes
1answer
9k views

GPIO pin output stays high after setting to low

I'm working on a project in which I have to set a GPIO pin of the Raspberry Pi to high/low in order to signal a transponder which in turn communicates with a lock and opens it when it receives a high ...
4
votes
2answers
3k views

Raspberry Pi camera doesn't work only displays red light

When I run my code, I get this error: No data received from sensor. Check all connections, including the Sunny one on the camera board The red light on the camera module glows, but doesn't ...
3
votes
3answers
7k views

Multiple Callbacks from GPIO interrupt

I created a quick program that uses the GPIO library to create an interrupt with a callback that is initiated when a (pink) button is pressed. It works, but when the button is pressed and then ...
3
votes
1answer
1k views

Raspberry Pi IR Sensor stays HIGH when it shouldn't

I have a Raspberry Pi that has an IR sensor on it, and a Arduino that has IR LEDs hooked up to it. I am sensing when something is put into a box, but not when the item is taken out (callChris() is ...
2
votes
1answer
6k views

How to initialize an ESC with Python code [duplicate]

I can't make my brushless motor move; it kepps on beeping. I have connected it to an electronic speed control (ESC) and am trying to signal the ESC from the GPIO pins of Raspberry pi B+. How do I ...
1
vote
3answers
8k views

To Access the gpios from webpage by executing python code

I'm a student in electronics department doing a project on home automation using Raspberry Pi (for bulbs, fan, temperature and camera). I want to access the GPIO pins from a web interface to execute ...
0
votes
1answer
182 views

How to know which revision the rpi board belongs to using c language program

I need to do some changes in my audio card driver on the raspberry pi board. What I need to do is: I have to check which model board it is and then I have to program the GPIO's based on the revision ...
0
votes
1answer
250 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 ...
5
votes
1answer
3k views

Can you connect multiple GPIO pins, to one ground pin?

I'm questioning whether connecting multiple GPIO pins (which to my knowledge are 3 volts), to one ground pin, is going to damage my Raspberry? I want to connect GPIO pins to breadboard, pass the ...
5
votes
3answers
4k views

Display IP Address on Character Based LCD

I need to know the IP address of my raspberry pi. I need to do this with a Character LCD display. So here's what I have done so far. I can display text on a HD44780 based 16x2 LCD connected to my ...
4
votes
1answer
8k views

Why can't I turn on an LED through Python?

I have an LED connected to pin 11 on the Raspberry Pi header, (also known as BCM/GPIO pin 17, and GPIO0). I have installed the Raspberry Pi Python library according to these instructions. Attempt 1 ...
3
votes
3answers
648 views

convert a pic to bit stream and write it to gpio

I am new to the Raspberry Pi and i would appreciate it if you could help me to get started. I need to build a serial communication system, and the first stage is to be able to take a file (lets say a ...
2
votes
2answers
138 views

How to connect ST7789 LCD to SPI Bus 1 as 2nd screen?

I've been trying to get this ST7789 library working with the 240x240 1.3" display on the rpi0w Python lib https://github.com/solinnovay/Python_ST7789 So far I've set all the screen pins to the bcm ...
2
votes
1answer
3k views

RPI B+ with connected servo is twitching

I am looking for some advice on how to properly get my servo working correctly. I have wired it up and it appears to be working correctly. The problem I have is with the signalling causing a twitching....
2
votes
1answer
2k views

GPIO general use pins stuck in HIGH position

I am trying to do "LED Blink" with GPIO and Python on my RPi B+. I am using my breakout board with a breadboard and am jumping pin 11 (GPIO 17) > resistor > LED > jump to pin 9 (GND). I am using the ...
2
votes
1answer
1k views

Write floats to gpio

I want to control an LED Strip via the gpio PIns of my Raspberry pi 2. I found some ways for example using Python or WiringPi. But I need to use "non absolute values" like "put Pin 0 to 0.2 and Pin 2 ...
2
votes
2answers
353 views

GPIO Display an Buttons dont work

i bought a pi 2 B last week with a ready to use 16x2 Display + Keyboard wich i pluged in the gpio pins. It looks exactly like this picture: When i start the pi, the background display lights up like ...
1
vote
1answer
136 views

same GPIO input signal on multiple raspberri's from one source

Im having 7 raspberri pi's 3 connected to 7 screens, running an python 2.7 app to download different images from google drive, every raspberry has different images. Geeqie is displaying those images ...
1
vote
1answer
702 views

Why is PIR motion Sensor always on?

I'm trying to make an alarm system but the motion sensor is always on as soon as the script is run. I've posted a question about a different problem i was having with this project so it'll confusing ...
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
1answer
590 views

SPI Communication with ADS7851

I'm currently trying to communicatie Raspberry Pi 2 B+ with ADS7851, an adc chip made from TI. ADS7851_DATASHEET I've done pretty much of research, but I'm still stuck on how to communicate in SPI ...