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
11
votes
5 answers

Which package to use for using GPIOs on Raspberry Pi?

How can I read the temperature sensor values on GPIO of a Raspberry Pi using the go language? Please, anyone help me out. Thanks in advance.
user2725228
  • 161
  • 1
  • 5
10
votes
4 answers

Python can't find module when started with sudo

I've got a script that uses the Google Assistant Library and has to import some modules from there. I figured out this only works in a Python Virtual Environment, which is really strange. In the same folder I've got a script which uses the GPIO pins…
Jan
  • 123
  • 1
  • 2
  • 8
10
votes
1 answer

How to use boost::asio with Linux GPIOs

I have a single-threaded Linux application using boost::asio for asynchronous input/output. Now I need to extend this application to read in GPIO inputs on /sys/class/gpio/gpioXX/value. It is possible to do that with…
Florian
  • 1,036
  • 10
  • 15
10
votes
2 answers

Linux Device Tree Help (GPIO controller/interrupts)

I've been learning about linux device trees and we've been trying to start porting some of our older code to use them. I'm having a little bit of trouble with the gpio controller node: gpio1: gpio-controller@c00 { #gpio-cells = <2>; …
nigp4w rudy
  • 525
  • 1
  • 5
  • 9
9
votes
2 answers

Virtual GPIO emulation

Does exist a virtual GPIO driver to be used for a programming needs? I have to develop a software on my Linux PC, and then try it on some embedded systems with physical GPIOs (C.H.I.P., OpenWRT, and so on...)? Thank you!
Antonio Petricca
  • 8,891
  • 5
  • 36
  • 74
9
votes
4 answers

How to trigger Python script on Raspberry Pi from Node-Red

I'm using Node-Red, hosted on a Raspberry Pi for an IoT project. How do I trigger a Python script that is on the raspi from Node-Red? I want to run a script that updates the text on an Adafruit LCD shield which is sitting on the Pi Should I be…
pronoob
  • 811
  • 1
  • 10
  • 20
9
votes
1 answer

how to detect a pin change of a GPIO on Linux board

I am using 3.12 kernel on an ARM based linux board (imx233 CPU). My purpose is to detect pin change of a GPIO (1 to 0). I can read the pin value constantly calling the below function (in a while(1) loop) int GPIO_read_value(int pin){ int…
Angs
  • 1,605
  • 2
  • 23
  • 47
8
votes
2 answers

Explanation of pad control functions in a Freescale processor?

Reading the MCIMX50 Application Processor Reference Manuals on page 1368 (Section 33.3) there is a list of the different possible control functions of the processors pads. The list is: SRE (1 bit slew rate control). DSE (2 bits drive strength…
Bjarke Freund-Hansen
  • 28,728
  • 25
  • 92
  • 135
8
votes
1 answer

Accessing GPIO on OrangePI PC Plus ( H3 ) on Armbian 3.4.113 and newer

how to access GPIO on Armbian 3.4.113 on OrangePi PC plus ( SoC H3 ) now that the old method using gpio-sunxi and editing the .fex-file is obsolete ( want to share this ... )
ralf htp
  • 9,149
  • 4
  • 22
  • 34
8
votes
1 answer

Use RPi.GPIO with Python 3.6

I try to use RPi.GPIO with Python 3.6. I installed RPi.GPIO and it's working with Python 3.4, but not with Python 3.6 I get this Error: ModuleNotFoundError: No module named 'RPi' I immport the module in my script like this: import RPi.GPIO as…
no0by5
  • 632
  • 3
  • 8
  • 30
8
votes
2 answers

Raspberry PI, GPIO Pull UP/DOWN resistors with SYSFS

Just off the bat I'd like to state that I'm aware of Python and other high level implementations for manipulating GPIO on the Raspberry PI. I've also been using the WiringPI C API and am experiencing problems with it on Raspbian Jessie that I was…
os x nerd
  • 897
  • 1
  • 10
  • 18
7
votes
2 answers

How can I edit a pinmux for BeagleBone Black on linux kernel 3.17?

I can take a peek at /sys/kernel/debug/pinctrl/44e10800.pinmux/pins and see the pin I am interested in: pin 38 (44e10898.0) 00000037 pinctrl-single This corresponds to GPIO[2]4, or P8.10. I'm using Fedora 21, with kernel 3.17.7-300.fc21.armv7hl. I…
ToBeReplaced
  • 3,334
  • 2
  • 26
  • 42
7
votes
1 answer

detecting interrupt on GPIO in kernel module

I am toggling the input into a GPIO line on my BeagleBone from high to low every 500 ms using an Atmel uC. I have registered a handler for this in my Linux Kernel Module, but the handler is not being called for some reason. My module code is…
7
votes
2 answers

Python Key press and Key Release Listener

I am controlling a remote toy car using python code. As of now, the code is as below: def getkey(): fd = sys.stdin.fileno() old = termios.tcgetattr(fd) new = termios.tcgetattr(fd) new[3] = new[3] & ~TERMIOS.ICANON &…
Giridhar
  • 71
  • 1
  • 1
  • 4
6
votes
1 answer

Raspberry Pi RS485/Uart Modbus

I'm attempting to get an RS485 adapter connected at the UART to communicate via modbus on a Raspberry Pi. My end goal is to have all this working with a Node application, but so far my dev has been with Python. My hardware connection looks…
David Ryan
  • 109
  • 1
  • 1
  • 7