Scaling an IoT deployment? Join our webinar on May 28th where we dive into real-world scaling pain points and how to overcome them.

Blues Developers
What’s New
Resources
Blog
Technical articles for developers
Newsletter
The monthly Blues developer newsletter
Terminal
Connect to a Notecard in your browser
Developer Certification
Get certified on wireless connectivity with Blues
Webinars
Listing of Blues technical webinars
Blues.comNotehub.io
Shop
Docs
Button IconHelp
Notehub StatusVisit our Forum
Button IconSign In
Sign In
Sign In
Docs Home
What’s New
Resources
Blog
Technical articles for developers
Newsletter
The monthly Blues developer newsletter
Terminal
Connect to a Notecard in your browser
Developer Certification
Get certified on wireless connectivity with Blues
Webinars
Listing of Blues technical webinars
Blues.comNotehub.io
Shop
Docs
Notehub
Notehub Walkthrough
Notehub API Reference
Routing Tutorial
Host Firmware Updates
Host DFU Overview
Notecard Outboard Firmware Update
IAP Firmware Update
Notehub API Requests for DFU
Notecard API Requests for DFU
Environment Variables for DFU
Configuring a Slack Route
Configuring an Amazon S3 Route
Configuring an Arduino IoT Cloud Route
Writing FirmwareCreating the RouteSetting Up Arduino CloudCreating a DashboardFinal Configuration
Configuring a Snowpipe Route
homechevron_rightDocschevron_rightNotehubchevron_rightConfiguring an Arduino IoT Cloud Route

Configuring an Arduino IoT Cloud Route

Notehub offers a full integration with the Arduino Cloud , Arduino’s platform for remotely monitoring and controlling IoT devices.

In this guide you'll learn how to create an Arduino Cloud route, how to write firmware that uses the integration, and how to build dashboards for your devices on Arduino Cloud.

Let's start get started by looking at the firmware your devices need to run.

Writing Firmware

In order to use the Arduino Cloud route your firmware must use the Arduino team's ArduinoIoTCloud library. This section covers how to install the library and how to configure it for a Notecard-based project.

  1. If you haven't already, download and install Arduino IDE on your machine.

  2. Within Arduino IDE, open the libraries tab, search for the ArduinoIoTCloud library, and click Install. Installing the ArduinoIoTCloud library

  3. The ArduinoIoTCloud library has a sample Notecard sketch you can use to start your firmware. To use it, open your File --> Examples menu in Arduino IDE, and scroll to find and select the ArduinoIoTCloud --> ArduinoIoTCloud-Notecard example. The ArduinoIOTCloud Notecard example

  4. With the sketch open, select tab for the thingProperties.h file, locate the NOTECARD_PRODUCT_UID constant, and update it with your Notehub project's ProductUID.

    #define NOTECARD_PRODUCT_UID "<your value goes here>"
  5. Upload this starting sketch to your device.

  6. After uploading, your device should immediately start uploading test data to Notehub. You confirm that your device is connected by checking your Notehub project's Devices screen. The device successfully connected in Notehub

Creating the Route

With your device connected, your next step is to create a Notehub route that connects your Notehub project to Arduino Cloud.

  1. Open your Notehub project's Routes page, and click the Create Route button.

  2. Scroll down and click the Arduino IoT Cloud's Select button. The Arduino IoT Cloud route in Notehub

  3. Click the Create Route button to create the route. The create route button in Notehub

Setting Up Arduino Cloud

