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.

learn more… | top users | synonyms

0
votes
0answers
3 views

The Current in mA at 3.3 V When Using the Internal Pull-up Resistors

I'm using RPi.GPIO in Python 3. If I do GPIO.setup(24, GPIO.OUT, pull_up_down=GPIO.PUD_DOWN) GPIO.output(24, 1) will then a current flow internally from the pin to ground even if it is not connected? ...
0
votes
0answers
24 views

Gpio state can't be changed when connected to a DC motor or led

I am using the pi4j library to control the gpios on the raspberry pi B, but I ran in the following problem: when I start a pi4j example like ControlGpioExample.java then the led(with resistor 220 ohm) ...
0
votes
1answer
24 views

Rpi GPIO 40 warning channel is busy

When I try to toggle the Raspi pin no 40 using the code it gives me message RuntimeWarning : The channel is already in use, continuing anways and asks to disable warnings. Even after doing ...
0
votes
1answer
33 views

How to initialize an ESC with python code [duplicate]

Hello everyone I am a newbie to this,but i have a really important issue.I cant make my brushless motor move,it kepps on beeping. I have connected it to an ESC and is trying to signal the ESC from the ...
0
votes
1answer
19 views

GPIO Input fluctuating between high and low when no input is received

I've got a fairly simple circuit that I've made where a motion detector is connected to a Raspberry Pi B+ GPIO by way of a fairly long ~30ft stretch of wire. The detector is being powered by a 9V ...
1
vote
2answers
27 views

When i set the GPIO pin as output in my python cgi script, after that line my browser does not execute the cgi script. Why?

import RPi.GPIO as GPIO GPIO.setmode(GPIO.BOARD) GPIO.setwarnings(False) GPIO.setup(18, GPIO.OUT) print "<h1> line 4 </h1>" The above does not print line 4 in client's browser
0
votes
2answers
55 views

Python taking pictures with raspberry pi camera

I have written this code to take a picture when it detects motion however when I run the code it prints 'picture taken' but does not save the picture. I know my camera works as I tested it in LX ...
1
vote
1answer
43 views

Change GPIO pin mode to ALT with Python RPi.GPIO

