Moddable Blog

Welcome to the Moddable Blog! Our blog is a little different from most blogs. In addition to the latest news from Moddable, our blog contains many articles with in-depth introductions to key technologies in the Moddable SDK. If you are new to the Moddable SDK, browsing the blog is a great way to get a feel for both the breadth and depth of our technology. If you are an experienced member of the Moddable developer community, revisiting the blog is a great way to go deeper on technologies that you might have previously overlooked.

To keep up with all our latest blog posts, follow us on Twitter. We always tweet about our latest blog posts as well as other developments of interest to Moddable developers.



Why Moddable supports JS0/JSSugar

Nov 13, 2024  |  Peter Hoddie, Principal

The "JS0/JSSugar" proposal by Apple, Google, Moddable, Mozilla, and Sony would change how the JavaScript evolves by dividing into two parts to make it even more secure for users. Moddable believes this change will benefit embedded JavaScript developers using the Moddable SDK in many ways, without changing the way developers work.
Read More

The ESP Component Registry is a central repository of components designed for the ESP‑IDF. Hosted by Espressif, creator of the ESP32, the Registry contains a wealth of ready-to-go software components for the ESP32 family of microcontrollers.
Read More


Embedded developers have hundreds of development boards to choose from. Moddable Six is for developers who want to use industry standard JavaScript to deliver dynamic IoT projects, especially those with a rich, mobile-style user experience. The clean, compact design of Moddable Six is the perfect place to develop your IoT concept and can be easily integrated as a display module in your commercial product or personal project.
Read More


The XS JavaScript engine is unique in delivering modern JavaScript (ECMAScript 2024) to resource-constrained, low-cost microcontrollers. One reason XS can do so much with so few resources is thanks to the careful design of its internal data structures.
Read More


We created Moddable Display to be the first step your project takes out into the real world. After you've done the hard work of creating a project, you want to show it off, use it in your everyday life, or give to your friends and family.
Read More


The arrival of 2024 is an opportunity to reflect on the amazing progress we made in 2023. Our mission has always been to bring the benefits of standard, modern JavaScript to embedded developers. Our work over the past year highlights our wide-ranging efforts in support of that mission.
Read More


We've recently added the ability to use BLE to update the firmware of Moddable Four and other nRF52 devices with a mobile app. This capability is essential for products in the real-world to allow customers to easily install updates that deliver new features and security fixes. Read More


Tracepoints log JavaScript expressions to the debug console without modifying your source code. Tracepoints are added while your program is running, streamlining your debug session. This article introduces advanced techniques for creating and controlling tracepoints, including the use of a device button to enable tracepoints. Read More


Function breakpoints are a specialized type of breakpoint that can help you quickly debug and explore a large code base. They allow you to quickly locate which implementations of a given function name are being executed without having to set breakpoints manually on each implementation of the function. Read More


Conditional breakpoints let you control when a breakpoint stops based on conditions like the value of local variables and the number of times the breakpoint has been encountered. Conditional breakpoints allow you to stop only when the specific conditions have been met. Read More


We believe a great product should be both energy efficient and easy to use. Moddable Four has a display to make it easier to use. Most other ultra-low energy boards don't have a screen to help save energy. Read More


With the introduction of Moddable Four, industry-standard modern JavaScript can now power the ultra-low power Nordic nRF52 microcontroller. Operating for a year (or more) on a coin-cell battery in a compact form-factor opens a world of new possibilities for products and projects. Read More


Moddable Four is the new ultra-low power development board for Embedded JavaScript developers from Moddable. Moddable Four pairs the ultra-low power Nordic nRF52 microcontroller with integrated BLE and an ultra-low power Sharp memory display in a compact module that can operate for up to a year, with the display on, using a coin cell battery. Read More

At Sensors Converge 2023, there was a surprising amount of talk about IoT security for a sensor trade show. That's an encouraging sign. Manufacturers of sensors for consumer and industrial IoT products are increasingly aware of the importance of securing sensor data to protect user privacy and safeguard critical infrastructure. Read More

Moddable recently took part in the Sensors Converge 2023 conference. Located in the heart of Silicon Valley, it lived up to its billing as "North America’s largest electronics event for design engineers." The show covered all aspects of IoT, from sensors (of course!) to energy management, embedded software development, security, cloud connectivity, and more. Read More


Moddable was honored to exhibit at FOSDEM 2023 in Brussels, Belgium. FOSDEM is the preeminent open source software event in Europe. We were very fortunate to have a stand dedicated to open source Embedded JavaScript because lingering pandemic concerns limited the number of exhibitors. Our stand was in the IoT area, which was busy throughout the weekend event. Read More


