Skip to content

Moddable SDK 4.0

Compare
Choose a tag to compare
@mkellner mkellner released this 11 Aug 18:57
· 811 commits to public since this release

This release contains improvements to the Moddable SDK made between July 7, 2023 and August 9, 2023.

Highlights of this release include:

  • Nordic nRF52 port
  • Support for nRF52 development boards from Moddable, Nordic, Adafruit, Sparkfun, Seeed Studio, and makerdiary
  • Graphics enhancements to support Moddable Four's low-power display including frame buffer mode, rendering to grayscale, and dithering
  • Smaller default code footprint

News

The Moddable SDK is now at version 4.0! This release features a completely new port to Nordic's nRF52. We wanted to bring standard, modern JavaScript to ultra-low power microcontrollers and the nRF52 is one of the best. A single coin cell battery can power an nRF52 product for a year or more. The nRF52 has a generous 256 KB of RAM and a 64 MHz ARM Cortex-M4 CPU that delivers remarkable JavaScript performance.

Developing with nRF52 development boards is just like working with other silicon platform supported by the Moddable SDK. The development tools and APIs are the same. Of course, we've brought industry standard ECMA-419 IO together with our suite of ECMA-410 Sensors and Real-time Clock drivers. There are also new APIs so your projects can optimize energy use.

The nRF52 has built-in BLE. The Moddable SDK's BLE client and server APIs (central and peripheral) work on nRF52 just like they do on ESP32.

Our nRF52 port supports many popular development boards already. Moddable has just launched Moddable Four, an nRF52 development board with a fast, low-power screen, accelerometer, jog dial, and coin cell battery holder. Moddable Four is a great, low-cost choice for developers looking for an all-in-one hardware solution to get started with Embedded JavaScript on ultra-low power microcontrollers. Read all about it on the Moddable blog and check out the detailed specs on the Moddable Four product page.

xs-dev, the tool many Moddable developers are using to easily set-up the Moddable SDK, has already been updated to support the nRF52 port. Thank you, @HipsterBrown!

August Community Call

The monthly Moddable Community Call is Thursday, August 17 at 3:00 PM PDT. Join us live on Zoom. We'll focus on the new nRF52 support in Moddable SDK 4.0 using Moddable Four. Join us to learn how to build energy-efficient projects using Embedded JavaScript.

New: Sign-up to receive an email reminder about our monthly community calls.

Release Details

  • New development boards
    • Nordic nRF52
      • Moddable Four (nrf52/moddable_four)
        • New Moddable low-power device with display, accelerometer, jog-dial, led, button, and CR2032 coin-cell socket
      • Moddable Four IO (nrf52/moddable_four_io)
        • Moddable Four with ECMA-419 IO
      • Nordic nRF52840 DK (nrf52/dk)
        • Nordic nRF52840 Development Kit (pca10056)
      • ItsyBitsy (nrf52/itsybitsy)
        • Adafruit ItsyBitsy format device with LED and button
      • Sparkfun Pro nRF52840 Mini (nrf52/sparkfun)
        • Sparkfun Pro nRF52840 Mini device with LED, button, JST power connector and Qwiic connector
      • Xiao (nrf52/xiao)
        • Seeed Studio Xiao format device with RGB LED and button
      • Xiao ILI9341 (nrf52/xiao_ili9341)
        • Seeed Studio Xiao format device with connections for ILI9341 display
      • makerdiary nrf52 (nrf52/makerdiary_nrf52)
        • USB-Stick style device with RGB LED and button
    • Espressif ESP32 family
    • Raspberry Pi Pico
      • Pico WaveShare ws_round split to have version with and without touch
  • Modules
    • Graphics & UI
      • Piu Image class broken out into separate module to reduce default footprint of Piu. Include $(MODDABLE)/modules/piu/MC/colorcell/manifest.json to use it in projects.
      • Piu no longer includes JavaScript bindings for the Poco renderer. This reduces the default code footprint of Piu. Include $(MODDABLE)/examples/manifest_commodetto.json to use them in projects.
      • Poco and Piu now report rendering errors when using frame buffer mode
      • Poco drawFrame (color cell) disabled when pixel format isn't RGB565LE (the only format supported)
      • Poco rendering fixes for monochrome (1-bit) bitmaps
    • Networking
      • fetch() implements HTTP redirect, including redirect from HTTP to HTTPS (reported by @mshioji)
      • ECMA-419 HTTP Client fixes for chunked transfer-encoding (reported by @mshioji)
      • Crypt data now includes PEM versions of CA certificates (previously DER only)
      • TLS module supports globally registered CA certificates (experimental, may be changed or removed)
    • BLE Server
      • No longer sends "undefined" when onCharacteristicRead returns undefined indicating no value is ready
      • Optional notification after each advertisement sent (nRF52 only)
    • GIF Decoder
      • Renders directly to 8-bit gray pixels
      • Works on Windows
    • ECMA-419 LIS3DH accelerometer driver conformance fixes
    • Instrumentation
      • Instrumentation fields unused on a given platform are no longer shown
      • New Instrumentation.map() and Instrumentation.name() APIs simplify programatic access to instrumented values. See documentation and updated example.
    • Removed out-dated, experimental ECMA-419 Wakeable pins
  • Examples
    • New ECMA-419 Analog input example
    • New Piu Examples
    • LS013B4DN04 display driver
      • Supports optional dithering using either Atkinson (default) or Burkes algorithms
      • Supports Commodetto frame buffer mode - uses more memory but faster and more compatible
      • Support to manage DISP to power display
      • Support for PULSE pin to retain display image when not refreshing
    • Note added to aborthook example about unhandled rejected promise reporting #1186 (reported by @linfan68)
  • XS
    • Left-shift implementation casts to address warnings from UBSan
    • XS linker now does more complete job of automatic stripping of unused Generator and AsyncGenerator support as well as the module loader. This reduces the footprint of XS for many projects when using automatic stripping.
    • Native stack overflow check works on Windows 7 (!) now too
  • Devices
    • Instrumented ESP32-S3 and ESP32-C3 builds redirect serial output to USB
    • pins/i2c on Raspberry Pi Pico now automatically selects required port
    • M5Atom and M5Stack devices with built-in Neopixels now defer instantiation of Neopixels driver until first used to avoid conflicting with projects that use external Neopixels. #1188. (reported by @kairos0ne)
    • pins/analog works on ESP32-S2 and ESP32-C3
  • Testing
  • Tools
    • Use search path to run serial2xsbug to be consistent with other tools (contributed by @meganetaaan)
  • TypeScript
    • Minor correction to SNTP type declaration (contributed by @meganetaaan)

Contact Us

If you have questions or suggestions about anything here, please reach out: