Getting started with ARM mbed and MtConnect04S

ARM® mbed™ is an IoT development platform for ARM-based microcontrollers. The best thing about them is they build the IDE in the browser. You won’t need to install SDKs on your PC or MAC. There are already a lot of open source examples in the community. You can visit ARM mbed to learn more about it.

To introduce you to development using the MtConnect04S applications with ARM® mbed™, we will provide you with step-by-step instructions.

Motion Sensor Kit for mbed

The original Motion Sensor Kit is demonstrated in the previous tutorial. Now we have upgraded the extension board, called MtAid01-mbed, which has already integrated mbed™ DIPDAP probe together. You could get more to easily to begin your development.

The Motion Kit for mbed includes MtConnnect04S with BLE mcu M904S, MtSense03 with motion sensors, MtAid01-mbed, and the extension board for mbed.motion-kit-for-mbed

Order Motion Sensor Kit for mbed

Reprogram MtAid01-mbed

When you get a new MtAid01-mbed, it doesn’t contain a valid firmware to use. First we need to program it. It’s easy, just copy and paste.

  1. Push the button and connect to PC: It will appear as a disk drive called CRP Disabled.desktop-mbed-usb-drive-without-firmware.png
  2. Open the CRP DISABLED drive, and delete the file named with firmware.bin.crp-disabled-drive-remove-firmware-bin.png
  3. Download firmware lpc11u35_swdap_nrf51822_if_crc.bin, and copy to the CRP DISABLED drive. Then unplug your MtAid01-mbed and plug it back in.
  4. It will show now appear as a disk drive called DAPLink. Now the MtAid01 is ready to use. mtaid01-mbed-daplink-drive.png
  5. If you have a MAC or Linux, use command to program MtAid01-mbed
    dd if={new_firmware.bin} of={firmware.bin} conv=notrunc

After reprogramming, follow the bottom chart, and stack MtConnect04S, MtSense03 and MtAid01-mbed together.


Sign up

Register a new account on mbed developer%e8%9e%a2%e5%b9%95%e5%bf%ab%e7%85%a7-2016-11-16-%e4%b8%8a%e5%8d%8810-10-45


Open the page of Compiler

螢幕快照 2016-11-16 上午10.18.33.png

Click import a program. It will need to add a platform the first time. It shows a lot of mbed-supported boards. MtConnect04S is compatible with the Nordic nRF51-DK. Select Platform vendor as Nordic Semiconductor ASA on the left side, and then the Nordic nRF51-DK board will show up. Click it.

螢幕快照 2016-11-16 上午10.29.09.png

Then click the button Add to your mbed Compiler on the right side.螢幕快照 2016-11-16 上午10.41.58.pngGo back to compiler page and reload. Then search for mtconnect04s. There will be a program named MtConnect04S_Motion_Sensing in the list. Select it and click the Import! button.螢幕快照 2016-11-16 上午10.49.21.png

Now you have your first mbed program! It is just like any typical IDE that you usually use on PC. File explorer is on the left side, the editor is in the center, compile messages are on the bottom and the relative attributes are showed on the right side. The source code main.cpp is on the right side and this is what reads data from sensors via I²C bus and advertises over Bluetooth.

We don’t have to modify the code for now. So, click Compile.螢幕快照 2016-11-16 上午10.53.24.png

The compiler will start to compile. When it finishes, it will download a .hex file automatically. Save it to anywhere you want. This is the firmware binary that we will run on MtConnect04S.

If you are familiar with Nordic SDK, the .hex file downloaded is include both application and SoftDevice.


Drag the .hex file to the USB Drive DAPLINK. It will program MtConnect04 automatically. When it finishes, the drive will be removed automatically, and you may see an unexpected removing drive message.

螢幕快照 2016-11-16 下午12.12.11.png

Then push the button on MtAid01-mbed, or replug the USB in to re-power up the kit. The LED on MtConnect04S will begin blinking. At the same time, MtConnect04S continuously reads the 3-axis accelerometer and gyrometer data from MtSense03, and advertises them through Bluetooth in real-time.mbed-motion-blinking


Get it on Google Play

The MtM Motion Demo app shows the value measured from the MtSense03. When you move the kit, the app will read the value measured in realtime.


This tutorial is applicable with

Please feel free to contact us, if you need further information