Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Info

Expected completion time of this lab: 

Excerpt

20 min

.

  • Create the following

    Create a Node-RED flow

    . Clicking on 0 and 1 should switch the LED on/off
    Image Removed Tip
    titleA little help

    The function contains something very similar to:

    Code Block
    msg.payload            = {
        "method" :  "PUT",
        "url" :     "/digital_out/INDICATOR_0",
        "body":     {
            'value': msg.payload,
        },
        "token":    "myToken",
    }
    return msg;

    How did you configure the ibmiot output node?

    Info
    iconfalse
    titleAnswer 1:
  • Add a dashboard "switch" node:
    Image Removed
  • Make sure you can actuate your mote's LED from your phone

...

iconfalse
titleExtra points!

...

  • which controls one of the LED motes listed in Lab 33. MQTT Control Loop

  • Add a dashboard "switch" node:

    Image Added
  • Describe what your flow

Answer 1:

Challenge

  • If you have an LED mote, add a flow to your Node-RED instance such that publishing to topic dustacademy/all_leds with body {"status": 1} or {"status": 0} turns your LED on or off

  • describe your flow

Answer 2:

  • make sure you can switch on all LEDs of all motes