mbed: Make a thermometer, hygrometer, and barometer with MtConnect04S

This Post is about how to build  MtConnect04S with MtSense01 demo firmware from ARM® mbed™ .

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

Environmental Sensor Kit for mbed

The environmental sensor kit provided you the temperature, pressure, humidity monitor. Then MtAid01-mbed is used to flash the firmware to MtConnect04S.

The environmental sensor kit for mbed includes MtConnnect04S with BLE mcu M904S, MtSense01 with environmental sensors, MtAid01-mbed, and the extension board for mbed.env-kit-for-mbed

Order Environmental 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_mtconnect04s_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_MtSense01. There will be a program named Mtconnect04s_MtSense01 in the list. Select it and click the Import! button.

Now you have your first mbed program! It is just like any typical IDE that you usually use on PC. The 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.

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 included 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 into re-power up the kit. The LED on MtConnect04S will begin blinking. At the same time, MtConnect04S read temperature, pressure, humidity from MtSense01, and connected BLE could read environmental data.



This tutorial is applicable with

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