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
6
votes
2 answers

WRITE and READ memory mapped device registers in Linux on ARM

I am trying to read and write registers on my ARM9 (SAM9X25) following those steps : http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.faqs/ka3750.htmlI ended with the following code : #include "stdio.h" #define PIO_WPMR_BANK_D …
Tagadac
  • 393
  • 1
  • 4
  • 20
6
votes
2 answers

Multiple thermocouples on raspberry pi

I am pretty new to the GPIO part of the raspberry Pi. When I need pins I normally just use Arduino. However I would really like this project to be consolidated to one platform if possible, I would like to do it all on the PI. So I have three (3)…
Craig Walker
  • 131
  • 2
  • 10
6
votes
1 answer

Best practice to put GPIO logic in UWP

If I create a app in UWP for example with Template 10. I use C# I want to have the GpioController logic in a class or somewhere that will handle all input and output business like set all pins and events. Like an example, when a button is pressed it…
6
votes
2 answers

Coin Counter in Raspberry Pi (RPi-GPIO)

I'm having a problem to count coins in raspberry pi B+ usin RPi-GPIO. This is the code: import RPi.GPIO as GPIO GPIO.setmode(GPIO.BCM) GPIO.setup(23, GPIO.IN) while True: print(GPIO.input(23)) I called the manufacturer and he said the…
Radagast
  • 509
  • 10
  • 23
6
votes
2 answers

How GPIO is mapped in memory?

I am recently browsing GPIO driver for pi2, I found user space pi2 GPIO lib (like RPi.GPIO 0.5.11 of python) use /dev/mem for BCM2708 (begins at 0x20000000,and GPIO begins at 0x200000 relatively) to mmap a user space memory region in order to…
ggaaooppeenngg
  • 1,323
  • 3
  • 17
  • 27
6
votes
1 answer

NIO watchservice for UNIX sys/classes/gpio files

Is it possible to set the JAVA NIO WatchService on files in the /sys/class/gpio/gpioX device tree to supervise changes there ? It would be nice idea to detect changes on the GPIO files (i.e. the GPIO -inputs) directly from within Java, but I fear…
user1226230
  • 381
  • 1
  • 3
  • 11
6
votes
1 answer

"This GPIO pin already exists:" GPIO 1 Exception on Second Time

I am working on Raspberry pi and java to make the LED to blink by using pi4j , everything is cleared and worked fine , the LED is blinking as per the code but when i run the second time it causes the following error, i have searche lot there is lot…
Vicky
  • 1,412
  • 4
  • 18
  • 30
6
votes
3 answers

Working with Raspberry PI GPIO - Do I want a virtual / abstract / interface class?

Intro I am doing some work with Raspberry PI GPIO. Until now I was writing code as you would in C, using functions to group together sections of code. My work has got to the point where I am happy that everything is working, but now things are…
FreelanceConsultant
  • 13,167
  • 27
  • 115
  • 225
6
votes
1 answer

How to detecting interrupt on a GPIO line in Embedded Linux?

There is an interrupt being generated at every 10ms on GPIO_39 in the pandaboard OMAP4. I have registered a handler for this in Linux driver code, but the handler is not being called since the interrupt is not being detected. I made sure at the…
Sagar Jain
  • 7,475
  • 12
  • 47
  • 83
6
votes
1 answer

Under what conditions would /sys/kernel/debug/gpio be empty?

Summary 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). I'm debugging issues I'm having using the sysfs interface and am trying to understand the…
CalumJEadie
  • 189
  • 4
  • 12
6
votes
1 answer

unable to export a gpio pin

I am trying to export a pin (no. 110) using the following in linux: echo 110 > /sys/class/gpio/export When I try to do so, I getthe error message ash: write error: Device or resource busy As per my knowledge the pin is not being used by any…
mdsingh
  • 973
  • 2
  • 13
  • 20
6
votes
2 answers

Simulate Raspberry Pi GPIO signal

I'm new on Raspberry Pi and I would to know how can we simulate/mock the sensors (or GPIO) so I can test just my python code, mocking the Highs and Lows of the pins? Thanks in advance!
André Schuster
  • 165
  • 6
  • 18
6
votes
1 answer

RaspberryPI Python WiringPi2 Interrupt Syntax

Testing out the wiringPi2 interrupts on python 2.7 / RaspberryPi and can't seem to get it to work. With the following code, the interrupt generates a segmentation fault. #!/usr/bin/env python2 import wiringpi2 import time def my_int(): …
crankshaft
  • 2,607
  • 4
  • 45
  • 77
6
votes
6 answers

Configuring Pins Mode Beaglebone

In the beagleboard or beaglebone are different modes to work the pin. With the previous kernel they are located in /sys/kernel/debug/omap_mux. Do u know with the last Kernel where are those files?
Margarita Gonzalez
  • 1,127
  • 7
  • 20
  • 39
5
votes
1 answer

writing to /sys/class/gpio/export failing

I am working on a project which needs me to configure the gpio pins and add sensors to atom board. The kernel has configured the gpio ... CONFIG_GPIO_SYSFS=y is one of the kernel options. I am using fedora version 2.6.29-10 But i am not able to…
Deepthought
  • 2,815
  • 2
  • 28
  • 39