Moddable Tech Presentation to TC-39
The demonstrations of XS were given by me. The following sections provide a summary of the demonstrations. If you have never used XS on embedded hardware, read on. You may be surprised at what is possible.
Note: Patrick and I represented the Moddable Tech team. The work we presented is the work of the entire team.
Two of the three demonstrations ran on an ESP8266 microcontroller from Espressif based on an Xtensa CPU at 80 MHz, has 45 KB of available RAM (beyond what is used by the RTOS), 1 MB of available flash storage for code (including the RTOS), and Wi-Fi. We like the ESP8266 because it is readily available and inexpensive (about $2 in volume). There is nothing very unique about the ESP8266 microcontroller, and the XS engine runs with equal efficiency on many other microcontrollers.
The remaining demonstration uses a Thunderboard Sense from Silicon Labs powered by a Gecko microcontroller that runs an ARM Cortex M4 CPU at 40 MHz, with 32 KB of RAM (total), and 256 KB of flash storage.
Demo 1 -- HTTP and TLS
The PubNub service is used for this demonstration because it is a poplar publicly available commercial service intended for use by IoT products. Its use here shows that low cost microcontrollers like the ESP8266 is able to communicate using modern, standard, secure network protocols and services.
Demo 2 -- Sensor hub
The second demonstration, this one on the Thunderboard Sense, is an interactive sensor hub connected to a low power display operating on a coin cell battery. The six sensors are sound level, accelerometer, light, humidity, temperature, and barometric pressure. Each sensor is displayed on a separate screen that shows both the sensor reading and an animated graphical representation of the value. The user cycles through sensor screens using physical push buttons. With only 256 KB to store the device firmware, XS virtual machine, scripts, and graphical assets just a few kilobytes of flash storage remains free.
Demo 3 -- Web Workers