Embedded JavaScript at FOSDEM 2023 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… Read More
Year in Review: Moddable in 2022 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… Read More
A Very Moddable Holiday Wreath 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… Read More
Deliver High-Performance Products with the XS Profiler 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… Read More
Guaranteeing Reliable IoT Products on Unreliable Networks 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… Read More
Going Deep with XS: deepEqual and structuredClone 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… Read More
LittleFS – the Best File System for Embedded Projects? Introduction 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… Read More
How We Test XS and the Moddable SDK 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.… Read More
Scalable Outlines: New Flexibility for Embedded UX 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
Using More Fonts More Easily in IoT Products 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
Best Practices for Accessing Memory Buffers from Native Code with the XS JavaScript Engine 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
Getting the Most from ePaper Displays 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
Bringing the Moddable SDK (and modern JavaScript) to the Raspberry Pi Pico 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
Moddable SDK moves to ESP‑IDF 4.2. Brings modern JavaScript to ESP32‑S2 powered Kaluga and Saola boards. 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
(Very Experimental) TypeScript Support in the Moddable SDK 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
XS Engine Updates for ECMAScript 2020 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
XS Update 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
Faster Flash 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 Remote Device Control in the Moddable SDK 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
XS: Secure, Private JavaScript for Embedded IoT 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
Hacking the Sonoff B1 Lightbulb 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
Run-time Display Rotation 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
ECMAScript 2019 comes to XS 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
BigInt on Tiny Hardware with XS 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
Pushing PNG Images to a Display 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
Moddable SDK Updates 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
NeoPixels, Moddable style 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
Compiling JavaScript on Embedded Devices 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
QR Code module for the Moddable SDK 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
Help Build the Future of JavaScript on Microcontrollers as a Moddable XS Engine Summer Intern You are a skilled programmer who has a desire to work on the internal engine of a JavaScript virtual machine in a context that will impact real developers. We are Moddable, makers of the open source XS JavaScript Engine and the Moddable SDK — tools and runtime software focused on software for microcontrollers. Together we… Read More
Moddable Tech Presentation to TC-39 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
Cost effective displays for digital products 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
Significant updates to Moddable SDK 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
A smaller, more compatible regular expression engine for XS 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