The end of the year is an opportunity to look back at the amazing progress Moddable has made in our mission to bring the power of the JavaScript ecosystem to embedded developers. The Moddable SDK continues to grow in both breadth and depth to support new devices, new capabilities, and familiar APIs, giving developers an ever-expanding set of possibilities for their products. Read More


All year the team at Moddable works with our clients and community of developers to bring the power of the JavaScript ecosystem to embedded developers. The end of the year at Moddable is an opportunity for us to build a project using the technology we’ve been building all year. This year’s project weaves Neopixels into a holiday wreath along with a speaker to play Christmas carols. Read More


A great way to learn how to use the Moddable SDK's performance profiler effectively to optimize your code is to see how other developers use it to optimize their code. In this article, you'll see how I adapted and optimized JavaScript code written for the web to run well on an ESP32 embedded microcontroller. I used the classic "Game of Life" simulation for this project. Spoiler: the performance improves by nearly 10x. … Read More


Everyone involved in delivering software for resource-constrained hardware knows that performance is a key challenge. Low-cost hardware has just enough performance to make a great product possible, but only if the software is careful not to overwhelm the hardware. It is easy to notice that a product is performing slowly. What's difficult is figuring out why it is slow. That's where a performance profiler is critical. Instead of a software developer relying on intuition to guess which functions take the most time, a profiler shows them. … Read More


Maintaining a reliable network connection to the internet is fundamental to IoT products. Unfortunately, network connections aren’t reliable: they can fail in many ways. Products must be engineered to operate reliably on unreliable infrastructure. Many products use Wi-Fi to connect to the internet and Moddable has worked with many clients to successfully deliver products that use Wi-Fi. Testing these products can be tedious, walking back and forth to the closet to power off the Wi-Fi router to verify that the product gracefully recovers. We’ve long thought there must be a better way. A recent client project gave us the chance to try. … Read More


Comparing and copying JavaScript objects are fundamental operations that are remarkably complex to implement correctly and efficiently. Because these operations are not built into the JavaScript language, various solutions have arisen to make life easier for developers. Web browsers provide the structuredClone function to make a deep copy of an object. Node.js provides deepEqual assertions to perform deep comparison of objects and the is-equal module provides a faster implementation as an npm module. Embedded developers who need these operations have had to create their own ad-hoc solutions. Until now. … Read More


Microcontrollers don’t usually have a built-in file system. Projects that need a file system have a choice of which file system to use. Popular choices include the FAT file system and SPIFFS, and the Moddable SDK supports both. These file systems work well, but have limitations that make them difficult for developers to work with, especially developers more familiar with the full featured file systems on computers. The LittleFS file system created by ARM is an excellent alternative to both SPIFFS and FAT, that is also easier for developers to use. LittleFS is now fully supported in the Moddable SDK. … Read More


Making sure that the Moddable SDK and the XS JavaScript engine run correctly and reliably is a big project. There are hundreds of features and APIs that must be verified on a wide variety of devices. Testing on devices is particularly challenging, as many don't even have enough storage space to hold the test suite. Moddable has developed a technique to test both our JavaScript engine and our APIs that works on many embedded devices and our desktop simulator platforms. … Read More


With just a little software, you can quickly turn an inexpensive microcontroller into a powerful custom remote control for many of the devices you already own. Devices like televisions, media players, mobile phones, and computers support external keyboards and remote controls connected using Bluetooth Low Energy (BLE). Many microcontrollers, including the ESP32 found in Moddable… Read More


Delivering a modern user experience on low-cost embedded hardware has been a key focus of the Moddable SDK from the start. The Moddable SDK is regularly updated with new rendering capabilities to expand the kinds of user experiences that can be created. Last year support for animated GIFs arrived and earlier this year it got… Read More


The fonts displayed on the screen of an IoT product are a key part of its brand, establishing the overall feel of the product. All of Moddable’s commercial clients use the custom font support in the Moddable SDK to brand their products. While it has always been possible to incorporate custom fonts into products, it… Read More


JavaScript applications for embedded systems frequently work with memory buffers to perform a wide variety of tasks. Scripts gain tremendous power by being able to operate directly on the native data of the classes they use. The XS JavaScript engine at the core of the Moddable SDK contains extensive support for working with memory buffers.… Read More


Over the past few months, Moddable has developed products for clients in the manufacturing and automotive industries. One client is building a monitoring system for factories; the other, a system to detect maintenance issues in cars. To my surprise, both clients asked us to support Ethernet in these projects. As it turns out, people still… Read More


One of the defining features of the Moddable SDK is its outstanding support for displays in IoT products. Much of that work has focused on LCD touch screens, but ePaper displays have also been supported from the beginning. Recent work has brought broader and deeper support for ePaper displays, making the Moddable SDK the best… Read More


The latest addition to the Moddable SDK is a delightfully silly example app to display animated GIFs from the popular GIPHY web site. The app lets the user enter a search term, uses GIPHY’s REST API to search for a GIF, downloads it, and then displays the GIF onscreen in a continuous loop. Despite the… Read More


Today Moddable is launching a public effort to bring the Moddable SDK to the Raspberry Pi Pico development board. The Moddable SDK includes XS, the only modern JavaScript engine designed for resource constrained microcontrollers. The Pico is powered by the new RP2040 microcontroller (MCU) from the same organization that created the Raspberry Pi family of… Read More


Note: This blog post was originally posted on January 5, 2021 to introduce the developer preview of ESP-IDF 4.2 support in the Moddable SDK. That development work was merged to the main Moddable SDK repository on February 2, 2021. The blog post has been updated to reflect that. The Moddable SDK has migrated to using… Read More


If you walk by the Moddable office in downtown Palo Alto, you’ll see a collection of eye-catching screens in the window. The latest to be added is a Moddable One displaying a series of animations. If you can’t make it by the office, you can see the animations in this video. To a casual observer,… Read More


Difficult as it is to believe, we have reached the end of the summer and the end of Josué Kpodo’s time with us as an intern. In this post, Josué provides a final update on his work gathering user needs and prior art to inform the creation of the TC53 Sensor Data Provenance Specification draft.… Read More


Moddable believes JavaScript is the best language for building IoT products. We’ve heard from many developers that they agree with us, but that it is important to them to be able to use TypeScript. If you aren’t familiar with TypeScript, it is a language created by Microsoft that adds features to JavaScript focused on type… Read More


It is my pleasure to introduce this blog post written by Josué Kpodo, who has joined the Moddable team for the summer as an intern. Josué comes to us from Michigan State University where he recently completed his undergraduate degree in Computer Science. In this post, Josué will share a bit about his background and… Read More


The color wheel is a common user interface element in desktop and mobile apps that allows the user to select a color. User interfaces to select a color are rare on displays powered by embedded microcontrollers. When present, the interface is primitive, perhaps an array of color boxes. The color-picker example implements a true color… Read More


Today, we released a major update to improve our support for the popular ESP32 microcontroller. This update includes four major new features: Faster, more reliable ESP32 build system Upgrade to ESP-IDF v3.3.2, a Long Term Support release from Espressif Lightweight NimBLE Bluetooth LE stack for ESP32 Execution of individual build steps — clean, build, deploy,… Read More


HACKberry is a 3D-printable bionic arm project managed by Mission ARM Japan. The goal of HACKberry is to make inexpensive prosthetics more widely available by significantly reducing the cost. The HACKberry arm is also remarkably customizable for users because both the hardware and software are open source. Naturally, we at Moddable were very interested when… Read More


The XS JavaScript engine brings the many benefits of modern JavaScript to embedded systems like those that power IoT products. The latest release of XS is a major step forward. It delivers new language features, performance optimizations, improved conformance with the ECMAScript specification, and updated support for the Secure ECMAScript proposal. This blog post summarizes… Read More


This Wednesday, we wrapped up year two of Scripts & Things, our meetup on JavaScript development for the microcontrollers and embedded systems that make up the Internet of Things. We concluded 2019 with a demo night featuring a variety of great demos from Scripts & Things members. Each of the projects presented at the meetup… Read More


The latest update to the XS JavaScript engine continues to focus on adapting and optimizing JavaScript for embedded systems. In this release, the majority of these improvements take place during the preload phase, part of the build process. Additionally, this release adds support for top-level await and WeakRef, two new JavaScript features expected to be… Read More


This blog post is about performance improvements in the way the Moddable SDK reads SPI flash. That might not sound exciting, but the result is: our favorite rendering benchmark (balls) runs 50% faster. When you update to the latest Moddable SDK, you’ll get those changes automatically. The details behind the improvements are an interesting window… Read More


Firmata is a popular protocol for controlling remote hardware resources. It is often used to allow a more powerful device running a non-real time operating system, such as Linux, to control the hardware ports of a less powerful microcontroller device with a real-time operating system (or no operating system at all). The most common use… Read More


