Get your device ready:
Download and install the latest version of Energia Platform http://energia.nu/download/ which is available for Windows, Mac and Linux.
Open the Energia IDE and select the following:LaunchPad w/ msp430f5529 (25 MHz) in the Tools/Board menu.
The Paho MQTT Embedded C/C++ Client https://eclipse.org/paho/clients/c/embedded/ has been pre-integrated into the Energia examples, making it extremely easy to connect to the IBM Internet of Things Platform Services.
Internet of Things Platform Quickstart connection:
Update the example source code to specify the desired WiFi SSID/Password to be used.
Verify/Compile the example.
Choose Upload and then Open Serial Monitor.
The application will connect to the IBM quickstart service and start sending data periodically.
Click on the link shown on the UART console to redirect to the IBM IoT Platform Visualiser.
Alternatively, you can view the data from your device at the following URL https://quickstart.internetofthings.ibmcloud.com/#/
Enter the ID (a twelve character string) and select to visualize your data.
The ID can be found by scrolling down on the LCD screen using the joystick button on the board.
Register your Device In Watson IoT Platform
To explore and make use of full capabilities of Watson IoT Platform, we need to setup and register your device(s) in it. This section shows how you can setup the same.
Carry out the steps present in this recipe to register your device(s) in IBM Watson Internet of Things Platform.
At this step, we have successfully created the Watson IoT service and registered your device(s) in it.
IBM Watson IoT Platform Registered connection
- Once you have access to an IBM Watson IoT Platform organization through Bluemix or the Marketplace, you can click to ‘Add a new device’ on the IoT organization dashboard.
- During the device registration process you will get device properties, copy these when you get them. They will look like this:
- Open File/Examples/MQTTClient/RegisteredWifi
- Update the example source code to specify the desired WiFi SSID/Password to be used.
- Update the example source code to add the registered organisation and auth-token.
- Verify/Compile the example
- Choose Upload and then Open Serial Monitor
- The application will connect to the IBM registered service and start sending data periodically