How to use nodes
In this section, we will learn how to use nodes.
Visual programming in Node-RED is a little different from other visual programming tools because it uses flow-based programming. But rest assured, it's not difficult at all. If you actually create a few simple flows, you should be able to master how to use nodes in Node-RED.
So, let's now create a sample flow using some typical preinstalled nodes. The environment is the same for Raspberry Pi, Windows, and macOS systems. Please use your favorite environment.
Common category
Let's introduce the nodes that we'll use to make our flow. You can pick all of the nodes up and place them on the palette from the common category.
Create a sample flow with nodes in the common category. The following four nodes are used:
- The inject node
- The complete node
- The catch node
- The debug node
Place and wire up the nodes as shown in the following figure: