Copyright 2017 Moddable Tech, Inc.
Revised: December 6, 2017
These examples demonstrate how to use the Moddable SDK to write drivers and applications that interface with a variety of components. This document provides a brief description of each example and components supported.
Note: This document assumes you have installed the Moddable SDK on your development machine. The Getting Started document describes how to install the SDK.
HTTP server that returns a JPEG image captured from the ArduCAM Mini 2MP SPI camera.
HTTP client that posts successive JPEG images captured from the ArduCAM Mini 2MP SPI camera to a HTTP server.
Displays a raw 16-bit RGB image captured from the ArduCAM Mini 2MP SPI camera on a LCD screen compatible with the ILI9341 driver.
HTTP server that returns a JPEG image captured from the ArduCAM Mini 2MP SPI camera as a multipart HTTP response. The HTTP client can optionally specify the image width and height in the request.
HTTP server that returns a text reading from an I2C Bosch BMP180 Barometric Pressure/Temperature sensor. The application additionally configures the host as a Wi-Fi base station.
Progressively renders each row of a color image to an Adafruit DotStar 144 LED strip. The driver communicates with the strip over SPI.
Reads ambient and UV light measurements from the dual-mode Sharp UV Light Sensor. The application configures the sensor operating mode. The driver communicates with the sensor over I2C using the SMBus protocol.
Reads distance measurements at 100ms intervals from the Sharp Time-of-Flight Laser Ranging Sensor. The driver communicates with the sensor over I2C.
Reads digital compass measurements at 250ms intervals from the I2C SparkFun Triple Axis Magnetometer Breakout - HMC5883L.
Reads the Adafruit LIS3DH Triple-Axis Accelerometer at 100ms intervals. The driver communicates with the accelerometer over I2C.
Commodetto app that displays Adafruit LIS3DH Triple-Axis Accelerometer sensor values in real time and animates a bouncing ball based on the X and Y readings.
Leverages the MCP23008 GPIO expander to control up to eight LEDs from a single I2C device.
Reads the Sharp Temperature and Humidity sensor at 100ms intervals. The driver communicates with the sensor over I2C.
Renders bitmaps on ePaper displays compatible with the DESTM32S SPI ePaper display controller, e.g. the Crystalfontz 128x296 3-Color ePaper Module.
Demonstrates how to interface with the Sakura IO LTE module to send/receive packets and read module status. The driver communicates with the sensor over I2C.
Reads the Texas Instruments TMP102 digital temperature sensor at 333ms intervals over I2C.
Commodetto app that calibrates the XPT2046 touch screen controller used by the Moddable Zero device. The app saves the calibration data in persistent storage.