node-red / node-red-nodes

Extra nodes for Node-RED
Other
986 stars 592 forks source link

PiFace Node #150

Closed Tobi-BPi closed 8 years ago

Tobi-BPi commented 8 years ago

Hi!

i am useing PiFace and you Node.Red Piface Node. First of all... Thank you for this!

But with my Pi2 i have a problem with gpio load spi in new Pi2 i think this will not working and generate a Error. [37-rpi-piface.js] Error: "gpio load spi" command failed for some reason.

But the PiFace is working. other question.

is there a posibility to use the PiRack included 4 pieces of Piface? Piface adress 0, 1, 2, 3,

Thank you very much

dceejay commented 8 years ago

Hi The main trick to get PiFace working is to disable the Device Tree (under advanced option of the sudo raspi-config command. See this thread - https://groups.google.com/forum/#!topic/node-red/usOjsnIZjYw I have updated the PiFace node README with this info. https://www.npmjs.com/package/node-red-node-piface

Not sure about the PiRack as I don't have access to one it would be tricky to offer support. Happy to look at a pull request for it though if someone can do it.

Tobi-BPi commented 8 years ago

Hello and Thank Yu for answer.

I am useing Raspi2 with wheezy and my PiFace is working but this Error is shown in my logfile. If i have Problems in the Future i will try this methode.

But my question was about the PIRack....

In my opinion it will be a big feature in NODE-RED to use the PiRack also. Because the posibilities to use NODE RED in a big and complex system is extreme.

With this Rack its possible to use up to 4 PiFaces. so you will get 32 Outputs (incl 8 Relays) and 32 Inputs (incl 16 HW buttons)

http://www.piface.org.uk/products/piface_digital/

http://www.piface.org.uk/guides/Using_the_PiFace_Rack/ here you will find a example to see the programming script for PiFaces onto the PiRack.

is there some interesting material for you? i'm sorry but in SW programming i'm a absolutely newbie!

Tobi

dceejay commented 8 years ago

Thanks for that... the extra boards are actually addressed by changing jumpers on the boards - nothing to do with the PiRack... so if we can find out the addressing required it should be possible to test with a single PiFace... so hold that thought.

dceejay commented 8 years ago

To your original error - can you run the command outside of Node-RED at the command prompt. gpio load spi does that work ? If not do you have gpio installed correctly as per the readme, and the device tree disabled ?

Tobi-BPi commented 8 years ago

ERROR: in this moment i disable the device tree but i dont know what the device tree is for.

now the Error is no longer availible.

MULTIBLE DEVICES: at the first look i think the adressing is qiuet simple build, or? http://www.piface.org.uk/guides/Using_the_PiFace_Rack/Using_PiFace_Emulator_with_multiple_PiFaceDigitals/ and http://www.piface.org.uk/guides/Using_the_PiFace_Rack/Addressing_multiple_PiFace_Digitals/

But i don't know how much work and adjustment is this to change the node.

dceejay commented 8 years ago

Actually this is not possible with the current code. The gpio command we use does not allow us to select which SPI sub-address to use. The underlying PiFace.c needs extending to allow piFaceSetup to accept an extra parameter. While this is possible it's not something we want to take ownership of.

dceejay commented 8 years ago

I'm going to close this as we we aren't going to take ownership of the gpio code required to extend this to the pirack.