Questions tagged [gpio]

General Purpose Input/Output (GPIO) is a generic pin on a chip whose behavior (including whether it is an input or output pin) can be controlled (programmed) by the user at run time.

GPIO pins have no special purpose defined, and go unused by default. The idea is that sometimes the system integrator building a full system that uses the chip might find it useful to have a handful of additional digital control lines, and having these available from the chip can save the hassle of having to arrange additional circuitry to provide them. For example, the Realtek ALC260 chips (audio codec) have 8 GPIO pins, which go unused by default. Some system integrators (Acer Inc. laptops) employing the ALC260 use the first GPIO (GPIO0) to turn on the amplifier used for the laptop's internal speakers and external headphone jack.

Further information and deeper analysis: Opus on wikipedia

1751 questions
3
votes
2 answers

Python GPIO triggering LED with Pushbutton

I am trying to control and LED on an Raspberry Pi. I want the LED to light up when I push a button, and maintain that state until I push the button again. I have implemented the code below and it works quite fine. However, I am getting problems…
OYPS
  • 81
  • 1
  • 2
  • 13
3
votes
3 answers

python code to control GPIO at specific times

I want to build an irrigation automation system based on a Raspberry Pi. I have a script that generates a .CSV file based on the input parameters of the sprinkeling schedule (station no, time/station, use/not use rain sensor, etc.). The .CSV file…
user3254924
  • 83
  • 2
  • 14
3
votes
1 answer

What's the relationship between GPIO and SPI?

I found GPIO driver in the kernel leave /sys/class/gpio to control gpio, but I found GPIO can be controlled by /dev/mem as well, I found this mapping may be done in the spi-bcm2708 (which call the __ioremap as a platform driver), but I don't…
ggaaooppeenngg
  • 1,323
  • 3
  • 17
  • 27
3
votes
3 answers

How to detect change in GPIO input raspberry pi

Is there a way to detect to detect change in raspberry pi GPIO without using a infinite loop? You can detect rise or fall by using this: GPIO.add_event_detect(channel, GPIO.RISING, callback=my_callback) But you only can set event detector for…
Atrotors
  • 765
  • 2
  • 7
  • 25
3
votes
3 answers

Unable to open gpio direction interface (Raspberry/Java)

I am currently stuck with the following prob. The JAR & Pi4J Lib gets executed on a RasPi B+. I've been searching the web for hours without a result. Curiously looking forward to your reponses and support ;-) Stacktrace: Exception in thread "main"…
n3wton
  • 79
  • 2
  • 9
3
votes
2 answers

Problems with controlling a servo with java and Pi4J on a Raspberry PI 2

I want to control a MG90S Servo via the GPIO pins of my Raspberry PI using Pi4J. I have created a Java application with an hz and a duty cycle("High in ms:") keyboard input. import java.util.Scanner; import com.pi4j.io.gpio.GpioController; import…
Rhias
  • 63
  • 5
3
votes
1 answer

([Errno 111] Connection refused)

I'm working on an home automation app using python, but since migration this from my local setup to two physical machines(Server, Client) i am getting a connection refused error: Traceback (most recent call last): File …
3
votes
2 answers

Segmentation fault in embedded application writing to register

I'm running debian with the 3.14.14 kernel on a Freescale iMX6 arm Processor. I have this code in an embedded application that gives a segmentation fault. volatile unsigned int& GPIO2IO26CTRL = *((volatile unsigned int*)0x20e0104); GPIO2IO26CTRL =…
user846566
  • 373
  • 1
  • 3
  • 12
3
votes
2 answers

Python for loop accessing GPIO pins

I'm new to Python and the Raspberry Pi. I'm trying to shorten my code and use for loops for repetitive parts in my code, like changing all pins to high and low. I'm trying to use a for loop to access pins. Is this even possible? import RPi.GPIO as…
GuysmileZ
  • 31
  • 1
  • 2
3
votes
1 answer

Does python iterate at a constant speed?

I writing some code to get sensor readings from GPIO against time. To make sure the measurements corresponds to a specific time, I want to know if python iterates at a constant speed (so that the gap between iterations is constant) - and what is its…
3
votes
3 answers

GPIO 3.3v output on raspberry pi 'The channel sent is invalid on a Raspberry Pi'

I'm trying to learn how to do some cool things with my Raspberry Pi. I am trying to run a NMOS transistor with the 3.3V gpio pin on my raspberry pi. I am pretty sure it is capable of 3.3V output, but i keep on getting an error. I checked my…
user630675
  • 31
  • 1
  • 2
3
votes
1 answer

number bytes read from gpio input is zero

I have some strange behaviour when trying to read gpio output pin. I get that the first read return 1 (1 bytes read), but all next read from same gpio return 0. I would assume that it should always read 1, because there is always something to read…
ransh
  • 1,589
  • 4
  • 30
  • 56
3
votes
1 answer

Sysfs GPIO level-triggered interrupts

I'm a newbie trying to get level triggered interrupts on an embedded linux board. I'm using poll() to wait for the interrupt event. I was successful in getting edge triggered interrupts. How can I get level-triggered interrupts? What do I set the…
Zaxter
  • 2,939
  • 3
  • 31
  • 48
3
votes
1 answer

c# mono raspberry pi GPIO with Raspberry# getting Operation is not valid

I'm trying to use Raspberry# library to perform basic task whith GPIO pin on Raspberry PI (on and off). As per example on github: https://github.com/raspberry-sharp/raspberry-sharp-io/wiki/Raspberry.IO.GeneralPurpose Code: var led1 =…
Sergej Popov
  • 2,933
  • 6
  • 36
  • 53
3
votes
0 answers

How can you check whether your kernel supports GPIO on your hardware?

My aim is to control the GPIO pins in Peppermint 4 Linux (Kernel version 3.8.0) on an Intel motherboard (NM70 chipset with C1037U processor). How can you check whether your kernel supports GPIO on your hardware? Background Motherboard: Intel with…
CalumJEadie
  • 189
  • 4
  • 12