Skip to content

RPi Node-Red: Inject + Debug = Hello World

Authors: Ben, Sprinkels

Authors: Ben, Sprinkels

How to use the inject node to send the phrase "Hello World!" to the debug terminal :) This is a classic getting started example and is usually done when first learning to program in a new language.

Parts List:

None except for your raspberry pi already setup.

Getting Started:

Starting Node-Red:

  • Start Node-Red by clicking on the red Node-Red icon on the start menu under the “Programming” section.

Starting web browser Node-Red interface:

  • Start the Chromium web browser by clicking on the blue world icon on the top bar.
  • Click on the “Node-Red” link inside Chromium on the bookmarks bar.

Video Tutorial:

Programming Hello World! example:

Drag an inject node into your flow from the left node palette.
Double click on the inject node (named timestamp once dragged in) and change data type to “string”
Type “Hello World!” into the Payload section just after the “string” datatype selector.
Drag in a Debug node from the output node palette.
Drag a connection line between the output of the inject node and the input of the debug node – click on the dots on the sides of the nodes to do this.
Deploy your new flow
Click the button on the left of the Inject node.
Click on the “debug” tab on the right side – the icon looks like a bug 😉 You should see your “Hello World!” string displayed

Review:

Inject and debug nodes will be used extensively throughout our other lessons and are the building blocks of understanding how JSON messages are sent between nodes.

Whats Next:

Why not try connect an RGB LED to the IO pins now that you know the basics!

RPi GPIO: Wiring LED

Back To Top