To complete the integration, you next need to connect your devices in Arduino Cloud to the devices in your Notehub project.

  1. Create an Arduino Cloud account (if you don't have one already).

  2. Within Arduino Cloud, go to your Devices page , and click the + Device button to create a new one.

    The new device button in Arduino Cloud

  3. Select the Manual option.

    The manual device option in Arduino Cloud

  4. Copy both your device's Device ID and Secret Key. (You need both in the next step.)

    The device keys in Arduino Cloud

  5. Back in your Notehub project, go to your Devices page, double click your device, and go to the Environment tab. Here, define two new environment variables for your device, _arduino_device_id and _arduino_secret_key, and set them as follows.

    1. Set _arduino_device_id to your device's Device ID.

    2. Set _arduino_secret_key to your device's Secret Key.

    The Arduino Cloud environment variables within Notehub

The _arduino_device_id and _arduino_secret_key environment variables are necessary for Notehub to be able to send data to the correct devices in Arduino Cloud. If you wish to use multiple devices, you need to repeat the preceding steps for each device you wish to connect.

Creating a Dashboard

With your devices connected you're ready to start building dashboards using your data. Let's set one up to see how it works.

  1. To create a dashboard in Arduino Cloud you must first create a Thing , or a virtual twin of your hardware/setup. To do so, open the Things menu in your Arduino Cloud dashboard, and click the + Thing button.

  2. On the next screen do the following steps (see image below):

    1. Give your new thing a name.

    2. Associate your thing with your device.

    3. Add the following cloud variable.

      • Name: led
      • Type: Boolean
      • Permission: Read & Write
      • Update Policy: On change

    The steps to create a Thing in Arduino Cloud

  3. With your Thing in place, next head to the Dashboards section of Arduino Cloud, and click the + Dashboard button to create a new dashboard.

  4. On the next screen take the following steps.

    1. Click the Add button.
    2. Click the THINGS tab.
    3. Selct your Thing from the list. The steps to create a dashboard on Arduino Cloud
  5. Finally, click the Create Widgets button, and Arduino will automatically generate a starting point for your new dashboard. A simple dashboard with a switch

And at this point—you're all set! If all went well, toggling the switch in the Arduino Cloud dashboard should toggle the onboard LED on your host.

With the integration working, let's wrap up by discussing some things you may wish to configure.

Final Configuration

Updating Properties

The default ArduinoIoTCloud firmware defines three properties for all projects:

  • led: A boolean that controls the host's built-in LED.

  • potentiometer: An integer value tied to a potentiometer. The sketch expects a potentiometer to be connected to the host's A0 pin.

  • seconds: An integer that the sketch increments and publishes to Arduino Cloud every 5 minutes.

Most projects will want to comment out (or remove) the potentiometer and seconds properties, and add their own custom values. The following section shows how to remove the unused properties, and add a new temp one for demonstration.

  1. In Arduino IDE, open your project's thingProperties.h file, find where the global variables below are declared, and make the following changes.

    bool led;
    // int potentiometer;
    // int seconds;
    float temp;
  2. In the same file, scroll down to find the code that makes calls to ArduinoCloud.addProperty() and make the following changes. The last line tells Arduino Cloud that a new temp property should be available, should be read only (Permission::Read), and should have a new value published every 5 minutes publishEvery(5 * MINUTES).

    ArduinoCloud.addProperty(led, Permission::ReadWrite).onUpdate(onLedChange);
    // ArduinoCloud.addProperty(potentiometer, Permission::Read).publishOnChange(10);
    // ArduinoCloud.addProperty(seconds, Permission::Read).publishEvery(5 * MINUTES);
    ArduinoCloud.addProperty(temp, Permission::Read).publishEvery(5 * MINUTES);
  3. And finally, open your sketch's .ino file, find the loop() function, and make the following changes. The code at the bottom uses the Notecard's card.temp request to take a temperature reading from the Notecard's onboard temperature sensor.

    void loop() {
      ArduinoCloud.update();
      // potentiometer = analogRead(A0);
      // seconds = millis() / 1000;
      J *req = NoteNewRequest("card.temp");
      if (J *rsp = NoteRequestResponse(req))
      {
          temp = JGetNumber(rsp, "value");
          NoteDeleteResponse(rsp);
      }
    }
  4. Back in Arduino Cloud, return to the Thing you created earlier and add the following Cloud Variable to represent the temp property you just added to your firmware.

    • Name: temp
    • Type: Floating Point Number
    • Permission: Read Only
    • Update Policy: Periodically, every 300 seconds
  5. Finally, return to your Dashboard, and add widgets for your new temp cloud variable. If all went well, you should see the temperature of your device on your dashboard, and the value should update according to your provided interval. The Arduino Cloud dashboard with a temperature

Using Interrupts

If you’re using an interrupt-capable host (like the Blues Swan), you may wish to enable interrupts. If you utilize interrupts, the Notecard will signal each time new data arrives, so the host can process it without delay. Without the interrupt the host has to continuously poll the Notecard for new information.

To enable interrupts you must do two things.

Firmware

First, open your sketch's .ino file and uncomment the #define ATTN_PIN 9 line. The value of the constant needs to be set to an interrupt capable pin on your host.

#define ATTN_PIN 9

Wiring

Second, you must connect your Notecard's ATTN pin to the pin on your host you specified above.

For example, if you're using a Blues Swan and have #define ATTN_PIN 9 defined, you need to connect the Swan's D9 pin to the Notecard's ATTN pin to take advantage of the interrupt.

Can we improve this page? Send us feedback
© 2025 Blues Inc.
© 2025 Blues Inc.
TermsPrivacy
Notecard Disconnected
Having trouble connecting?

Try changing your USB cable as some cables do not support transferring data. If that does not solve your problem, contact us at support@blues.com and we will get you set up with another tool to communicate with the Notecard.

Advanced Usage

The help command gives more info.

Connect a Notecard
Use USB to connect and start issuing requests from the browser.
Try Notecard Simulator
Experiment with Notecard's latest firmware on a Simulator assigned to your free Notehub account.

Don't have an account? Sign up