Pi Lite with Node-RED
This was trivially easy, but it’s a nice example of how simple integration is now becoming due to the strength of various open source communities.
Pi-LITE
The Pi Lite is an array of lots of LEDs (126 in a 9×14 matrix to be exact). I bought a pair of them during the initial Kickstarter campaign. It has its own micro controller, and is accessed via a serial port[1], which means it’s pretty easy to get messages onto it from most languages and frameworks.
Node-RED
Node-RED is a visual integration tool that runs on node.js. It’s very easy to get it going on a Pi using Raspbian:
# First install node.js wget http://node-arm.herokuapp.com/node_latest_armhf.deb sudo dpkg -i node_latest_armhf.deb # Make sure we have git sudo apt-get install -y git-core # Install Node-RED git clone https://github.com/node-red/node-red.git cd node-red npm install --production # Install serialport package npm install serialport #Start Node-RED node red.js
Once up and running browse to http://pi_ip:1880 and wire together a ‘Hello World’ example with an inject input (with a Paylod of ‘Hello World’) and a serial output (configured for /dev/ttyAMA0 at 9600 baud):
Now clicking on the button on the Hello World injector results in Hello World scrolling across the Pi Lite in large friendly letters :)
Once that’s running then it’s easy to substitute messages coming from tweets, MQTT queues or whatever else and feed them onto the matrix.
Note
[1] Since the GPIO serial port is normally set up for logging and console access it’s necessary to do some reconfiguration before using the Pi Lite.
Filed under: Raspberry Pi | 1 Comment
Tags: node, Node-RED, node.js, PI, Pi-Lite, Raspberry Pi, raspbian, RPi, serial, serialport, ttyAMA0
One Response to “Pi Lite with Node-RED”