Mbed Blog

Site update 1.2 pt 2: Homepages, Profiles and Activity

This is part two of the series of posts about site update 1.2.

To continue our aim of improving the community features of mbed, we have added several new features and improved some existing ones.


User homepages

Previously every user had a very basic home area. Hopefully now your home page does a better job of bringing together everything a user is up to. The mechanisms for updating settings and your profile have been updated, too.


User profiles

You can now upload a profile picture and write a description about yourself where you can link to your blog, etc.. To edit your profile, just go to the My Home link in the main menu, and then click Edit profile at the top right.


User activity feed

There is now a feed of (almost) all activity on mbed. Each user gets their own feed, and there is also one for everyone put together. An RSS feed of each person's feed and the aggregated feed for everyone is in the works and should be a part of the upcoming 1.2.1 release.

Site update 1.2 part 1: Notebooks

Some of you may have noticed that a site update was pushed out to the mbed servers last night, which we're calling mbed 1.2.

Over the next couple of blog posts, I'm going to take a closer look at some the new features and perhaps some of our ideas for the future.

In this post, I'll tell you a bit about notebooks.


We've given you all a notebook. A notebook is simply a place to make notes. Each page of notes can be anything from a quick reminder of a pinout to a detailed how-to on a subject complete with illustrations.

Why notebooks?

We created notebooks to allow mbed developers to share information. You can search inside other people's notebooks and link to notebooks. You can tag and describe your notebook pages to aid in searching.

How do I use my notebook?

A Notebook is made up of pages. Adding a notebook page is easy.


Go to your new My Home (more on that later) and then the Notebook. Clicking Add new notebook page will open a pane where you can make a start on your page.


How do I tell people about my notebook pages?

We have added a couple of new buttons to the standard editor window used in posts. On the far right hand side of the editor toolbar, you'll see buttons for inserting a link to your Published Programs and Notebook Pages. I'll explain some suggested work-flows for making the most of these buttons in a later post.


Can I get feedback on notebook pages?

Each notebook page has space for comments and discussion below it. If someone leaves a comment on one of your pages, you'll get an email letting you know.


Can notebook pages be private?

All notebook pages are public. However, you do have the option of setting a notebook page to be Unlisted. Unlisted pages don't show up in your user activity feed (more on that later!) and don't show up in search results. They also won't appear in the list of your notebook pages when someone visits your Home area.

Please note that even if your page is marked as unlisted, anyone can still view it if they know the URL.

What about the cookbook?

What about the cookbook, you may ask. The cookbook has served us well up till now, but a single "flat" wiki would become increasingly difficult to manage as our small mbed community grew. Plus, there are technical issues involved which make the cookbook non-optimal.

The cookbook isn't going away just yet! Notebooks are missing a key feature - that being the ability to create group pages to allow collaboration on building an information reference.

So, use notebooks if you can, and we'll be working on ways to integrate more of the cookbook features. When the cookbook replacement is ready, cookbook pages will be copied into any new group documentation feature. So you can continue using the Cookbook with confidence, and we'll be engaging the mbed community in designing the eventual replacement.


That's it for this quick introduction to Notebooks.

As ever, the Notebooks feature will evolve and improve over time in response to user feedback. We already have some early feedback which may be the subject of a small further update to come soon.

My next blog post will talk about User Activity and your Home area.


Chris is on TV!

If anyone was watching sky channel 880 last night at around 10.15, you'd have seen Chris in his garage with a big wooden box and an mbed.

But why? Well, a team from "Teachers TV" asked to come to film him doing some of his activities as a "STEM Ambassador"; someone who goes out and helps with Science, Technology, Engineering, Maths in schools. The result is a 15 min video which shows some experiments going on during a visit to a local school.

It should be no surprise that it was based around using mbed, but it was a great reminder of what triggered mbed in the first place. It was many moons ago that we were trying to do the same thing in the schools with "traditional" kit, and getting very frustrated (as were the kids); it got in the way of their ideas. It was the classic scratch your own itch scenario, with us thinking "it could be so much better!".

Interestingly, the best decision I think we ever made in tackling this problem was not to go and build something specifically for taught education. We decided to try and make something that solved the problems we were seeing, but where it was a generic problem that was applicable to anyone trying to prototype something. The position we took was particularly inspired by the books "Deschooling Society" (Ivan Illich, 1971) which was a great reminder that people should always be learning (i.e. not just in taught environments), and "The Paradox of Choice" (Barry Schwartz, 2004), explaining how a lot of complexity can be attributed to choice paralysis/overload. My own interpretation of this is that it is common to pass on decisions to users in the form of "options", where infact you are actually passing on complexity and hard decisions. Finally, we wanted to ensure we could make it commercially viable so it could support continuous investment in itself.