The latest release of our XS JavaScript engine puts in place fundamental new capabilities to advance Moddable’s mission of safely opening IoT products to third party software. These new capabilities are implementations of proposals on track for standardization in Ecma TC39, the JavaScript language committee. The two most significant developments are described in the “Truly… Read More


This article describes my work to build a classic LED style clock using the Moddable SDK. That might surprise you because a key feature of the Moddable SDK is the ability to add interactive, animated touch screens to IoT products. An IoT product that incorporates a well designed touchscreen interface is a joy to use.… Read More


Introduction Text entry on small IoT device screens can be frustrating to use because when a touch keyboard designed for mobile devices is shrunk down to fit on a small screen, accurate typing becomes too difficult. That makes entering a Wi-Fi password, for example, an unpleasant and challenging experience. In this article we introduce our… Read More


At Moddable, we believe individuals should have control of the software in the products they own. Some people will use that control to write their own software, while others will use that control to choose the software that delivers the behaviors and privacy they design. Moddable’s extensive work in JavaScript contributes to that goal by… Read More


The Moddable SDK now supports rotating the image shown on displays using features built into some display controllers. This allows the display to be rotated to 0, 90, 180, and 270 degrees at any time with no added overhead. Build-time Rotation with Software The Moddable SDK has always included support for drawing to displays at… Read More


The Qualcomm QCA4020 is a low-power, ARM-based dual-core SoC with integrated Wi-Fi and Bluetooth, for communication with IoT devices and cloud services. The Moddable SDK provides modern tools and technologies to developers for building applications on resource constrained microcontrollers. Today we are pleased to announce Moddable SDK support for the Qualcomm QCA4020, bringing modern, efficient,… Read More


The latest push of the XS JavaScript engine implements support for the forthcoming ECMAScript 2019 standard. The ECMAScript 2019 standard includes several new capabilities and refinements but no major new features. A complete summary of the changes with links to details is available on the “2ality – JavaScript and more” blog by Axel Rauschmayer. For… Read More


The JavaScript language is preparing to add built-in support for integers of arbitrary size with a new feature named BigInt. The built-in Number type is accurate to 53-bits of precision, which is insufficient for many tasks. By standardizing BigInt into the language, developers benefit from having a single API available in all environments and JavaScript… Read More


Sometimes a display is just a display. You don’t need an interactive user interface, you just need to show an image. Using the Moddable SDK, this is easy to do by building a small application to draw the image. There are examples to display a PNG, an animated GIF, and to stream JPEG images from… Read More


The Christmas season brings decorations and lights. My neighborhood has an assortment of fixed multi-color incandescent and LED lights. Then there is one house with a big light show, complete with low-power FM transmission of a soundtrack to sync with the lights. While I don’t want to invest the time and expense in setting up… Read More


This Wednesday, we wrapped up year one of Scripts & Things, our meetup on JavaScript development for the microcontrollers and embedded systems that make up the Internet of Things. We concluded 2018 with lively discussions before, during, and after a series of demos. A big thank you to everyone who joined in the fun —… Read More


iOS devices from Apple provide BLE services for accessories to enhance user experience and interactions. The Apple Media Service (AMS) allows accessories to interact with the iOS media player. We thought it would be fun to build an ESP32 color touch screen interactive media player accessory to control the iPhone media player. We built it… Read More


At Moddable we believe IoT products should be open and customizable by the end user. The current lack of standards for interoperability means that there are too many IoT products that connect to only one cloud service or interoperate only with other products from the same company. The Web of Things community is working to… Read More


IMPORTANT: Web Thing API support in the Moddable SDK is deprecated as of August 28, 2019. One of the issues that plagues IoT is the lack of standards for interoperability. There are too many IoT products that connect to only one cloud service or interoperate only with other products from the same company. At Moddable… Read More


There’s been a lot of good work in the Moddable SDK in recent months. This blog post highlights a some of the recent additions and improvements. mDNS The mDNS protocol is arguably the most robust solution available for IoT devices connected to the same local network to discover one another. It is a mature technology… Read More


Earlier this week Moddable hosted the second meeting of Scripts & Things, our meetup about embedded software development using JavaScript on microcontrollers and other embedded systems. We were pleased to have a diverse group of web developers, embedded developers, and even some brand new programmers join us and get excited about JavaScript for embedded. Demos… Read More


Last week we hosted the first edition of Scripts & Things, our meetup about embedded software development using JavaScript on microcontrollers and other embedded systems. The event was enjoyed by all in attendance and will serve as a launching pad for future meetups in the series. Presentations Our goal with Scripts & Things is to… Read More


