Getting started with mbed

It’s easy to get started and productive with the Mbed platform, so you can quickly pick it up when you begin your next project.

You can build your own hardware from scratch using the HDK, but here we’ll assume you are starting with an existing board.

Once you have some hardware, you’ll be able to login to the compiler and start experimenting in a matter of minutes.

Get hold of some hardware

The easiest way to get started with the mbed Platform is with an official mbed Microcontroller prototyping board or mbed-enabled partner development board. If you don’t already have one, take a look at the mbed-compatible Hardware available.

All mbed hardware appears as USB mass storage device. To start, simply plug it in, open the MBED.HTM file on the drive that appears and you’ll be able to register on the site.

You can download pre-compiled programs by just copying them it to the mbed drive and hitting reset. And when that’s working, you’re ready to get started with the online tools.

Login to the online tools

With the online compiler you can start writing and compiling embedded software straight away. You don’t need to install or configure any software on your computer; just open it by clicking “My Compiler” in the menu when you are logged in.

Create a program in your private workspace by clicking “New”, and by default it’ll include some simple code in main.cpp to flash an LED to get you started.

Click “Compile” and it’ll build you the binary to download to your mbed device’s drive. Once downloaded, reset the device and your program should run. Simple!

Explore the SDK and Handbook

The default program in the online compiler should feel very natural if you are a C/C++ programmer, and highlights use of the SDK’s DigitalOut API to flash the LED.

All the SDK APIs follow a simple and consistent structure designed to be very intuitive, especially for those familiar with standard microcontroller interfaces and peripherals.

The handbook provides all the documentation including “Hello World” examples for all of the APIs, so take some time explore; try interfaces like AnalogIn, SPI, Ethernet and USB.

Get involved in the community

Members of the mbed community have a large breadth and depth of knowledge in mbed and related technologies.

There are thousands of open source code repositories being shared and all members can contribute to the central cookbook wiki, so you can learn a lot just browsing around the site and using the internal search engine.

You can also use Questions area to ask and answer carefully considered and explained questions, and the Forum for more general discussions.