node-red / node-red/node-red-nodes
node-red-node-pi-gpio: Support for GPIO.BCM mode in nrpio.py
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 1.1k
- Forks
- 612
- Avg merge
- 13h 57m
- Merged PRs (30d)
- 3
Description
Hi,
we started working on some automation tasks with node-red on a industrial raspi. For setting a GPIO output with the pi-gpio node I encounter the problem, that the mode GPIO.BOARD is not supported with raspi compute module.
Running the python script manually I get the following error:
Traceback (most recent call last):
File "./nrgpio.py", line 34, in <module>
GPIO.setmode(GPIO.BOARD)
RuntimeError: BOARD numbering system not applicable on compute module
Could you please add the option to let the user choose either GPIO.BOARD or GPIO.BCM as mode.
Changing the mode manually in the script works like a charm.
Thanks,
Tobias
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by inspecting nrpio.py and the nrgpio.py entry point shown in the traceback, then trace how the pi-gpio node selects its GPIO mode. The work is done when users can choose GPIO.BOARD or GPIO.BCM and the selected mode works on the relevant Raspberry Pi hardware; no test file is mentioned in the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- embedded-iot
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100