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.
1,687
questions
-1
votes
0
answers
19
views
Why does ioctl GPIO_GET_LINEHANDLE_IOCTL return EINVAL
I am working on an application for an NXP iMX7ULP custom board. I am trying to open a GPIO pin from user-mode using the character mode interface. I keep getting EINVAL on the ioctl for ...
2
votes
1
answer
34
views
High frequency GPIO-output from Raspberry Pi 3 using Java
I create for a firma a java game using LibGDX. It will run on a Raspberry Pi 3. It is a clone of a famous arcade cabinet.
The game is ready. The joystick control using a port of the evdev library ...
-1
votes
1
answer
16
views
Writing a python door sensor with telegram bot integration
*This is a follow-up question to a previous problem I had writing a similar code, however the telgram-send library that I was using has not been updated since last year and I cannot configure it to ...
0
votes
0
answers
10
views
Can't install JetsonGPIO library on Jetson TK1
I'm following the steps written here: https://github.com/pjueon/JetsonGPIO to install the library, because I need it to use the GPIO as interrupt.
Everything goes well until step 4, when I have to ...
1
vote
0
answers
28
views
gpiod_get_array() fails to get the gpio_desc[] that gpio_count() sees
I am trying to gpiod_export() from the driver (pinctrl-single.c), some named user GPIOs declared in the device tree (DTS). I want them available in userspace to get or set from an application. I also ...
0
votes
0
answers
13
views
I want to generate Sbus(Futaba) signal with Jetson tx2 + Orbitty carrier board
import time
import Jetson.GPIO as GPIO
gpio_pin = 388 # Orbitty carrier 7(GPIO_0) pin
# Sbus signal encoding function
def encode_sbus(channels, failsafe=False):
sbus_data = [0] * 25 # Sbus ...
0
votes
1
answer
34
views
How do I use new `gpiod_export()` in the kernel space
In the kernel v4.14, we exported GPIOs from a kernel driver using the code below. After which, I could see all of the exported GPIOs in the user space with cat /sys/kernel/debug/gpio
static struct ...
0
votes
0
answers
33
views
Can not launch examples of the Pi4J from the Intellij IDEA on Raspberry Pi 4B
I need to create a project for the RPI3. It must control external devices, read signals from a coin acceptor and output the graphic of a videogame to a screen 1920x1080 px. I used Processing libraries ...
0
votes
0
answers
7
views
opb900w55z Light barrier doesn't recognize objects i put between the sensor and emitter
The task is to create a program which recognizes a gap in a plate with a raspberry pi 4 and an OPB900W55Z light barrier(https://www.mouser.at/datasheet/2/414/TTRB_S_A0004899802_1-2565401.pdf). The ...
0
votes
0
answers
22
views
Using STM32F4 to print keys pressed on a keypad
No idea why it won't work. Don't know where to start.
I've look up everywhere to figure this out. I'm using an STM32F446RE controller with uVision software.
The basic objective of this project is
2. ...
0
votes
0
answers
44
views
Python: Error when running Python script on Raspberry Pi
Title: "Error when installing Python package using pip"
Details:
I'm running a Python script on my Raspberry Pi, but I'm getting an error message that I can't seem to resolve. Specifically, ...
0
votes
0
answers
70
views
RuntimeError: Failed to add edge detection - On Raspberrypi
I'm working on a button example on a Raspberry Pi. I found this tutorial on the internet, and I was trying to complete it 1 by 1. The code is exactly the same, and I'm sure I used the correct pins.
...
0
votes
1
answer
56
views
I2c Setup Issue
I am trying to setup an Adafruit i2c temperature sensor in Python with a RaspberryPi4. The only example code for this sensor (SCD-40) sets up the i2c by importing board module:
import board
import ...
0
votes
0
answers
23
views
Why won't my sw2 turn off the RGB when the sw1 works?
#include <stdint.h> // generally, include all these always
#include <stdbool.h>
#include <stdio.h>
#include "inc/hw_memmap.h" // specifies memory map of the chip.
#include ...
-1
votes
1
answer
68
views
Is it possible to pass parameters to a GPIO interrupt on a CC1310 (or similar TI devices) using the TI SDK
I need to pass a parameter (like an SPI handle for example) to a GPIO ISR (on a CC1310 or similar, using the TI SDK v4.20.XX. This version is not a requirment, just my current version, updating the ...
0
votes
0
answers
31
views
paho: Control GPIO over MQTT
I have a script running on a external RaspberryPi, so I can control the onboard GPIO over MQTT.
The script will be started via system as a service. (status = active)
# python 3.6
import RPi.GPIO as ...
0
votes
0
answers
53
views
STM32 GPIO toggling timing issue (short delay phenomenon)
who do someone know about the STM32 GPIO toggling timing issue?
I want get the always normal togging timming signal without the abnormal togging timming iusse.
Due to the contacted image, I have a ...
1
vote
1
answer
56
views
Run once until conditions change
What I'm trying to accomplish: if the room lights go off, the monitor should dim. If the room lights go back on, the monitor should get brighter.
On a Rpi4B, I'm trying to use ddcutil in combination ...
0
votes
0
answers
41
views
Asrock IMB-1004J motherboard: access to GPIO
I have to access to Asrock motherboard GPIO under Debian 11 (mother board model: IMB-1004J). Does somebody know how we can do?
For now, I havn't answer from Asrock itself.
0
votes
1
answer
70
views
issue in C with read after epoll_wait in a pthread
I am working on a MQTT client app in C for an Embedded ARM system that must send message base on GPIO change.
To do this, I have try to launch a pthread that do a epoll_wait and a read on /sys/class/...
0
votes
0
answers
36
views
PullUp Resistor on Raspberry Pi not working all the time
I have a Raspberry Pi 3 that uses a Python script to check if a relay has switched.
However, it says at irregular intervals (between 5 seconds and 1 minute) that the relay has switched, although in ...
0
votes
1
answer
69
views
Why beaglebone gpio is not working with sysfs (kernel_version=5.10.153-bone69)
I am trying to use a gpio P9_23 (gpio 49) to light up an LED via sysfs and kernel module, and I used this link to bring up SD card
https://forum.digikey.com/t/debian-getting-started-with-the-...
1
vote
0
answers
50
views
RPi4 w/ Centos and RPI.GPIO: can't add edge detection
I am running CentOS7 with kernel 5.4.206-v8.1.el7 on a RPi4 and I am trying to setup edge detection on GPIO with RPi.GPIO-0.7.1-py3.9 (*)
I am getting the following error whatever the pin I try to ...
0
votes
0
answers
34
views
RPi.GPIO: defined output pin not found in /sys/class/gpio
I have a python3 script which uses RPi.GPIO and defines 2 input pins and 1 output pin like shown below
GPIO.setmode( GPIO.BCM ) # init GPIOs
GPIO.setup( 2, GPIO.IN, pull_up_down=GPIO....
0
votes
0
answers
21
views
Raspberry Pi 4: Keep the Physical Pin output remain HIGH until set to LOW
Looks like I just discovered something from the Raspberry Pi board. That is, command GPIO.output(led_pin,GPIO.HIGH) sets the output pin high only momentary. I originally thought it keeps the led_pin ...
0
votes
1
answer
76
views
Linux Gpio V2 request line ioctl failing
I'm trying to implement the new linux gpio api. Using the v1 api, I was able to confirm that this code works:
// req is part of larger code
struct gpiohandle_request lreq;
memset(lreq.default_values, ...
0
votes
1
answer
123
views
ESP32 Highest Priority Interrupt To Grab Timer Value In Assembly
I'm trying to install a GPIO interrupt on ESP32 that records a once per second pulse as precisely as possible. The other running processes (on both processors) delay my normal C based interrupt (...
0
votes
2
answers
52
views
Multiple LED control with few GPIO pins in Renesas microcontroller [closed]
I need to control 12 leds through 4 GPIO pins. I did some reading online and saw we can use Charlieplexing method to control leds with fewer gpio pins. But is it possible to make two or more leds to ...
1
vote
0
answers
44
views
Accessing multiple GPIO's from multiple Docker Containers
I am running into an issue with Docker Containers and RPI4 GPIO. Everything works great if the containers are run by themselves. Ex. Container 1 runs and provides output and then I stop it, then I am ...
0
votes
0
answers
104
views
Linux GPIO persistent output
In the deprecated sysfs interface, writing a value to an output pin would persist. I'm not sure how to do this with the new interface.
This is how I'm writing a value for 2 seconds:
// get linehandle
...
0
votes
0
answers
31
views
Unable to play sound and rpi_rf at same time
I'm unable to play a sound in the background and send a 433 Mhz wireless RF signal (rpi-rf module) at the same time. The whole script works, but no RF signal is sent. No output/error either. Whenever ...
0
votes
0
answers
25
views
How to use dotnet core GpioController events for ABElectronics IO PI card?
I have written a first version a of dotnet core application on Raspberry Pi for the IO PI expansion card, using the ABElectronics library provided here
This card is based on the MCP23017 microchip.
...
0
votes
0
answers
128
views
PIco W: is there a way to detect if usb power is connected in micropython?
I am trying to detect (ideally fire an interrupt) when a usb host is connected and supplies 5v. (in this design i have a separate "always on" Vsys supplied from another source).
According to ...
0
votes
1
answer
19
views
Raspberry PI 4: Control RPI.GPIO pins through dictionary keys
I am trying to control GPIO pins through dictionary pins:
My code:
var gpio = require('onoff').Gpio;
var rpi_board = [{'pin_17_in':new gpio(17,'in')},
{'pin_27_in':new gpio(27,'in')},
...
0
votes
1
answer
50
views
TM4321GH6PM - why is GPIODATA register initializing itself and how to read and write to it properly?
Context: I am following a Embedded Systems course that uses the TM4C321GHP6M microcontroller. The IDE being used is the uvision ide by keil. The purpose of the program I am running is to turn on an on-...
0
votes
0
answers
70
views
RaspberryPi GPIO assembly program digitalRead returning HIGH without any physical button press
This Question is a Repost, I figured I would just start all over again seeing as how there were several issues regarding context and formatting in it
Program Function:
The function of my program is to ...
0
votes
0
answers
51
views
How do I write a 32-bit ARM ASM program to activate a loop using input from a wiringPi?
So I am creating a program that will cause an LED to blink on and off when a button is being pressed and held down, however, when I run the program that I have written, pressing the button will not ...
0
votes
0
answers
59
views
Sound not correctly detected with KY-037 and Rasberry Pi Zero
I have the KY-037 sound sensor with three jumpers going to the Ras Pi.
Ground - going to PIN 6
Out - going to PIN 7
VCC - going to PIN 2 (5v) I tried it on 3.3v (PIN 1) as well
I am running a ...
0
votes
1
answer
259
views
Using Python, can I send a Raspberry Pi GPIO input as a HID keypress or command?
I am working on modifying existing code that works to use a Raspberry Pi as a bluetooth HID keyboard and mouse. The existing code works well to send keypresses to my Macbook via bluetooth.
What I am ...
0
votes
1
answer
87
views
Error in blinking led using GPIO_12 of ESP32
Here is my code:
#define LED_BUILTIN 12
// the setup function runs once when you press reset or power the board
void setup()
{
// initialize digital pin LED_BUILTIN as an output.
pinMode(...
0
votes
0
answers
20
views
Remote GPIO via gpiozero SBC-Moto1 slow execution
I am pretty new to the Raspberry Pi. I'm trying to run a stepper-motor, which is connected with my raspberry, with my windows computer. I'm using the library gpiozero.
The Code on my Raspberry is ...
-1
votes
1
answer
59
views
Gpio_STM_PinAF_Usart_Output
How to switch from output or input Mode in Stm MIctrocontroller
for exemple after using GpioA_Pin0 as digital output
and in the same programm
how to use it to send data via Usart2
so my problem is how ...
0
votes
2
answers
62
views
HAL_UART_Receive function's size parameter
I am trying to receive data with STM32F407 by using UART. I've realized that when I'd receive a data, I don't know it's size. Because of this, the code doesn't work when I enter the third parameter ...
0
votes
1
answer
177
views
GPIO controller settings in DTS
I'm trying to set GPIO0 of the SC16IS750 to an output and default high. However, there is something wrong with my GPIO hogging. If I don't include the child node p0 I'm able to find the gpiochip (/dev/...
0
votes
0
answers
31
views
Why is libgpiod is corrupting my filesystem?
I have an OpenWRT system (Intel) where I have to control some GPIOS (it87). I would like to update from the classic sysfs approach (which works fine, but is being deprecated) to the new chardev, using ...
0
votes
0
answers
18
views
VBAT_BB and VBAT_RF in Quectel EC200u
I am designing a pcb for Quectel EC200U. It has been given to use two separate voltage domains for its VBAT_RF abd VBAT_BB pins. what if i use a single power plate of 4v with one 100uF tantallum, one ...
0
votes
1
answer
51
views
Migration to Raspberry PI 3B+ problem with RF24 library and C code compiling
During update of my home automation server I decided to upgrade Raspberry PI from 2B to 3B+.
Used code is the same but on 3B I got following error
g++ -Wall -o pimain Server_HomeAutomation.o -I. -I/...
0
votes
0
answers
114
views
ESP32 Wake Up only when a signal on GPIO toggle
So I am working with ESP32 which is powered by a battery, so I want it to wake up only when a contact sensor value changes. I have a simple code for esp32. I am using 2 gpio, pin numbers 33 and 13 on ...
0
votes
0
answers
19
views
socketio emit not working from gpio callback
I am pulling my hair out trying to figure out what I am doing wrong.
Server shows emit is being sent, but the browser never gets it. After about a minute, the client disconnects and re-connects.
...
-2
votes
1
answer
47
views
Is there any way to use Raspberry Pi GPIO pins in Javascript frontend
I was wondering if there exists any way that I can use the Raspberry Pi's GPIO pins in Javascript? I want to read the values of the Raspberry Pi PIR sensor and I really don't want to make it in Python ...