I have a project that is utilizing a carrier board (balenaFin) and a Raspberry Pi Compute Module 3. The node red utilized some of the pins as digital inputs and outputs. It was up and working fine, then we were sent the CM3+ to put on the carrier board. I am using balena cloud and my dockerfile has everything versioned to my original project, however, with the new CM3+ some of the pins are not working with the node red (as shown in the pictures). Has anyone run into this with the CM3+? I can swap out the CM3 and CM3 + and the pins work fine, which is what i did to produce these photos.
And I also swap the carrier out with another CM3+ just to make sure it wasn't the that the RPi CM3+ was bad. Same results
I've not looked or ever played with a CM3 - but I would look to see if the BCM pin numbers are mapped differently to physical pin numbers and GPIO numbering.
Thanks, according to the documentation from Raspberry Pi both the CM3 and CM3+ blade pins are the same as I checked that as well, so it should be a drop in replacement as far as I can tell. Of course the table is quite big so I could be wrong but it appears identical
@dceejay @knolleary I've seen you two on a majority of the forums I read to help solve my issues so I figured you two were the best to contact and point me in the right direction. Someone at the carrier board manufacturer was able to solve the issue. They said "it turns out one of the dependencies used by node-red (raspberry-gpio-python) will fail to correctly identify the CM3+, instead it will see the board as a Pi 1 (which only has a 26 pin GPIO header), therefore any request to use a pin higher than that will be interpreted as invalid". I see with the new version of node-red, it removes any of the gpio modules that used to be included in the Node-red base package. I have mine set at 0.20.7, which module should I raise an issue with? Would it be Node-Red or the programmer of raspberry-gpio-python, or with Raspberry foundation directly? Or if you know a work around to it, like a python script that I could run from Node-red that would be helpful. I would say I'm beginner, but I can learn what i need to pretty fast, just lost a little in what direction to take
So just to check... the Node-RED node lets you select the pins you do want to use?
I don't think we remove any modules ? the latest gpio package is not part of the core but is still available here - https://www.npmjs.com/package/node-red-node-pi-gpio - and does indeed rely on the RPi.GPIO package from raspbian -
sudo apt install python-rpi.gpio should get the latest. If that is indeed failing then yes they need to fix it. If you can confirm we can try and prod them from this end.
Yes that is correct. Node red allows the selection, however once its selected it shows a little red box with "Stopped" next to it. I also noticed in the RPi.GPIO (https://pypi.org/project/RPi.GPIO/) version 0.5.11 it mentions a fix for pins >26
So which version of RPi.GPIO are you running ?
I show that I have version 0.6.5 installed. I just thought It might help for troubleshooting
Can you try some pure python to test the library against the CM modules ?
eg like https://raspi.tv/2013/rpi-gpio-basics-2-how-to-check-what-pi-board-revision-you-have
see if they do indeed report differently so we can report it.
Hello, I have exactly the same problem: The GPIOs work perfectly with CM3 but I have problems with CM3 +, the digital input nodes are in "Stopped" state. Could you solve it?
Did you try following the link above and follow those steps posted by Ivan? I have not tried it, as this was so long ago. But I solved it by utilizing python scripts in Execute and Daemon nodes as well as the RPi.GPIO library for python. It's a little more cumbersome than using node-red directly, but it worked.
The following works for me in CM3+ module (actually this is the device Panel PC - 7" Raspberry Pi Water-Resistant Industrial Panel PC (CPi-A070WR))
- Change line 34 to
You will get some validation errors to the node as it identifies the pin numbers as not valid but other than that it works
Hi All - I have changed the basic GPIO nodes t now use BCM rather than Pins - I haven't yet pushed it to the library as I think it needs testing first... you can install in manually by changing to your user directory eg
cd ~/.node-red npm i node-red-node-pi-gpio@beta
You can now either use the usual pin selector picture - but the pin field beneath is now the BCM GPIO number - and you can enter than manually if desired and it should now work ok with cm3 modules etc...
But as I said - I don't have one to test so please try it and give me feedback...