About mbed
mbed is a tool for Rapid Prototyping with microcontrollers.
Take the tour...
Recent blog entries

mbed Blog

Site update: Program documentation, wiki macros

A few days ago we released an upgrade to mbed.org. First, the highlights:

  1. You can now see the code of published projects
  2. Published projects come with Doxygen powered documentation
  3. The documentation of published projects is integrated within the mbed wikis

Here's the details of how you can make use of these new features:

See the code of published projects

A feature which has been requested a few times and one which we have wanted to add for a while is quite simple: you can now browse the code of a published project. This lets you get a quick feel for whether a program is worth importing into your Compiler before you do so.

 

Example of viewing source code

Example of viewing source code

Published projects come with Doxygen powered documentation

Another powerful feature is that now when you publish programs, any Doxygen compatible markup you insert into your code will be rendered as Doxygen markup within your published program's page. There's too many features of doxygen to go into here, but the main points are:

  • Documents functions and classes including parameters and return types
  • Links from documentation about a function or class to the definition in code
  • Links back from source code to documentation for each documented function or variable
For information on how doxygen markup should look, refer to this cookbook page, or one of the many external guides.
Example of documentation

- Example of documentation

The documentation of published projects is integrated within the wikis

Here's where it gets interesting (to me!). Last month we released the new cookbook. This most recent update builds on that by integrating the new program documentation into the wiki engine. Here's what that gets you:

  • Embed link to a program in any wiki page
  • Embed summary of program API in any wiki page
  • Embedded documentation (or code) updates automatically when you update the program

This may sound tricky, but in practice, it's fairly straightforward. All you have to do is put the URL of the documentation into the wikitext.

<<program http://mbed.org/users/aberk/programs/QEI_lib/5ytsc/docs/classQEI.html>>

Results in something like:

Embedded documentation in wiki

- Example of embedded documentation in wiki page

 

New handbook and future plans

Regular users may also have noticed that at the same time as the above update, the Handbook has updated to the new format. This has the side effect of allowing you to comment on Handbook pages, where your suggestions for improvement of the official documentation is very welcome.
Finally, for those of you still reading, a word on the future plans for the above features.
We will move the Notebooks and the Forum to support the wiki-text method of creating content. This means:
  • You will be able to use the above features in the notebook and forum
  • The rich text editor in the forum and notebook will be replaced with a plain text box
  • You will be able to contribute to the forum from mobile platforms
  • Getting layout right will hopefully be a lot easier and predictable, without the (sometimes eccentric) rich text editor
No release date on those future plans yet, but they are scheduled in for one of the upcoming releases.

E-KTN mbed workshop - New date added

Due to the popularity of the workshop in Cambridge on 29th July, E-KTN have decided to run this workshop again: Portsmouth University, Tuesday 14th September, 09.30.

You can find more about the aims and objectives of the event on the original annoucement of the event:

   * July 29th workshop, Cambridge

For more details of the venue and how to book, visit the E-KTN.

 

mbed Breakout Board and Starter Kits!

Take a look at these awesome new mbed-related products that were posted in our announcements forum by Cool Components and SK Pang...

First up, a breakout board from Cool Components that makes all the key interfaces easy to plug in to:

So that is Ethernet, USB and Micro SD card sorted, plus a spare row of sockets either side of the mbed for wires.

And from SK Pang Electronics, a couple of great starter kits to get going with mbed. Here is the bigger one:

Great work!

If you know of any new mbed-related products, or you've released something yourself, just fire it at the News & Announcements forum.

Library Update: CAN and I2C

Version 24 of the library has gone live. Highlights are:

  • CAN additions
  • I2C Slave class
  • I2C, Ethernet bugfixes

CAN

  • The CAN class now has an attach() method, which is triggered on the reception of a CAN frame. This works in an identical manner to the attach() methods of other classes i.e. takes a function or member function which returns void, and has not parameters.
  • In addition there is a new method called monitor(bool silent), which puts the CAN interface into silent monitor mode. When the interface is in monitor mode, it can receive messages, but it will not ACK them, and cannot transmit.
  • Finally, the sampling point set by the frequency() method has been tweaked.

I2CSlave

A new I2CSlave class has been added. This uses the receive() poll method to see if the slave has been addressed, and can use both the multi-byte and single byte read() and write() methods as the I2C class. It can also distinguish if the slave has been directly addressed, or whether it has received the general call address:
#include 

I2CSlave slave(p9, p10);

int main() {
    char buf[10];
    char msg[] = "Slave!";

    slave.address(0x30);
    while (1) {
        int i = slave.receive();
        switch (i) {
            case I2CSlave::ReadAddressed:             // Master has performed a read on the slave
                slave.write(msg, strlen(msg) + 1);    // Includes null char
                break;
            case I2CSlave::WriteGeneral:              // Master has performed a general call write
                slave.read(buf, 10);
                printf("Read G: %s\n", buf);
                break;
            case I2CSlave::WriteAddressed:            // Master has performed an addressed write
                slave.read(buf, 10);
                printf("Read A: %s\n", buf);
                break;
        }
        for(int i = 0; i < 10; i++) buf[i] = 0;       // Clear buffer
    }
}

I2C bugfix

Version 23 introduced a bug into the reading of multiple bytes on I2C. Version 24 fixes this.

Ethernet bugfix

There was a small bug in re-initialisation of the Ethernet class, which has been fixed.

Updating to the new Library

As usual, to get these updates for existing programs, simply click on the mbed library in your compiler project and choose "Update to latest revision!". New programs will automatically pull it in.

Any problems, suggestions or thumbs ups, please tell us in the Bugs/Suggestions forum!

E-KTN to run mbed workshop on July 29th

Dan Dearing of the UK's Electronics Knowledge Transfer Network (E-KTN), will be running a one day mbed workshop at the ARM headquarters in Cambridge, UK.

The focus of the E-KTN is to help electronics make its way into other industries, and keep the electronics industry up up to date with the latest developments.

The day includes some presentations about mbed Rapid Prototyping technology, walkthrough examples of setting up and using mbed, and a free form lab to experiment with the kit in the safety of the workshop environment.

By the end of the workshop you should be :

- Familar with the mbed microcontroller, its online tools and developer website

- Able to use the mbed libraries to rapidly prototype using Digital IO, I2C, A/D, D/A, Interrupts, and more!

- Creating working rapid prototypes that include high level functional blocks such as SDCard, USB Host and Ethernet.

A ticket for the day's workshop is £99+VAT, which includes lunch and ....

For more information on the event, visit the mbed Workshop page at the E-KTN website.

If you would like to run a similar event near you, contact support@mbed.org