About
This module is PiFace CAD node for node red.
Install via Git
Run the following code in your raspberry pi terminal
cd /home/pi/.node-red/node_modules
git clone https://github.com/erfanjahanshahlo/node-red-contrib-pifacecad.git
and restart your node red server or reboot your raspberry pi.
Install via npm
Run the following code in your raspberry pi terminal
cd /home/pi/.node-red/node_modules
npm install node-red-contrib-pifacecad
and restart your node red server or reboot your raspberry pi.
Install via Download
in step one download this repository and rename main folder to node-red-contrib-pifacecad
like the schematic below and copy to /home/pi/.node-red/node_modules
path in your raspberry pi and restart your node red server or reboot your raspberry pi.
-node-red-pifacecad-lcd
---package.json
---pfc_lcd.py
---pfc_lcd.js
---pfc_lcd.html
---pfc_switch.py
---pfc_switch.js
---pfc_switch.html
Install Dependencies
For install dependencies, in your raspberry pi terminal run the below command.
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install python{,3}-pifacecad
Enable SPI
To work with PiFace CAD you must enable the SPI protocol on raspberry pi. To do this you need to execute the following commands in the terminal.
sudo raspi-config
Interfacing Options -> SPI -> Yes
Getting started
To work with lcd node:
Here's how to send data to this node.
ROW,COL:YOUR TEXT
for clear lcd send 1,1:
to the node to clear lcd.
To work with switch node:
This node is used to get the status of the keys embedded in the PiFace CAD module. You need to enter the key number that starts from zero in the node settings field and sends the true node to the output each time the key is pressed.
Be careful not to use any spaces in any of these commands.