gpio

How to set interrupt priorities in Arduino?

删除回忆录丶 提交于 2021-02-20 04:50:08
问题 I am working on ESP8266. And I program it directly through FTDI using Arduino IDE. I am having problems with stack when both GPIO and UART interrupt occurs at same time or GPIO event occurs when UART sends or receives something. Is it possible to set interrupt priorities on Arduino?. 回答1: Interrumpts in Arduino have a predefined order of priority that can't be change. Here is is: 1 Reset 2 External Interrupt Request 0 (pin D2) (INT0_vect) 3 External Interrupt Request 1 (pin D3) (INT1_vect) 4

accessing gpio from within kivy android app

落爺英雄遲暮 提交于 2021-02-19 05:58:26
问题 OK I am stumped and its possible I have just not had enough experience with android, so I dont know which permissions to use. I have recompiled the android kernel to expose the gpio pins I need, maybe I need to do something in the kernel to solve my problem... basically at this point i have no idea I can open adb shell and go /sys/class/gpio/export 141 and get the gpio folder and its files (value,direction,etc). and when I am in the adb shell I can set the direction and values using echo out

Python rpi GPIO output control based on GPIO input and time of day

拈花ヽ惹草 提交于 2021-02-10 06:45:32
问题 I'm trying to write a little script to control two raspberry pi's gpio output pins based on two factors: the state of GPIO.input.17 and the time of day. I would like gpio.output.23 and gpio.output.25 to be low when gpio.input.17 is low. I would like gpio.output.23 to go high when gpio.input.17 is high and the time is between 0700-2159. I would like gpio.output.25 to go high when gpio.input.17 is high and the time is between 2200-0659. so far, the code i've put together looks like this: #!/usr

Python rpi GPIO output control based on GPIO input and time of day

匆匆过客 提交于 2021-02-10 06:45:31
问题 I'm trying to write a little script to control two raspberry pi's gpio output pins based on two factors: the state of GPIO.input.17 and the time of day. I would like gpio.output.23 and gpio.output.25 to be low when gpio.input.17 is low. I would like gpio.output.23 to go high when gpio.input.17 is high and the time is between 0700-2159. I would like gpio.output.25 to go high when gpio.input.17 is high and the time is between 2200-0659. so far, the code i've put together looks like this: #!/usr

Controlling GPIO in CP210x C#

跟風遠走 提交于 2021-02-07 09:39:47
问题 I need to control the GPIO pins of a CP210x device using CP210xManufacturing.dll and CP210xRuntime.dll provided by Silicon Labs. I manage to open and close the device and to get the part number. (In my case a CP2105). I think I successfully read the latch, but I'm not sure. I also call the write latch function, and no error is returned and neither do any pins toggle. According to the provided utility (CP21xxCustomizationUtility.exe) it shows that both ports are in GPIO mode. Here is my code:

Controlling GPIO in CP210x C#

风流意气都作罢 提交于 2021-02-07 09:38:55
问题 I need to control the GPIO pins of a CP210x device using CP210xManufacturing.dll and CP210xRuntime.dll provided by Silicon Labs. I manage to open and close the device and to get the part number. (In my case a CP2105). I think I successfully read the latch, but I'm not sure. I also call the write latch function, and no error is returned and neither do any pins toggle. According to the provided utility (CP21xxCustomizationUtility.exe) it shows that both ports are in GPIO mode. Here is my code:

Is there any example of how to use the digital input or analog input of GPIO on google aiy voice board?

大憨熊 提交于 2021-01-29 20:28:20
问题 I can not read the input from the motion sensor (HC-SR501) which connects to PIN_A of the expansion pins on the voice bonnet of my aiy voice kit. Below are the code and the error message, please shed some light. Code: from gpiozero import MotionSensor from aiy.pins import (PIN_A, PIN_B, PIN_C, PIN_D) pir = MotionSensor(PIN_A) pir.wait_for_motion() print("Motion detected!") Error message: Traceback (most recent call last): File "/usr/lib/python3/dist-packages/gpiozero/input_devices.py", line

Where is the specific address definition of the GPIO IDR register by STM32Cube resulting files?

我是研究僧i 提交于 2021-01-29 11:02:01
问题 I have read through the explanation of the STM32 project produced by the STM32Cube as in this website. From this website, I have learned that: In the stm32f0xx.h file, for example, the origianl address of GPIOA is already declared by "#define GPIOA_BASE (AHB1PERIPH_BASE + 0x0000U)" then all the corresponding registers for GPIOA is declared by "#define GPIOA ((GPIO_TypeDef *) GPIOA_BASE)" By the information above, this head file has already defined the original adress of GPIOA, and declared

GPIO command for raspberry not working via crontab

此生再无相见时 提交于 2021-01-27 17:35:38
问题 I've got a Raspberry Pi. I've installed on it WiringPi for pilot GPIO on the board via command line. I've done a script called aggiornaora.sh gpio -g write 18 1 #it set the GPIO port to 1 #log with reverse append (echo 'accensione';date;echo ' ') | cat - logstufa.txt > temp && mv temp logstufa.txt This script work fine if I try to exec it directly via sh aggiornaora.sh . But when cron run the script, it do only the second action. All with root permission. I've checked this problem through

Raspberry pi 4 controle GPIO with java

限于喜欢 提交于 2021-01-01 04:26:47
问题 I want to controle a 16*2 lcd display on my raspberry pi4 with java. The problem is that Pi4J - the solution to modify the gpios with java is not updated to pi4. Is there another solution? This error occures when I start the programm: pi@raspberrypi:~/desktop/gpio $ sudo ./start.sh <--Pi4J--> GPIO Control Example ... started. Maista Unable to determine hardware version. I see: Hardware : BCM2711 , expecting BCM2708 or BCM2709. If this is a genuine Raspberry Pi then please report this to