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

1
vote
1answer
22 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
60 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
20 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
43 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, ...
0
votes
1answer
50 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 ...
1
vote
1answer
37 views

How can i detect which board i am using through the i2c of the raspberry pi [closed]

I am working on a project where i moved from raspberry pi model B to B+. So i need to change my audio driver to work on both models by doing some GPIO changes . The requirement is, i have to find ...
0
votes
1answer
32 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
70 views

What happened to the i2s pins which are in RPI B board and not in RPI B+ board

I'm working on RPI model B board.I've a driver for wolfson audio card,Which uses i2s pins for data transfer.Now i need to work on RPI B+ model.But there are no i2s pins in model B+.What i need to do ...
-1
votes
0answers
24 views

gpio.add_event_detect runs callback without signal

I have got a Problem. I want to build a simple audio sampler triggerede by 8 relays. tehe relays are closed by 230v but just close a switch to either ground or v++ (3,3V). the problem is that even ...
0
votes
1answer
106 views

reading pin state whether it's input or output [RPi.GPIO]

Is it possible to read pin state (1 or 0) whether it's set as output or input without setting this with RPi.GPIO.setup(pin, GPIO.IN/GPIO.OUT)? I mean i can do this via command: gpio read 2 But ...
1
vote
1answer
63 views

WiringPi + softPwm calculation to determine duty cycle

For my project we got a pre-installed rpi with all the working libraries and an example program to set a servo in middle position. The info: in a period of 20ms (50hz) we need 1,5ms to set it to ...
0
votes
0answers
27 views

Errors out with no explanation when trying to run a blinking light function in python

I have created a python script to press a button and have my light blink but it isn't working when I transported the function to my main script and it errors out with no information so I don't know ...
1
vote
2answers
57 views

My 3V relay doesn't work on GPIO but works on 5V pin with resistor

Ok, I have this awkward situation. I have a 3V relay that I need to implement in my project. When I connect it to a 5V pin on RPi, everything's working fine, I can hear the coil opening and current ...
0
votes
2answers
96 views

How can I exit a while loop at any time during the loop?

I have a python program that loops through some GPIO commands. How can I break the loop at any time during the loop by pressing the Enter key. So far I have this... import sys import select import os ...
0
votes
0answers
61 views

GPIO pins are not working

I have connected the LED as shown in picture below on GPIO #18: And I ran following program: import RPi.GPIO as GPIO, time GPIO.setmode(GPIO.BCM) GREEN_LED = 18 GPIO.setup(GREEN_LED, GPIO.OUT) ...
0
votes
1answer
63 views

Python script to conttrol GPIO

I have a very small python script to control GPIOs: pi@raspberrypi ~ $ sudo python gpio-test.py #!/usr/bin/env python try: from time import sleep import os import RPi.GPIO as GPIO ...
1
vote
2answers
538 views

RF24 communication with Arduino

I have been trying for ages to work this problem out and can't figure it out. I have two nrf24 transceivers, one connected to the raspberry pi and the other connected to an Arduino. My code for the ...
6
votes
2answers
653 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, ...
0
votes
0answers
59 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 ...
1
vote
0answers
63 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 ...
0
votes
0answers
36 views

GPIO goes high on first initial run of script - please help get my ECTO 1 on the road!

I am having a few problems with my script, on a fresh boot of my pi, the GPIO Port goes High and switches my relay when I run this script, however, it doesn't do it after I initially run the script, ...
1
vote
1answer
112 views

Can't PWM LED on pin 18

Using this code, I can't use PWM on the pi. It's modified off of a Linux user article. import time import RPi.GPIO as GPIO led = 18 GPIO.setmode(GPIO.BCM) GPIO.setup(led, GPIO.OUT) ...
0
votes
1answer
100 views

display LED Blink Count on I2C 16x2 LCD

I want to blink a LED and display its count on I2C 16x2 LCD. But LED is not glowing at all. I used https://www.adafruit.com/product/1115 which uses i2c . I connected LED with 270ohm resister between ...
1
vote
1answer
68 views

Operational error when writing to database in Raspberry Pi's Python [closed]

I'm having an operational error when trying to run IDLE program (Python) in Raspberry Pi and it prompt me an error sentences: Traceback (most recent call last): File "/var/www/Sensor-LED.py", line ...
2
votes
1answer
114 views

Interrupting a Program with a Button

Currently tying to stop the middle of a command if the user presses a certain button. I tried this bit of code below and it doesn't seem to work. I know that you can use control-C to have a ...
0
votes
1answer
39 views

Simple LED code says that object has no attribute output?

I installed RPi.GPIO .5.1 and my uber basic led code says that the object has no attribute 'output'. I am hooking up the 12 pin to the Breadboard and I have ground hooked up too. Here is my python ...
0
votes
2answers
103 views

Multiple Inputs through GPIO

