This is an archived copy of all my blog posts which is irregularly updated.
  • Using HTTP, HTTPS, MQTT and CoAP from mbed OS

    One of the biggest changes in mbed OS 5 compared to mbed OS 2.0 was the unification of network interfaces. Every interface, whether it’s Ethernet, Wi-Fi, Cellular, 6LoWPAN or Thread mesh, implements the same NetworkInterface API. This makes it easier to write portable code that matches the available connectivity method. In addition this API is easy to implement on top of any library that supports socket primitives, so porting new targets is straightforward. Recently we also added the Easy Connect library, which allows users to switch between all supported connectivity methods through a config file - tremendously helpful for tutorials and workshops.

    Continue reading »

  • Simplify your codebase with mbed-events

    Alongside the release of mbed OS 5, we also introduced mbed-events, an event loop library that can run in an RTOS thread. Using an event loop is very useful to defer execution of code to a different context. An example would be to defer execution from an interrupt context (ISR) to the main loop, or to defer execution from the high-priority thread to a lower priority thread. Now that mbed-events is part of core mbed OS 5.2, we’d like to show how this library can simplify your code.

    Continue reading »

  • Why JavaScript on microcontrollers makes sense

    Three weeks ago, during JSConf.asia 2016, we announced JavaScript on mbed, which enables developers to write firmware for IoT devices in JavaScript. This is not done by transpiling JavaScript into C++ or Assembly, but rather by running the JerryScript VM directly on top of ARM’s mbed OS 5, which can be run on cost-effective microcontrollers. This announcement caused an interesting debate, including a heated thread on the Reddit Programming subreddit with 192 comments.

    Continue reading »

  • Reducing memory usage by tuning RTOS configuration

    Two weeks ago, we blogged about optimizing memory usage for mbed OS 5.2, and today we want to show how memory usage can be decreased even further. This can be accomplished by tuning the RTOS configuration to our specific needs, or even turning off mbed RTOS altogether. This allows us to fit mbed mbed OS 5.2 on the smallest targets, like the nRF51822 which has only 6K of RAM available for user-space applications.

    Continue reading »

  • Conference videos: JSConf.asia, GDG DevFest

    A relatively busy conference season this fall: speaking arrangements on three different continents, nine talks and four workshops. Here’s videos from two conferences.

    At JSConf.asia (Singapore) I presented the work we have done on running JavaScript on $2 microcontrollers:

    Continue reading »

  • Optimizing memory usage in mbed OS 5.2

    Three months ago we released mbed OS 5, the latest version of our operating system for microcontrollers. While we added a lot of new features - including an RTOS - we also saw a bigger than expected increase in flash and RAM usage, two things that are scarce on embedded devices. Reason for Vincent Coubard, Senior Software Engineer on the mbed team, to dig through the .map files and see how we can decrease memory usage in mbed OS.

    Continue reading »

  • Using Bluetooth Low Energy from JavaScript on mbed

    Some time ago we blogged about adding JavaScript support for mbed OS 5 through the JerryScript VM. In this blog post we’ll show how you can use the Bluetooth Low Energy API from a JavaScript application. Writing your BLE application in JavaScript on mbed means enjoying the flexibility of a dynamic language while leveraging the well tested, widely used and battery friendly mbed BLE API.

    In this article we’ll write a small program in JavaScript that allows us to control an LED on our development board from a smartphone.

    Continue reading »

  • Securing the IoT evolution

    While the Internet of Things (IoT) is well-accepted as a concept, there are issues to address for secure connectivity. A proven developer platform, supported by an ecosystem of partners can speed up the creation and deployment of IoT devices based on ARM® microcontrollers. Caroline Hayes talks to Jan Jongboom, Developer Evangelist IoT at ARM.

    Continue reading »

  • Building IoT devices: scaling from 10 - 1,000 devices

    Unbeknownst to many of you, December 10th, 2015 was a historic day. That morning, I walked into the building of Noca - a factory in Trondheim, Norway - wearing a white lab coat, a JTAG in my hand, and with a LoRaWAN base station in my backpack. That day, we could finally inspect the very first factory samples of the LoRa device that my team and I had been developing. The moment you see your components mounted on a PCB is both the most exciting and most scary moment in the life of any developer working on a hardware project.

    Continue reading »

  • Using mbed libraries with JerryScript

    Two weeks ago Stephen Kyle posted about adding support for JavaScript on ARM mbed OS with JerryScript - which has now landed in the JerryScript main repository. The ability to run a JavaScript engine on top of a microcontroller is tremendously helpful for rapid prototyping, and lowers the barrier for anyone interested in programming microcontrollers. One great thing about building JerryScript support on top of ARM mbed is that we can also leverage the vast set of published mbed libraries (5,375 and counting!). Unfortunately at this point we cannot directly use C++ libraries from JavaScript - we need some glue. In this article we’ll go over the pieces needed to use a C++ mbed library in JerryScript.

    Continue reading »