Node Red
Node Red
NODE-RED
Node-RED is a flow based development tool for visual
programming.
It is developed originally by IBM for wiring together
We need a destination for the Inject node’s message. We’ll use the
Debug node, which will print out our message to the debug
console window.
1. From the node palette, select a Debug node and drag it onto the
flow, and then place it to the right-hand side of the Inject node.
2. Wire the nodes together. Place the mouse cursor over the Inject
node’s output port (a small gray square on the right-hand side
of the node), then left-click and drag a wire over to the input
port of the Debug node. A gray wire should now be connecting
the output of the Inject node to the input of the Debug node.
3. The Debug node will automatically print
the msg.payload property to the console window, which we’ll
see in the next step.
Step3- Deploy and Run
1. Click the Deploy button.
2. Click the Debug tab in the right-hand side of the
editor window.
3. Click the Inject node’s button, which is the blue
square coming out from the left-hand side of the
Inject node. Clicking the button is what will inject
a message into the flow.
4. A “Hello, world!” message should appear in the
debug window.
5. Click the Inject node again to send another
message.
Hello World Example Part#2
Step1-Add a Function Node
First off, let’s add the current time to the message.
4. Click Deploy.
test it.
This is the simplest flow possible and will send the
gpio
Then install it
Now you can see in node palette,and find the
raspberry pi nodes.
Connecting to a GPIO pin
except this time add 0 as the payload message, and call this
node Off.
Deploying the Flow
Wiring up the input and output nodes.
Our flow is finished, so we can deploy it. Click on the
Deploy button on screen.
A message should pop up at the top saying
“Successfully deployed”.
Now click on the blue square on the left of
the On node to inject the message 1. The Red
LED node receives the message and your LED should
light up.
You should be able to turn the LED off by clicking the
blue square on the Off node, which injects the
message 0
Debugging the flow
If your LED doesn’t turn on and off, firstly check that you
have wired the components correctly on the breadboard.
Make sure you have wired your LED to
both ground and pin 17 on your Raspberry Pi.
You can also display Node-RED debugging information