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

random.choice returns the same file on button press

For my first project, I'm working on building a soundboard using a Raspberry Pi as the base. I would like to have several buttons, each of which plays a random sound file from different lists on each press. I'm using several built in libraries,…
4
votes
4 answers

Writing pointers to the address of GPIO out pin

Absolute noob to embedded system. Right now I am trying to program a device called nRF52832 in C. I know that the base address for the GPIO is 0x50000000 and the offset for the OUT register is 0x504. How do I create pointers to the addresses of the…
user3084686
  • 75
  • 1
  • 6
4
votes
1 answer

Are ctxless functions worse or better to use in libgpiod

Is there anyone out there familiar with libgpiod who could answer this question: Are there any draw backs to using ctxless function rather than calling individual function to manipulate chip lines (or in general)? For example, to turn on a line, I…
DaveR
  • 1,295
  • 1
  • 13
  • 35
4
votes
2 answers

Using c++ libgpiod library, how can I set gpio lines to be outputs and manipulate single lines with set_value() function?

I just started using c++ bindings of libgpiod library and have problem with settings gpios. I know, that I can create long vector of values, and apply it in all at once, but I would like to be able to set their direction, and control them…
Staszek
  • 849
  • 11
  • 28
4
votes
2 answers

USB to GPIO/SPI/I2C/UART for regular Windows 10 PC? Simular to Raspberry Pi 40 pin Header

Does anybody know of a company that sells a USB cable for a normal non-IoT windows 10 PC that can converts a USB to all of the following buses on 40 pin Raspberry pi like header? Example: USB->GPIO,I2C,SPI,UART, etc.. The closest thing I can find…
Bimo
  • 5,987
  • 2
  • 39
  • 61
4
votes
0 answers

High precision sleep/delay in python (without interruption)

I need to do some operations on Raspberry Pi3 pins in specific time. For example I send some bytes via uart then I need to wait about 5ms and again send next part of bytes, but I noticed that if I do time.sleep(0.005) or for example…
KyluAce
  • 933
  • 1
  • 8
  • 25
4
votes
1 answer

Reading input GPIO on STM Discovery board

I'm trying to read an 8-bit value being sent in parallel to an STM32L476VG MCU Discovery board. Bits 7 and 6 of the data are being sent to pins PC15 and PC14, respectively, while bits 6-0 are sent to pins PE15-PE10. I tested the wires to those pins…
Pete
  • 41
  • 3
4
votes
1 answer

RPi - Accessing GPIO Pins with ">" Operator

As seen on the website: https://luketopia.net/2013/07/28/raspberry-pi-gpio-via-the-shell/ So if we want to be able to access pin 4, we would type echo 4 > /sys/class/gpio/export and To specify that we want to use the pin as an output, we can do…
C K
  • 344
  • 2
  • 13
4
votes
1 answer

linux gpio driver can't export GPIO

I want to use linux GPIO driver to handle one of the GPIO pins of mpc8308 processor as output. so I enabled the GPIO driver and it's debugging in: Device Drivers ---> GPIO Support ---> /sys/class/gpio/... (sysfs interface) but when using echo…
AVM
  • 106
  • 2
  • 7
4
votes
1 answer

SPI Reset on Raspberry Pi after GPIO usage

I found out when I used GPIO Pins which are also SPI Pins (GPIO8,9,10,11) and clean them up. I can not reuse this Pins for an SPI connection. I have to restart the Raspberry Pi first to use SPI again. Do you have an idea how I can reset this Pins…
user1200794
  • 159
  • 3
  • 9
4
votes
1 answer

nrf24l01+ between arduino and raspberry Pi in NodeJS

I'm trying to retrieve my sensor data from my Raspberry Pi using nrf24l01+ network receiver. I'm sending it from an Arduino nano board. Here is the setting of my Arduino: STATUS = 0x0e RX_DR=0 TX_DS=0 MAX_RT=0 RX_P_NO=7 TX_FULL=0 RX_ADDR_P0-1 …
frinux
  • 2,052
  • 6
  • 26
  • 47
4
votes
0 answers

Simple JSP + PI4J - GPIO Pins (several) Already Exists

Happy New Year Everyone. English is not my native language so please be patient. I'm trying to use a Raspberry Pi 2 (Model B) for alert me when some one open the case, using a limit switch and the GPIO pins. (This is not a Raspberry SE question) At…
Elber CM
  • 310
  • 5
  • 21
4
votes
0 answers

Specifying GPIO Numbers for IO Expander in Linux Device Tree

I'm trying to add a PCA9557 I/O expander to an arm-based system on an I2C bus. The system already has another I/O expander on a different I2C bus. I am trying to figure out how to specify which GPIO numbers the pins on the new expander get, and how…
Jeremy
  • 1,083
  • 3
  • 13
  • 25
4
votes
2 answers

GPIO pin listener in PI using java cause a burst of action event

In this program I can able to read the GPIO pin. But pressing the hardware button(GPIO pin connected with button) for a single event cause a burst of state change and result in burst of action events.. So how can I eliminate the GPIO state change…
Prasanna Anbazhagan
  • 1,693
  • 1
  • 20
  • 37
4
votes
1 answer

How to detect two or more button press (GPIO) at the same time by a microprocessor/microcontroller?

As mentioned in the question , I was wondering whether it is possible for the controller to detect two button press simultaneously. I am new to controller programming and started with the basics - blinking LED, then moved to buttons and now trying…
Messi L
  • 97
  • 2
  • 11