node-red / node-red/node-red-nodes

node-red-node-pi-gpio: Support for GPIO.BCM mode in nrpio.py

Open
#747 8 comments 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.