As and example of how these school visits impacted our thinking, I can remember one day going in to a school and seeing their electronics lesson (I wish I had a photo!); they were soldering leaded components to copper tape stuck on to cardboard. I couldn't even do that; you need three hands! Worse still, as you apply the heat, the glue on the copper tape melts and peels of the card! I'm sure there were good reasons, but at some level you have to ask yourself why industry doesn't do it like that?!

It was things like this that focused us on wanting to make industry-style tools more accessible; using C/C++ rather than dreaming up some graphical flowchart programming to "make it easy", or using 0.1" pitch rather than a simple (but ultimately restrictive) "modular system".

The great thing about this video was it reminded us we'd been able to come full circle, and apply mbed back to what originally inspired us. What started as a little skunk-works project is now a real product, and we're hoping to continually improve on it to help more people experiment with microcontrollers. Whilst taught education is certainly not our primary focus, we hope mbed will find a home with some people who want to apply it to let students explore these sorts of things.

And don't worry if you missed it! It is now published on Teachers TV, so go check it out! You even get to see the mbed HQ white board in the background at one point :)

Tutorial: Getting mbed in and out of breadboard!

Someone recently commented that once an mbed was in breadboard, it was a little tricky to get out. I've also seen a few cases in workshops where examples wern't working for people, and it was simply due to the mbed not being pushed in to the breadboard properly (usually because it is stiff, and the user didn't want to damage anything - better to be careful!).

So here are a couple of videos with some simple recommendations. Firstly, getting your mbed in to the breadboard:

Secondly, getting it back out:

For removal, the emphasis is on working it out slowly with light pressure to avoid bending pins, and ensuring you only press the shaft of the screwdriver against the edge of the mbed and the tip against the breadboard by pulling up. If you push down, you'll scrape the underside of the mbed with the screwdriver tip which will not be good news!

So use these simple approaches, take your time, and treat the hardware with care, and you'll be fine!

Library Update: Real-Time Clock

We thought it was about time to get time() working...

The mbed Microcontroller has a Real-Time Clock (RTC) on it, which is a built in hardware clock that can keep track of the time and date. We've now done the plumbing to make use of it sane, and you can now just use standard C functions to read, set and format the time. Ideal for data logging and other time related functions!

The basic function to read the time is named time(). This returns the time in seconds since January 1st 1970, often known as the UNIX timestamp. This is a fairly universal way to define time, and can be transformed in to other string forms using C functions. The function time() actually takes a pointer as an argument, but in most case you'll just want to pass NULL. Here is a most basic example to get the current time:

#include "mbed.h"

int main() {
    while(1) {
        time_t seconds = time(NULL);
        printf("Seconds since January 1, 1970: %d\n", seconds);

Of course, that isn't much use until the time has been set somehow, as the RTC won't have been setup. Here is the minimal way to set the time, in this case providing the UNIX timestamp:

#include "mbed.h"

int main() {
    set_time(1256729737);  // Set RTC time to Wed, 28 Oct 2009 11:35:37

A natural thing to want to do is display the time and/or date in a human readable way, either on a screen, in a file, or over a terminal. For that, C provides a number of functions to help do this. This example shows these functions in use:

#include "mbed.h"

int main() {
    while(1) {
        time_t seconds = time(NULL);

        printf("Time as seconds since January 1, 1970 = %d\n", seconds);

        printf("Time as a basic string = %s", ctime(&seconds));

        char buffer[32];
        strftime(buffer, 32, "%I:%M %p\n", localtime(&seconds));
        printf("Time as a custom formatted string = %s", buffer);


The results of this are shown below:

For all the string formatting options, see the list of format specifiers in the strftime function api documentation.

While we were testing, Rolf said he thought it'd be nice to be able to set the time from the terminal, so here is the final example for this post that does just that:

// Example to setup the Real-Time Clock from a terminal, sford

#include "mbed.h"

int main() {

    // get the current time from the terminal
    struct tm t;
    printf("Enter current date and time:\n");
    printf("YYYY MM DD HH MM SS[enter]\n");    
    scanf("%d %d %d %d %d %d", &t.tm_year, &t.tm_mon, &t.tm_mday
                             , &t.tm_hour, &t.tm_min, &t.tm_sec);

    // adjust for tm structure required values
    t.tm_year = t.tm_year - 1900;
    t.tm_mon = t.tm_mon - 1;
    // set the time
    // display the time
    while(1) {    
        time_t seconds = time(NULL);
        printf("Time as a basic string = %s", ctime(&seconds));

Hopefully this gives you a good insight in to how to use the RTC from software, but of course one of the nice features of the RTC is that it is designed to support a battery backup. This means just like your PC or various equipment around the house, the mbed can keep time even when the power is disconnected.

It obviously needs some source of power to keep the clock running, but it is very tiny and this is where the VB pin comes in. By connecting a 3V battery to this pin, the clock can be kept running for a long time with only a single coin cell (watch battery). Wire a 3v coin cell battery between VB and GND, and when you disconnect the main power (e.g. USB cable) the clock will continue to run:

For full details of the time related functions, see the time API page:

To update to this new library version, as ever just start a new project or select the existing mbed library in an existing one and hit "Update". Please feedback any problems/questions to the forum.

Have Fun!

mbed @ ARM Techcon

Just to let you know, we'll be at ARM Techcon in Santa Clara this week:

If you are in the area, please come along and find us if you get the chance; it'd be great to chat, especially if you already got hold of an mbed or know what your plans are when yours comes through!

NXP should be doing a demo session on Thursday too (~1pm), so if mbed is new to you it may be a great way of getting an intro.

See you there,


Firmware Update: Improved Serial and FileSystem Access

Phil has been working hard on some firmware updates that improve two particular areas we had requests: support for usb serial on x64 windows platforms and access to the USB filesystem from both the mbed and the PC interchangeably. There were a few other improvements we wrapped up too, so here are the details:

Whilst Linux and Mac support for the USB serial port has been pretty clean for a while, Windows has always been a little more tricky; it required the mbed to be configured with an .ini file, and didn't work on x64 or win 2k machines. We've now given this an overhaul, and the results are much better. Firstly, the new firmware means there is no longer any configuration needed, so the mbed works on Windows, Mac and Linux exactly the same!

As ever, Windows still needs a driver for serial, but now no changes are needed. Plug it in without any driver and you get just the disk drive, so you can work away fine. Run the serial installer and the serial port appears - magic :)

At the same time, we added support for more Windows platforms in to the installer. The list is now Windows 2K, Windows XP, Windows Vista and Windows 7, including x64 versions. Phew!

The firmware also updates the LocalFileSystem to allow both the PC and the mbed to access the USB Disk files (just not at the same time). Whereas previously, as soon as the mbed opened a file on the local disk, it would "grab" the disk from the PC and not give it back until the program exited, it now releases the disk whenever there are no open filehandles. This should make it much more flexible and usable.

Some final updates for completeness:

  • Improved programming and semihosting performance
  • Fixed a bootcode problem that was causing a virus false-positives on some systems
  • Updated MBED.HTM to a link new format - you can now use it to launch the mbed website whenever you start

Updating your Firmware

To update your firmware, simply go to:

Updating the firmware simply involves saving the new firmware on to your mbed, and then power-cycling the board (disconnect and reconnect the USB cable).

For the new serial driver, run the installer found at:

Hope these updates are useful. Any problems, please tell us in the forums!

mbed is out now!

Morning from ESC Farnborough,

In case you hadn't guessed, mbed is now official! We turned on the website and showed mbed off publicly for the first time at ESC Boson a couple of weeks ago, and got a really great response. Thanks to everyone who came and visited at the stand, and for all the support.

The really great news is that the mbed Microcontroller is now available for pre-order in Digikey and Farnell (see the order page). The price these guys are putting it out for is impressive, and the demand has been higher than we could have imagined, so we're making more batches as fast as we can! The lead time for orders is totally based on supply vs. demand at the moment, and could be up to 6-weeks, but it is basically first come, first served. As long as you know that and you are happy, please go ahead and order one!

On a final note, our twittering billy bass demo was also a bit of a hit :) I'll make sure we write that up properly and give him the credit he is due.

We're now looking forward to seeing what projects people are planning, and working on mbed to improve it to make it even easier for you to try them out!

Simon (on behalf of everyone on the mbed Team)

mbed is going live!

Hello Beta testers!

We have some really big news. We didn't want to promise too much before it was all set in stone, but we've been working very hard to make mbed *real*, and I think we've done it!

We've teamed up with NXP and have been developing a version of mbed based on their new LPC1768 MCU, which gives us an upgrade to an ARM Cortex-M3 core, so there is even more performance. And best of all, the hardware design is now complete and we've got them going in to production as we speak!

And NXP have invited us to be on their stand at ESC Boston next week, so that means we'll be going live!

NXP are going to be selling these boards through some major distributors too, and they'll be available for pre-order next week.

We'll have a demo there too, and we'll put up a page about it soon, but hopefully it will be interactive :) To give you a hint, here is a little logo I just made:

More info next week, and on our http://twitter.com/mbedmicro feed.

Thanks again to everyone who has helped mbed get this far. Hopefully this is just the beginning!


Site update: Searching, Image uploads

You asked for it, you got it. There is now a search engine for mbed!

The search engine is limited in one way however; it does not search within the Handbook or Cookbook. This should hopefully be solved with the next major update.

Also, you can now easily upload images to attach to your forum posts.

To upload an image, just click the image icon at the top of the forum editor box, then click the 'Browse' icon next to the URL field.

As always, feedback is very welcome.