Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Current »

Expected completion time of this lab: 20 min.

The analog input pins only support a voltage between 0 and 1.8V. NEVER apply a volyage outside that range, of you will fry the board.

Test the voltage of your input using a voltmeter before applying to the board.

For testing, you can leave the pin floating (the input voltage should be around 1V), or tied to ground.

  • Create the following Node-RED flow to enable analog input pin A0
     

    A little help

    The function node at the top contains the following code:

    msg.payload            = {
        "method" :  "PUT",
        "url" :     "/analog/A0",
        "body":     {
            "enable":      msg.payload,
            "rate":        10000,
            "sampleCount": 1,
            "dataFormat":  0
        },
        "token":    "myToken",
    }
    return msg;
  • You should end up with the following dashboard

Extra points!

Create little control loops between sensors and actuators!

  • No labels