I am currently trying to create a program that does something each time a button is pushed, it seems simple but for me this has been very difficult to acomplish. I am on python 2.7 (but I can go to 3 ...
1
vote
3answers
104 views

how to turn on and off an led with only a tactile button

I'm a beginner to the raspberry pi and python. I want the pi to act like a flip flop to the led so that when i push the button once, it will turn on and if I push it again, it will turn off and so ...
1
vote
1answer
62 views

Use GPIO as GND

I am trying to connect a circuit like this. GPIO25 -- LED -- GPIO24 and I try to turn the LED on by exporting both GPIO and setting 0 in GPIO24, 1 in GPIO25. but it fails. Is there any way to ...
0
votes
1answer
240 views

Controlling Buzzer Module - No sound

The wiring seemed pretty trivial as did the required code. I have the following buzzer module: ...
0
votes
1answer
158 views

Unable to write to GPIO pins using gpio command line utility

I'm just done with installing ArchLinux ARM. I've also installed the RPi.GPIO and WiringPi packages. The problem is this: Through the command line, using the gpio utility, I am able to change the ...
1
vote
1answer
267 views

Using Bluetooth to control GPIO pins

I have 5 strips of LEDs that are linked up to 5 transistors, nothing special. I want to be able to create an android app that when I press a button it sends a command via Bluetooth to the Raspberry Pi ...
5
votes
3answers
470 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 ...
0
votes
2answers
190 views

Using a Pi as an EEPROM programmer

I'm making my own 8-bit homebrew computer and the only part left to figure out is how I'm going to program the parallel input EEPROM chip I'll be using (IC number: 28C256). I'd like to ask those with ...
1
vote
1answer
146 views

Record audio in python when button pressed

I'm trying to set it up so that I can record some audio using RPi.GPIO and pyaudio using a button press to determine the record time (hold to record). However, whenever I press the button, the program ...
-1
votes
1answer
60 views

/sys/devices/virtual/gpio this path not found in my PI

/sys/devices/virtual/gpio this path not found in my Pi, how i can do for access with : nodejs require('pi-gpio')
1
vote
2answers
47 views

Why don't I need time:sleep() for talking with a 10MHz chip?

I'm learning to control a MCP4131 digital potentiometer with the RPi. I've successfully used the MCP4131 by sending my data to the SDI pin, and then a HIGH value to the CLK followed by sending a LOW ...
0
votes
1answer
51 views

RPI with GPIO connector AND micro usb Power supply?

if I use both the GPIO connector and the micro usb does this double the Amper value and the voltage value or only the amper value ?
0
votes
1answer
497 views

echo: write error: Operation not permitted

Running as root user yet I'm still not permitted to use this: echo "21" > /sys/class/gpio/export echo "out" > /sys/class/gpio/gpio21/direction echo "0" > /sys/class/gpio/gpio21/value
1
vote
1answer
128 views

2 things with python, import and exit

I am messing around with the GPIO and I am using my PI through SSH on my main desktop. First: with my script I am using from Adafruit_CharLCD import Adafruit_CharLCD I also tried ~/path/to/Ada... and ...
1
vote
1answer
862 views

GPIO.add_event_detect fires callback multiple times and on wrong signal edge

I'm trying to make an interrupt based matrix keypad reader that is loosely based off of this library. However, I'm getting some really weird effects when trying to use GPIO.add_event_detect in that: ...
3
votes
1answer
484 views

GPIO pins are always HIGH

I recently have started delving into using the GPIO on my raspberry pi and when I got to the input section of adafruit's tutorials I noticed something wrong. For some reason when I execute the python ...
1
vote
3answers
222 views

Control 18 LEDs individually? (17 GPIO pins)

Note: I have read Controlling many LEDs with few GPIO pins, but I can't buy additional parts (Degree project) The end result is to make a noughts and crosses grid with 2 LEDs per grid cell. This ...
0
votes
2answers
249 views

Disable i2c in Raspberry Pi

I want to disable the i2c in raspberry pi, so that I can use it as GPIOs. I commented the lines in the /etc/modprobe.d/raspi-blacklist.conf, but not working.
1
vote
1answer
237 views

How to use gpio7 & 8

I have a python script which uses board pins 7 & 8 but when I try to set the pins to output an exception occurs. GPIO.setmode(GPIO.BOARD); GPIO.setup(7,GPIO.OUT); ...
0
votes
0answers
121 views

Controlling a standard Bulb & Fan with Pi

I have been playing around with Pi for sometime now, and I am now able to do basic wiring to control LED using the command line of Raspbian in my Pi. However, now I want built something real. I want ...
1
vote
2answers
205 views

Can a raspberry pi accept input data if the input voltage is 42 mv when is required is 3.3v?

Im following this website using a different sensor and my output is too low for the GPIO so i don't know whether it effects anything as the program could not work.Can a raspberry pi accept input data ...
1
vote
2answers
508 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
76 views

How to connect slotted opto to raspberry pi?

I am trying to connect slotted opto ( TCST2300 ) to raspberry pi. I would like to receive 1/0 on GPIO input pin. Programming is not a problem but the circuit is. I referred following circuit But ...
3
votes
2answers
148 views

Why is 14 (board numbering system) listed as a GPIO pin, and not 13?

>>> RPIO.RPI_REVISION 2 >>> RPIO.GPIO_LIST_R2 (2, 3, 4, 7, 8, 9, 10, 11, 14, 15, 17, 18, 22, 23, 24, 25, 27, 28, 29, 30, 31) Pin 14 is ground, shouldn't this be pin 13 instead?