Hackstaer.io member Tyeth has published a new Raspberry Pi ZeroW project offering a quick recreation of the Pimoroni Python example using Node-RED as the trigger, with dynamic text. If you have not yet had a chance to play with your Inky PHAT, this new project is classed as a beginner skilled build and should take approximately 30 minutes, letting you create a quick project using Node-RED. To learn more about Node-RED, check out the video embedded below.
What is Node-RED?
Node-RED is a programming tool for wiring together hardware devices, APIs, and online services in new and interesting ways. It provides a browser-based editor that makes it easy to wire together flows using the wide range of nodes in the palette that can be deployed to its runtime in a single-click. This makes it an excellent choice for both beginners and experienced developers looking to create complex IoT (Internet of Things) applications quickly and efficiently.
Node-RED was developed by IBM and has since become a popular tool in the maker community due to its versatility and ease of use. It supports a wide range of hardware platforms, including the Raspberry Pi, making it an ideal choice for projects that require integration with various sensors, actuators, and other devices.
Setting Up Node-RED on Raspberry Pi
To set up Node-RED on your Raspberry Pi, you can follow the detailed instructions available on the Hackstaer.io project page. The setup process is straightforward and involves installing Node-RED, configuring it to run on your Raspberry Pi, and then creating your first flow.
1. Install Node-RED: Begin by installing Node-RED on your Raspberry Pi. This can be done using the command line. Open a terminal window and enter the following command:
“`
bash <(curl -sL https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered)
```
This script will install Node-RED and Node.js, which is required to run Node-RED.
2. Start Node-RED: Once the installation is complete, you can start Node-RED by typing:
“`
node-red-start
“`
This will start the Node-RED server, and you can access the editor by opening a web browser and navigating to `http://
3. Create Your First Flow: With Node-RED running, you can start creating your first flow. The browser-based editor allows you to drag and drop nodes onto the workspace and connect them to create a flow. For this project, you will use nodes to interact with the Inky PHAT display.
Using Inky PHAT with Node-RED
The Inky PHAT is a small, low-power e-ink display that is perfect for displaying dynamic text and images. In this project, you will use Node-RED to send text to the Inky PHAT display. This involves creating a flow that triggers the display to update with new text.
1. Add Nodes: In the Node-RED editor, add the necessary nodes to your flow. You will need an inject node to trigger the flow, a function node to format the text, and an exec node to send the text to the Inky PHAT.
2. Configure Nodes: Configure each node to perform the desired actions. For example, the inject node can be set to trigger at specific intervals, and the function node can be used to format the text before sending it to the display.
3. Deploy the Flow: Once your flow is configured, click the deploy button to deploy it to the Node-RED runtime. Your Raspberry Pi will now update the Inky PHAT display with the specified text at the intervals you set.
To set up Node-RED on your Raspberry Pi, jump over to the Hackstaer.io project page for a simple introduction to the extensive Internet of Things programming system.
Source: Hackster.io
Latest Geeky Gadgets Deals
Disclosure: Some of our articles include affiliate links. If you buy something through one of these links, Geeky Gadgets may earn an affiliate commission. Learn about our Disclosure Policy.