Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple "rpi-gpio in" doesn't work on Raspberry Pi 5 #1085

Open
5 tasks done
waiweng83 opened this issue Nov 4, 2024 · 3 comments
Open
5 tasks done

Multiple "rpi-gpio in" doesn't work on Raspberry Pi 5 #1085

waiweng83 opened this issue Nov 4, 2024 · 3 comments

Comments

@waiweng83
Copy link

Which node are you reporting an issue on?

rpi-gpio in

What are the steps to reproduce?

[ { "id": "78b4d995a81ab599", "type": "tab", "label": "Flow 1", "disabled": false, "info": "", "env": [] }, { "id": "a2c9b52862aa4d95", "type": "rpi-gpio in", "z": "78b4d995a81ab599", "name": "", "pin": "4", "intype": "tri", "debounce": "25", "read": false, "bcm": true, "x": 590, "y": 280, "wires": [ [ "cfbc42146f0c4c55" ] ] }, { "id": "cfbc42146f0c4c55", "type": "debug", "z": "78b4d995a81ab599", "name": "debug 1", "active": true, "tosidebar": true, "console": false, "tostatus": false, "complete": "false", "statusVal": "", "statusType": "auto", "x": 780, "y": 280, "wires": [] }, { "id": "58d56a69c882d5f3", "type": "debug", "z": "78b4d995a81ab599", "name": "debug 2", "active": true, "tosidebar": true, "console": false, "tostatus": false, "complete": "false", "statusVal": "", "statusType": "auto", "x": 780, "y": 340, "wires": [] }, { "id": "8409d6f2d0c9f9bf", "type": "rpi-gpio in", "z": "78b4d995a81ab599", "name": "", "pin": "4", "intype": "tri", "debounce": "25", "read": false, "bcm": true, "x": 590, "y": 340, "wires": [ [ "58d56a69c882d5f3" ] ] } ]

What happens?

When there are multiple "rpi-gpio in" node acessing the same GPIO, only the first node works as expected. The remaining nodes are not working.

What do you expect to happen?

The same flow work on Raspberry Pi 4, so it should work on Pi 5 too.

Please tell us about your environment:

  • Node-RED version: v4.0.5
  • node.js version: v20.18.0
  • npm version: v10.8.2
  • Platform/OS: Raspberry Pi OS Bookworm Desktop 64-bit
  • Browser: Edge
@dceejay
Copy link
Member

dceejay commented Nov 5, 2024

In general only one node should be configured to one physical pin - so connecting multiple may indeed give an undetermined output. Use multiple wires out from the node - or link nodes to help fan out any inputs you need.

@waiweng83
Copy link
Author

In general only one node should be configured to one physical pin - so connecting multiple may indeed give an undetermined output. Use multiple wires out from the node - or link nodes to help fan out any inputs you need.

That's weird as we used that a lot on Raspberry Pi 4 without any problem.
If that's the case, is it possible to show some warning if multiple node are accessing the same pin?

@hardillb
Copy link
Member

hardillb commented Nov 5, 2024

The whole GPIO hardware subsystem changed between the Pi 4 and the Pi 5 (it's now all handled by a RP2040 sub processor iirc).

I would suggest looking at using the gpiod based node if possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants