Skip to content

Latest commit

 

History

History

Ex9 - Adding Webservices to Simple Remote Monitoring Application

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

Adding Cloud Services To The Simple Remote Monitoring Application

In this example we will use the device code from Example 3, but adapt the agent code to send data to an additional cloud service, IBM Watson IoT.

Skill level

Beginner

This example will focus on writing Squirrel code. Please visit the Getting Started Guide on the Electric Imp Dev Center to learn how to configure your device with BlinkUp™ and how to use the Electric Imp IDE, impCentral™.

What You Learn

  • How to update agent code to send data to multiple cloud services.

What You Need

Instructions

  • Follow the first six instructions in Example 3 to get the device code running.
  • Copy and Paste the Agent Code in this folder into the Agent Code pane in the impCentral code editor.
  • Configure Initial State:
    • Sign into Initial State.
    • Find your Streaming Access Key on the My Account page
    • Navigate back to impCentral.
    • In the Agent code enter your Streaming Access Key into the runtime constant IS_STREAMING_ACCESS_KEY
  • Configure IBM Watson IoT:
    • Watson IoT takes quite a bit more setup. Follow the instructions here to get the keys you will need from Watson IoT.
    • Copy and paste your API_KEY, AUTH_TOKEN and ORG_ID into the runtime constants WATSON_API_KEY, WATSON_AUTH_TOKEN and WATSON_ORG_ID.
  • Hit the Build and Force Restart button to start the code.
  • Use the cloud services to visualize your data.