processing / processing/processing4
Unable to interact with the GPIO of Raspberry Pi 5
还没有人认领这个 Issue。
- 主要语言
- Java
- 星标
- 494
- 派生
- 183
- 平均合并
- 4 小时 39 分钟
- 30 天内合并 PR
- 3
描述
Created by: eMUQI
Description
Unable to interact with the GPIO of Raspberry Pi 5
Expected Behavior
Draw a dot on Processing, which blinks synchronously with the LED.
Current Behavior
/sys/class/gpio/export:Invalid argument
GPIO pin 17 does not seem to be available on your platform
RuntimeException: /sys/class/gpio/export: Invalid argument
RuntimeException: /sys/class/gpio/export: Invalid argument
Steps to Reproduce
-
Install Hardware I/O
-
Run the code
import processing.io.*; int ledPin = 17; boolean state = true; void setup() { size(100, 100); frameRate(2); //set frame rate GPIO.pinMode(ledPin, GPIO.OUTPUT); //set the ledPin to output mode } void draw() { state = !state; if (state==true) { GPIO.digitalWrite(ledPin, GPIO.LOW); //led on fill(255, 0, 0); //set the fill color of led on } else { GPIO.digitalWrite(ledPin, GPIO.HIGH); //led off fill(155); //set the fill color of led off } ellipse(width/2, height/2, width*0.75, height*0.75); } -
error
Your Environment
- Processing version:
- 4.3
- Operating System and OS version:
- OS: Debian GNU/Linux 12 (bookworm) aarch64
- Kernel: 6.1.0-rpi6-rpi-2712
- Other information:
- Raspberry Pi 5 Model B Rev 1.0
- CPU: BCM2835 (4) @ 2.400GHz
Possible Causes / Solutions
My suspicion is that it might be related to the introduction of the new southbridge chip, RP1, on the Raspberry Pi 5, which now handles the GPIOs and may have altered the access protocol.
Other
Also report at https://discourse.processing.org/t/issue-with-gpio-access-on-raspberry-pi-5-using-processing-4/43337
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
从 GPIO.pinMode 和 GPIO.digitalWrite 使用的 Hardware I/O GPIO 入口开始,并在 Raspberry Pi 5 上使用 Debian 12 复现该 sketch。将 /sys/class/gpio/export 的失败和不可用的引脚 17 与现有的 GPIO 访问路径进行比较;当提供的 sketch 能够控制 LED 并绘制同步点,且不出现 RuntimeException 时,即表示完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- java, raspberry-pi
- 领域
- embedded-iot
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 30/100