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
4
votes
1 answer

Mounting a file system using a C program

In my initramfs.cpio I have only these directories: root@localhost extract]# ls dev init tmp sys dev has console and sys is empty. init is a binary corresponding to program that I discussed in Accessing GPIO after kernel boots. Now in the same…
user2799508
  • 844
  • 1
  • 15
  • 41
4
votes
1 answer

How to get the frequency of a square wave in a python script

I'm using the TSL235 (http://www.ti.com/lit/ds/symlink/tsl235.pdf) light-to-frequency converter and the Raspberry Pi. The output of the sensor is a square wave (50% duty cycle) with frequency directly proportional to light intensity. So I need to…
user3142695
  • 15,844
  • 47
  • 176
  • 332
4
votes
3 answers

Execute code to switch light on with PHP

I would like to execute a program using PHP, a piece of code that will use an RF transmitter to switch in my lamp. This is achieved from the command line by: action 63 A on It is just a C program someone wrote to control the GPIO pins on my…
Freek
  • 1,097
  • 2
  • 12
  • 30
4
votes
1 answer

Raspberry Pi RPi.GPIO error with threated callback

I'm getting stuck with the wait_for_edge function in the Python package RPi. I added multiple event detections for falling gpio's and everything works fine as long as the callback functions contain not a comand like os.system("mpc pause") Then…
Thorsten
  • 58
  • 5
4
votes
1 answer

gpio-admin: could not flush data

I am attempting to access gpio pin on my Raspberry pi using Node.js + the pi-gpio module but I get the following error: "Error when trying to open pin 11" "gpio-admin: could not flush data to /sys/class/gpio/ex[prt: device or resource busy" I've…
user1308880
  • 63
  • 1
  • 7
4
votes
2 answers

How can I kill omxplayer by Python Subprocess

I'm playing with my Raspberry Pi GPIO. I connect 4 switch to GPIO. I want to realize the function is While hold switch 1. Stop the current movie, Play M01.mp4. While hold switch 2. Stop the current movie, Play M02.mp4. ... If no switch was holded,…
Roy Gu
  • 41
  • 1
  • 3
4
votes
1 answer

Weird python bug on raspberry pi GPIO:s

I'm running some testing using Python on a Raspberry Pi. Hardware is a series of SPDT relays connected to a darlington array (ULN2803) which is connected to the GPIO of a raspberry Pi B. If I set a GPIO pin high, the corresponding relay pulls. If I…
Rushdie
  • 41
  • 2
4
votes
2 answers

BeagleBone GPIO Output Synchronization with PRU (TI AM335x)

I am using one of the PRU units on the AM335x to drive 4 of the GPIO pins on the BeagleBone(GPIO1_2, GPIO1_3, GPIO1_6, GPIO1_7) and I want to synchronize the edge transitions(my full source code is at the bottom). With the Beaglebone to set the…
Dave
  • 61
  • 1
  • 6
4
votes
3 answers

BBB - Automatically load a Device Tree overlay on boot

I have a device tree overlay: /dts-v1/; /plugin/; / { compatible = "ti,beaglebone", "ti,beaglebone-black"; part-number = "mousetraps"; version = "00A1"; /*…
Don Branson
  • 13,631
  • 10
  • 59
  • 101
4
votes
1 answer

attempting to control shift register with nodejs lib gpIO doesnt work on raspberry pi

I am trying to control a shift register in nodejs using the library by enotionz/gpiO.. library here: https://github.com/EnotionZ/GpiO I cant get it to work for some reason. The expected result is for a 74hc595n shift register to cycle pin 0 on. The…
NDBoost
  • 10,184
  • 6
  • 53
  • 73
4
votes
2 answers

Enable pullup GPIO

im working with a AT91SAM9G25 board which has 4 PIO controller managing up to 32 programmable I/O lines. Each pin is configurable as either a general-purpose I/O line only or as an I/O line multiplexed up to two peripheral I/Os. So, for example,…
MABC
  • 576
  • 2
  • 11
  • 29
4
votes
2 answers

GPIOs for suspend/resume?

Though I read few Documents on GPIOs, I am still unable to understand GPIOs top level multiplexing. From the code, I see few GPIOs (like Int, Reset Pins) of dedicated device are multiplexed during suspend/*resume* callbacks of that particular…
Narain
  • 4,461
  • 2
  • 17
  • 15
4
votes
1 answer

Displaying up to date input signals with tkinter GUI

python 2.7 I'm using a raspberry pi to monitor some digital input signals as an hobby project. I want to have a large display that shows the accumulated values and updates them with global variables that will keep track of the input signals. I'm…
3
votes
1 answer

Pandaboard GPIO banks unmmaped from memory

I am currently running Android and an RTOS together using OKL4 Hypervisor to virtualize both of them on a Pandaboard (OMAP4430). At some point during power up it seems like the Linux Kernel somehow causes all the GPIO banks on the board to be…
Stack123
  • 33
  • 3
3
votes
0 answers

How can I access memory-mapped GPIO registers with golang on Windows?

I am working with a piece of harware, that addresses LEDs through GPIOs accessible only through memory-mapped IO (mmio registers). On Linux, I managed to set the values pretty simple, by opening the documented address through /dev/mem: var err…