# \[Announce\] node-red-contrib-pifacecad

**URL:** <https://discourse.nodered.org/t/announce-node-red-contrib-pifacecad/20165>\
**Category:** Share Your Nodes\
**Created:** [10 January 2020 15:13 UTC](https://discourse.nodered.org/t/announce-node-red-contrib-pifacecad/20165 "2020-01-10T15:13:35Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![erfanjahanshahlo](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/erfanjahanshahlo/32/16007_2.png) [@erfanjahanshahlo](https://discourse.nodered.org/u/erfanjahanshahlo)\
**Post date:** [10 January 2020 15:13 UTC](https://discourse.nodered.org/t/announce-node-red-contrib-pifacecad/20165/1 "2020-01-10T15:13:35Z")

</div>

# About

This module is PiFace CAD node for [node red](https://nodered.org/).

# Install via Git

Run the following code in your raspberry pi terminal

```auto
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

```auto
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.

```auto
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.

```auto
sudo raspi-config
Interfacing Options -> SPI -> Yes

```

# Getting started

_ **To work with lcd node:** _  
Here's how to send data to this node.

```auto
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.

---

<div class="post-metadata">

**Author:** ![Bobo](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bobo/32/8401_2.png) [@Bobo](https://discourse.nodered.org/u/Bobo)\
**Post date:** [11 January 2020 05:03 UTC](https://discourse.nodered.org/t/announce-node-red-contrib-pifacecad/20165/2 "2020-01-11T05:03:22Z")

</div>

Do you have any more info on the actual node usage? What does it do?  
Doesn't seem to be any examples or other info on GitHub.

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [11 January 2020 11:08 UTC](https://discourse.nodered.org/t/announce-node-red-contrib-pifacecad/20165/3 "2020-01-11T11:08:04Z")

</div>

> [@erfanjahanshahlo](#):
>
> Run the following code in your raspberry pi terminal
> 
> ```auto
> cd /home/pi/.node-red/node_modules
> npm install node-red-contrib-pifacecad
> 
> ```

This should be changed to

```auto
cd /home/pi/.node-red
npm install node-red-contrib-pifacecad

```

---

<div class="post-metadata">

**Author:** ![erfanjahanshahlo](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/erfanjahanshahlo/32/16007_2.png) [@erfanjahanshahlo](https://discourse.nodered.org/u/erfanjahanshahlo)\
**Post date:** [11 January 2020 18:32 UTC](https://discourse.nodered.org/t/announce-node-red-contrib-pifacecad/20165/4 "2020-01-11T18:32:38Z")

</div>

Hello dear friend. You don't need a `cd` command at all, but we'll run this to make sure that node red packages are installed in the `node_modules` folder so we can go to this folder. Thanks for your advice  
Excuse me if I can't speak good English.

---

<div class="post-metadata">

**Author:** ![erfanjahanshahlo](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/erfanjahanshahlo/32/16007_2.png) [@erfanjahanshahlo](https://discourse.nodered.org/u/erfanjahanshahlo)\
**Post date:** [11 January 2020 18:40 UTC](https://discourse.nodered.org/t/announce-node-red-contrib-pifacecad/20165/5 "2020-01-11T18:40:16Z")

</div>

This node is for controlling the LCD upon the [pi face cad board](http://www.piface.org.uk/shop/#piface_control_and_display). And in other updates, you'll be able to read the status of the buttons as well.  
For example, you can use the example of [this node](https://discourse.nodered.org/t/announce-node-red-contrib-lcd/20009).