NeoPixels are strings of bright LEDs that have been popular within the maker community for adding animated illumination to objects. Several recent ESP32 based development boards have built-in NeoPixels, including the … Read More


Last weekend, I attended Sketching in Hardware 2018 in Detroit, Michigan. Sketching is a small conference that brings together: builders of tools that assist consumer electronics developers and Makers, high-profile users of those tools (or educators of future users), well-known academics who run research programs on development tools, digital fabrication, or IoT ecosystems. I have… Read More


The Moddable team is starting a Meetup about embedded software development using JavaScript on microcontrollers and other embedded systems. The group is called Scripts & Things and our first gathering will be on August 22nd at the Moddable office in downtown Palo Alto. We chose the name Scripts & Things because the Meetup focuses on… Read More


Windows is the development platform used by embedded software developers simply because many semiconductor companies only provide their development and debugging tools for Windows. Many large companies require their employees to use a common operating system and, more often than not, that platform is Windows. And, of course, many software engineers simply prefer to do… Read More


We’ve recently enabled the JavaScript eval function on embedded devices using the XS JavaScript engine. Our long-held position is unchanged: it is almost always a bad idea to compile JavaScript on an embedded device. The reasons that eval are used on the web, for example, do not typically apply to embedded development. Still, compiling scripts… Read More


There are countless JavaScript libraries available for the web. Since the XS JavaScript engine in the Moddable SDK implements the same JavaScript language used in web browsers, it seems reasonable to assume these libraries may also be used on embedded devices. We often get the question, “can I use [insert name of web JavaScript library… Read More


We are pleased to announce Bluetooth Low Energy (BLE) protocol support in the Moddable SDK, enabling both BLE peripheral and central device development. BLE is available now on Espressif ESP32 and Silicon Labs Blue Gecko microcontrollers. This article describes the BLE features supported. It includes BLE example code in JavaScript. If you are not familiar… Read More


The first article of this series describes how to issue HTTP requests in applications built with the Moddable SDK using information from REST APIs. This article builds on the concepts from the first article and explains how to use the Moddable SDK’s TLS stack in applications to make HTTPS requests. What is TLS? Transport Layer… Read More


The Moddable team recently exhibited and presented at Maker Faire Bay Area. Exhibit and Demos We had a booth in the Expo Hall, surrounded by other tech companies, makers, and artists. No Maker Faire booth is complete without demos or a hands-on activity. We brought demos focused on three things: scripts, screens, and apps for… Read More


The Moddable SDK helps developers build applications for low cost, constrained microcontrollers. Last spring, we embarked on a project to use a processor from Silicon Labs to prototype a low cost, low power IoT device that includes proprietary radio communication. The Silicon Labs line of Energy-Friendly MCUs are very efficient in their use of power,… Read More


  The Moddable SDK includes modules that implement a variety of networking protocols, giving developers the flexibility to build applications that interact with all sorts of other devices and cloud services. A common way to communicate with cloud services is through RESTful APIs, which are based on HTTP. You can find several basic example apps… Read More


In recent months, Moddable has received inquiries for the ability to render a QR Code in the Moddable SDK. This article describes the module we created to support QR Code rendering, together with some of the design and implementation choices we made along the way to provide efficient and flexible QR Code support. What’s a… Read More


In May of 2017, Moddable Tech presented our XS JavaScript engine to at the Ecma TC-39 meeting at Google New York. We were graciously invited by Brendan Eich, the creator of JavaScript, to share our work applying JavaScript to extremely resource constrained embedded hardware. Brendan believed it would be valuable for the committee to see… Read More


Moddable is working hard to make it much easier to add displays to consumer electronics products. A display shows more information quickly and concisely than a few blinking lights or a voice interface. But, it is challenging today to build a product with a display at a reasonable cost with a modern user interface. One… Read More


The most recent push to the Moddable repository on GitHub is a big one. It includes the following:

  • New regular expression engine — A completely new regular expression engine written from scratch for use by XS, Moddable’s JavaScript engine. It is almost 10x smaller than its predecessor with more features and improved conformance. We believe… Read More

Introduction The JavaScript language includes support for regular expressions, a compact and powerful tool to perform search and replace operations on strings. Regular expressions can be considered a separate language within JavaScript, with its own syntax and behaviors. Just as implementing a JavaScript engine is a major undertaking, properly implementing a new regular expression engine… Read More


The Moddable team is using this blog to share news about what we’re up to. Much of the content will have technical details about embedded development with JavaScript, including information about features of the Moddable SDK, descriptions of interesting projects, and tips for app developers. Other posts will be discussions of our mission to open… Read More