I usually use RPi.GPIO module like this to set up the GPIO pins: import RPi.GPIO as GPIO GPIO.setmode(GPIO.BCM) GPIO.setup(18, GPIO.IN, pull_up_down=GPIO.PUD_UP) GPIO.setup(17, GPIO.IN, ...
0
votes
1answer
43 views

GPIO not working after installing the webiopi

I was doing programs with LED's and the GPIO after I installed the Webiopi to access it from the internet it didnt work anymore, I tried installing the latest version of Python and the rpg.gpio and ...
1
vote
1answer
61 views

How to shutdown GPIO elegantly when using kill to stop Python script running in the background?

I'm using GPIO in a Python script, and I've wrapped my code in a try... except block so that GPIO is exited elegantly if I need to abort the script: GPIO.setup(17, GPIO.OUT) # Configure GPIO so that ...
1
vote
1answer
37 views

Problem when trying to get a DC motor to run using the L298N H-Bridge?

My setup is as follows: Using this motor controller board, I have one DC motor (I'm new to electronics, so I'm not sure when I say it's rated at 1.5V, because one 1.5V AA battery on its own makes it ...
0
votes
4answers
90 views

How to blink LEDs on/off continually, while continuing execution of a script?

I've connected red and green leds via GPIO and I can successfully switch them on/off using RPi.GPIO - now I'd like to: start an led blinking on/off every 1 second have the script continue its ...
2
votes
3answers
156 views

How to connect 7-segment 4-digits display with Pi?

I would like to connect such a 7-segment 4-digits display (with common anode) to the Raspberry Pi: What's the simplest way to do it with Python for example? Do I need the RPi.GPIO package? Is there ...
0
votes
0answers
51 views

Raspberry Pi Frequency Calculator

I'm trying to make a simple program that calculates the frequency at a pin on the board. I'm using Python for the programming. I wrote two different programs and they gave the same (wrong!) results. I ...
0
votes
2answers
26 views

How to change the default baudrate of raspberry pi's serial port?

Iam getting junk values that is being read by rpi's serial port. Rpi is reading data through its serial port from a zigbee which is connected to the ttyAMA0 of rpi. In the python program, i've ...
2
votes
1answer
88 views

How do I get Python to recognize that it is running on a Raspberry Pi

I just purchased a Pi 2, and everytime I use "Import RPi.GPIO" in Python it returns an error that says RPi.GPIO can only be run on a Raspberry Pi, but I am running it on a Pi. I tried apt-get update ...
0
votes
0answers
124 views

Different “Adafruit 16x2 Character LCD + Keypad for Raspberry Pi” Python Libraries & Sunfounder plate

I have the SunFounder I2C interface 16x2 LCD Pi Plate with KeyPad with RGB LED for Raspberry Pi plate (this model available at Amazon (sorry I have only the german link - the picture is showing the ...
0
votes
0answers
9 views

Installing PS3 controller with RPi [duplicate]

Hi I have been trying to install and work a PS3 controller with my raspberry pi. I want to use it as a joystick to control 2 motors which are speed regulated using ESCs. I have followed various ...
0
votes
2answers
65 views

What happens if I try to read an analog pin's value?

I know there is a simple circuit you can make to be able to read an analog pin but what if I don't know if my device's pin is giving me analog or digital? If I try to read from that pin anyway am I ...
0
votes
1answer
56 views

gpio get value of pin

I'm trying to get the value of a single pin from an rc receiver (receiver info at bottom). What's the correct way to read the value coming in? Here's my existing code: import RPi.GPIO as GPIO ...
-1
votes
2answers
130 views

GPIO is not working, 5V working, 3.3 V working, Raspberry Pi B+

I am the RPi B+ user. Feeling confused about the GPIO. GPIO isn't working. I tried checking it with multimeter by connecting the pin 21 to the gnd, not work. And then i tried the 5 v and 3.3 v, it ...
0
votes
1answer
152 views

HC-SR04 distance sensor doesnt work

I try to make HC-SR04 distance sensor on my rasp pi robot but it doesnt work and I don´t know where is problem. Here is my python code. Program stop in first while loop. VCC is connect to PIN 2. ...
0
votes
1answer
73 views

Is there a way to see if a GPIO pin is on or off using the python RPi.GPIO module?

I have a relay connected to the RPi. Pin 12 for output on/off and grounded with pin 6. Currently I have two python scripts one for turning pin 12 on and another to turn it off. My goal is to run a ...
0
votes
1answer
35 views

Power a docking speaker directly from raspberry pi GPIO pins

I have a raspberry pi plugged into a small portable philips docking station and stream music to it (it's acting as a squeezebox player). At the moment I am running to power supplies, a 9V 2amp for the ...
1
vote
1answer
63 views

Re- Wire a DAC for newer GPIO pin layout

I have a Hifiberry DAC for a model B and would like to use it on b+ or pi 2. I know the GPIO pins have changed from model B layout - would it be possible to figure out the old and new layout ...
2
votes
1answer
107 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 ...
1
vote
1answer
59 views

problem with LED matrix setup with raspberry pi model B+

I have a raspberry pi model B+ , and an 8x8 LED matrix(single colored) , so I connected 8 GPIO pins to the 8 row pins of the matrix and another 8 GPIO pins to the 8 colomn pins. Note that I am pretty ...
3
votes
1answer
136 views

Simulate GPIO pins

I would like to do some simulation of the Raspberry's GPIO pins, e.g. for automated testing and developing the scripts on another host that is not the RPi. Are there any existing ...
2
votes
2answers
291 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 ...
0
votes
1answer
755 views

ImportError: No module named GPIO

I have install RPi.GPIO 5.3a from here: https://pypi.python.org/pypi/RPi.GPIO I ran the next code: sudo python setup.py install there are no fails on the installing. I will run the next script: ...
0
votes
1answer
43 views

Use OR Operator Between Two GPIO on python [closed]

I am writing a short program in Python on the Raspberry Pi, to stop a while loop by any of the one GPIO from two, but it is not stopping the loop. Although, if I use GPIO individually its successfully ...
3
votes
1answer
179 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 ...
1
vote
1answer
164 views

Stop while Loop by GPIO INPUT in Python [closed]

I am writing a program in python on RaspberryPi, to stop While loop through GPIO input. I don't know why it is not working. Can you please look on my coding and guide me to resolved it? import ...
1
vote
1answer
120 views

Change the GPIO pull_up_down=GPIO.PUD_UP to GPIO.PUD_DOWN?

Im working on something similar these link: Connecting a Push Switch But with few changes: LED attached and wish the LED to be high only when the switch is pressed. I tried something like ...
1
vote
2answers
76 views

what is resistance of the GPIO outputs

I am building a simple resistor / capacitor in series (RC) circuit to measure resistance with my RPi A+. RC Design This design is similar to the one used in this tutorial as suggest on this post. ...
2
votes
1answer
194 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 ...
0
votes
0answers
13 views

what is the INTERRUPT_HOSTPORT?

I am understanding the interrupts in the raspberry pi B+ board and I come across this interrupt INTERRUPT_HOSTPORT And I dont know what it is for? Can u explain me once? Thanks in advance.
0
votes
1answer
108 views

GPIO Connections

I would like to use raspberry pi for measurement of Temperature,Humidity,Motion, soil moisture & distance. I would like to add three led indicators. I'll be using following sensors 1) DHT-11 ...
3
votes
1answer
109 views

Cannot use particular pin in GPIO

I am trying to blink a LED on a Raspberry Pi using GPIO 4 (P1.7). Here is my code: #include <bcm2835.h> #define PIN RPI_GPIO_P1_7 int main() { bcm2835_init(); bcm2835_gpio_fsel (PIN, ...
0
votes
1answer
45 views

How many GND does a RasPi model B rev.2 P1 header have?

I see a lot of conflicting documentation on how many GND pins are available on model B rev. 2.0. I have hardware revision "000e" and there are a lot of DNC (Do Not Connect) pins. ...
1
vote
1answer
490 views

Is it possible to use the mini UART and PL011 UART together on a rpi B+? [duplicate]

How to get more than one uart interface is a quite interesting question that I was not able to fully answer for my rPi Model B+ v.2 - the one with the extended 40pin connectors. To avoid this beeing ...
2
votes
2answers
193 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 ...
0
votes
1answer
153 views

i want to set the alt function for the gpio in raspberry pi

I am working on the raspberry pi, doing changes in the machine driver. And there is a hack in the machine driver to change the alt function of one gpio. So i want to remove the hack and want to call ...
5
votes
0answers
234 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, ...
0
votes
1answer
206 views

Enable GPCLK line for 1MHz (or greater) clock

I'm trying to drive a TLC5940 with a brand new RPi Model A+ (V1). I plan to use the Pi's SPI bus to pipe data to the chip, which I've done successfully before using an AVR. The part I'm stuck with is ...
1
vote
2answers
292 views

may connect 26 pin touchscreen display to a 40 pin raspberry pi A+?

Recently, i've got as a present a raspberry pi a+ (40 GPIO pins) and touchscreen display for older version (26 GPIO pins) I tried to google, but wherever i search it gives me description of the new A+ ...
2
votes
4answers
276 views

GPIO Pin 17 does not trigger RPi.GPIO callback

I'm trying to read from all my Raspberry Pi B+ GPIOs. Using the Python3 RPi.GPIO library, it is quite easy to do, but I've come across a problem that I can't seem to resolve : GPIO 17 does not ...
1
vote
1answer
124 views

How to get RPi to generate a triangle wave, then outputting a PWM signal

I want my Raspberry Pi B+ Model to generate a triangle wave and output a PWM signal from one of the GPIO pins, but I'm not sure how to go about doing this. All I want it to do is add some small length ...
0
votes
0answers
80 views

External power supply needed to run two stepper motors?

I am following this tutorial for a CNC laser engraver (http://funofdiy.blogspot.co.uk/2013/10/a-raspberry-pi-controlled-mini-laser.html). I have got two stepper motors from some old DVD drives and the ...
1
vote
1answer
212 views

WiringPi: Random Interrupts caused by PWM?

This program is supposed to react to rising and falling edges of an input signal. However it doesn't exactly work as expected. The expectation is that one (1) interrupt is generated for any edge, ...