DOCUMENTATION DEVICES Moddable Display
Overview
Getting Started
BASE
Reference
Worker
Setup modules
COMMODETTO
Reference
Poco Renderer
Outlines
Creating Fonts
Crypt
Data
DEVICES
Moddable One
Moddable Two
Moddable Three
Moddable Four
Moddable Display
ESP32
ESP8266
nRF52
nRF52 Low Power Notes
Raspberry Pi Pico
M5Core Ink
M5Paper
Wasm
SiLabs Gecko
QCA4020
Moddable Zero
DISPLAYS
Overview
Adafruit 1.8" ST7735
Adafruit OLED Display
BuyDisplay 2.8" CTP - ESP8266
Crystalfontz ePaper
DotStar
Generic 1.44"
Generic 2.4" & 2.8" (Resistive Touch) - ESP32
Generic 2.4" & 2.8" (Resistive Touch) - ESP8266
Generic 2.4" & 2.8" (Resistive Touch) - Pico
Sharp Memory
Sharp Memory Screen 1.3"
SparkFun TeensyView
Switch Science Reflective LCD
DRIVERS
DESTM32S display
DotStar display
ILI9341 display
LPM013M126A display
LS013B4DN04 display
MCP230XX GPIO expander
NeoStrand
SSD1306 display
SSD1351 display
ST7735 display
Files
IO
TC53 IO
Firmata
NETWORK
Reference
TLS (SecureSocket)
BLE
Ethernet
Web Things
PINS
Reference
Audio Output
PIU
Reference
Localization
Keyboard
Expanding Keyboard
Die Cut
Using After Effects Motion Data
TOOLS
Reference
Manifest
Defines in Manifests
Testing
XS
Handle
JavaScript language considerations on embedded devices using the XS engine
Mods – User Installed Extensions
ROM Colors
Using XS Preload to Optimize Applications
XS Conformance
XS Marshalling
XS Platforms
XS in C
XS linker warnings
xsbug
xst
XS Compartment
XS Profiler

Moddable Display Developer Guide

Copyright 2024 Moddable Tech, Inc.
Revised: January 9, 2024

This document provides information about the Moddable Display family of products.

Table of Contents

About Moddable Display

Moddable Display is the beautiful way to bring your latest project from the workbench to the real world. Each Moddable Display wraps an elegant stand around one of our powerful development boards. The sleek design fits right into your home or office. The intriguing, maker-friendly open back makes it easy to incorporate any additional hardware components your project requires.

There are four different Moddable Displays, one for each Moddable development board. Moddable Display 1 is built on the Moddable One development board, for example.

Moddable Display 1

Moddable Display 1 is built around the Moddable One development board. See the Moddable One Developer Guide for more information about developing with Moddable Display 1.

Building

To build for Moddable Display 1, use the esp/moddable_display_1 build target. For example:

mcconfig -d -m -p esp/moddable_display_1

Display Rotation

Moddable Display 1 contains a Moddable One development board that is rotated 180 degrees when in portrait orientation. The default build automatically sets the rotation to 180 degrees. To run in landscape orientation, set the rotation to either 90 or 270. To run in touch orientation, set the rotation to 0.

Rotation may be set on the command line:

mcconfig -d -m -p esp/moddable_display_1 driverRotation=90

Or in your project's manifest:

	"config": {
		"driverRotation": 90
	}

Or at runtime in JavaScript:

screen.rotation = 90;

Changing the rotation from JavaScript does not immediately update the screen; your project must redraw the screen.

Note: The touch input on Moddable Display 1 is automatically rotated when using the Piu user interface framework. When using Commodetto, the project code must apply display rotation.

Moddable Display 2

Moddable Display 2 is built around the Moddable Two development board. See the Moddable Two Developer Guide for more information about developing with Moddable Display 2.

Building

To build for Moddable Display 2, use the esp32/moddable_display_2 build target. For example:

mcconfig -d -m -p esp32/moddable_display_2

Display Rotation

Moddable Display 2 contains a Moddable Two development board that is unrotated (0 degrees) when in portrait orientation. To run in landscape orientation, set the rotation to either 90 or 270. To run in touch orientation, set the rotation to 180.

Rotation may be set on the command line:

mcconfig -d -m -p esp32/moddable_display_2 driverRotation=180

Or in your project's manifest:

	"config": {
		"driverRotation": 180
	}

Or at runtime in JavaScript:

screen.rotation = 180;

Changing the rotation from JavaScript does not immediately update the screen; your project must redraw the screen.

Note: The touch input on Moddable Display 2 is automatically rotated when using the Piu user interface framework. When using Commodetto, the project code must apply display rotation.

Moddable Display 3

Moddable Display 3 is built around the Moddable Three development board. See the Moddable Three Developer Guide for more information about developing with Moddable Display 3.

Building

To build for Moddable Display 3, use the esp/moddable_display_3 build target. For example:

mcconfig -d -m -p esp/moddable_display_3

Display Rotation

Moddable Display 3 contains a Moddable Three development board that is rotated 180 degrees when in landscape orientation. To run in portrait orientation, set the rotation to either 90 or 270.

Rotation may be set on the command line:

mcconfig -d -m -p esp/moddable_display_3 rotation=90

Or in your project's manifest:

	"config": {
		"rotation": 90
	}

Moddable Display 4

Moddable Display 4 is built around the Moddable Four development board. See the Moddable Four Developer Guide for more information about developing with Moddable Display 4.

Building

To build for Moddable Display 4, use the nrf52/moddable_display_4 build target. For example:

mcconfig -d -m -p nrf52/moddable_display_4

Display Rotation

Moddable Display 4 contains a Moddable Four development board that is rotated 180 degrees when in portrait orientation. The default build automatically sets the rotation to 180 degrees. You may also run with the rotation set to 0.

Rotation may be set on the command line:

mcconfig -d -m -p nrf52/moddable_display_4 driverRotation=0

Or in your project's manifest:

	"config": {
		"driverRotation": 0
	}

Or at runtime in JavaScript:

screen.rotation = 0;

Changing the rotation from JavaScript does not immediately update the screen; your project must redraw the screen.