What is mbed?

mbed is a platform and C++ library which makes it super easy to program lots of different microcontrollers. It's very easy to set up, and you don't need to install anything: It's all happening in your browser!

Here's the code to blink a light:

#include "mbed.h"

DigitalOut myled(LED2);

int main() {
    while(1) {
        myled = 1;
        wait(0.2);
        myled = 0;
        wait(0.2);
    }
}

Arduino vs mbed

It's natural to compare mbed to Arduino, as they are about as easy to use, and has a lot of the same use cases. So what are the differences? One of the main differences is which microcontrollers are supported. While many Arduino microcontrollers are mainly meant for Arduino, mbed is used on microcontrollers that are created for real production applications.

Another great thing is that mbed is only a C++ library, and not a separate language. This means that you have access to all the great features of native microcontroller programming in a low-level language! This also means that while it's very easy to get started with the online compiler, you don't have to use it. mbed code may be written in lots of different native IDEs, like Keil or Simplicity Studio.

Get started

Setup instructions are over here :)