Overview

Skill Level: Intermediate

Requires basic knowledge of programming ARM mbed devices and use of Watson IoT in Bluemix

This recipe/workshop demonstrates how developers can connect an ARM mbed device, running mbed OS and mbed-client, into Watson IoT through ARM's mbed Connector cloud.

Ingredients

Slide011

 

The following prerequisites are required to complete this workshop:

  1. A NXP K64F development board (https://developer.mbed.org/platforms/FRDM-K64F/)
  2. Micro USB cable
  3. Ethernet Cable connected to an ethernet port with access to the Internet
  4. Bluemix account setup and validated (https://console.ng.bluemix.net)
  5. ARM mbed developer account created (https://developer.mbed.org) 
  6. Validate access to the ARM mbed Connector dashboard via your ARM mbed developer account credentials (https://connector.mbed.com)
  7. Serial terminal program installed and accessible (i.e. putty and/or CoolTerm, etc...)
  8. For Windows users, ARM's mbed USB driver must be installed:  https://developer.mbed.org/media/downloads/drivers/mbedWinSerial_16466.exe
    1. Insert the micro USB cable and mbed device (use the USB connector immediately next to the K64F "reset" button
    2. THEN, run the mbed serial driver installer (will require administrator priviledge to install) 

Access to all links and the workshop PDF can be found here:

Step-by-step

  1. What we will build

    Slide02

  2. Getting Started!

    Slide031

  3. Create our Bluemix Account

    Slide04

  4. NXP FRDM-K64F Overview

    Slide05

  5. NXP FRDM-K64F Pinmap

    Slide06

  6. Install the necessary tools

    Slide07

  7. Create your mbed Developer Account

    Slide08

  8. Create/Confirm your mbed Connector Dashboard

    Slide09

  9. Import our K64F Project

    ibmWatsonWorkshop-v1.2

  10. Create and set provisioning credentials within our K64F endpoint code

    Slide11

  11. Run our endpoint code

    Slide12Slide13

  12. Status Check!

    Slide141

  13. Create our Watson IoT Service Instance

    Slide16

  14. Create our Watson IoT Application Keys

    Slide17

    Slide18

  15. Create our Sample Watson IoT NodeRED Application

    Slide19

    Next we have to bind our Watson IoT service instance to the new application we just created: 

    Slide20

  16. Create our mbed Connector Access/API Token

    Slide21

     

  17. Acquire our mbed Connector "DOMAIN" value

    Slide22

     

  18. Configure our Watson IoT ARM mbed Connector Bridge

    Slide23

     

  19. Status Check!

    Slide24

  20. Copy the Sample NodeRED flow JSON

    Slide25

     

  21. Import the NodeRED flow JSON

    Slide26

     

  22. Configure the NodeRED Flow

    mbedConnect2016_WatsonBridgeWorkshop-v1.1-images

    Slide28

    Slide29

  23. Putting it all together

    Slide30

  24. Checking the Serial Terminal Output

    Slide31

  25. Examining the NodeRED flow debug information

    Slide32

  26. Looking at Watson IoT and we see our mbed device!

    Slide33

    Slide34

  27. Ah Ha!!

    Slide35

  28. Summary

    Slide36

2 comments on"Connecting ARM mbed devices to the Watson IoT cloud using mbed Connector"

  1. Thank you for sharing this with us, Doug. I have one question: I can’t seem to get the accelerometer to work reliably. Having looked through the code, it seems the on-board accelerometer chip (the FXOS8700CQ) needs to fire an interrupt so that the motion_processor thread processes the event, reads data from the chip and sends it to NodeRed. Is this correct? If yes, what could be the reasons the events don’t fire reliably. I scarcely get any acceleration messages in NodeRed at all.

    Hi merenedo07… can you try “shaking” the K64F? That should trigger accelerometer events… let me know if that works for you!

  2. I’m a beginner, and most of it, analog technology. I’m still a beginner, in the figure.

Join The Discussion