This is the multi-page printable view of this section. Click here to print...
TWELITE STAGE APP
- 1: TWELITE STAGE APP Manual
- 1.1: Obtaining the Package
- 1.2: How to Use
- 1.2.1: Key and Mouse Operations
- 1.2.2: Screen Operations
- 1.2.2.1: Serial Port Selection
- 1.2.2.2: Main Menu
- 1.2.2.2.1: Viewer
- 1.2.2.2.1.1: Terminal
- 1.2.2.2.1.2: Standard App Viewer
- 1.2.2.2.1.3: Graph
- 1.2.2.2.1.3.1: Accelerometer Real-Time Graph
- 1.2.2.2.1.3.2: Sensor Graph
- 1.2.2.2.1.4: Simple Monitor
- 1.2.2.2.1.4.1: CUE Viewer
- 1.2.2.2.1.4.2: ARIA Viewer
- 1.2.2.2.1.4.3: Glancer
- 1.2.2.2.1.5: Commander
- 1.2.2.2.2: Write App Firmware
- 1.2.2.2.2.1: Select from BIN
- 1.2.2.2.2.2: act Build & Write
- 1.2.2.2.2.3: TWELITE APPS Build & Write
- 1.2.2.2.2.4: Act_extras
- 1.2.2.2.2.5: Folder (Specify)
- 1.2.2.2.2.6: Last (Re-execute)
- 1.2.2.2.2.7: Build & Write Screen
- 1.2.2.2.3: Interactive Settings Mode
- 1.2.2.2.4: Settings of TWELITE STAGE
- 1.2.2.2.5: Select SERIAL port
- 1.2.3: Logging Function
- 1.3: Detailed Specifications
- 1.3.1: Detailed Settings with Command-line Arguments and ini Files
- 1.3.2: Environment Variables
- 1.3.3: Adding Project Descriptions with 000desc.txt
- 1.4: License
- 1.5: Revision History
1 - TWELITE STAGE APP Manual
Please refer to the Important notes regarding documents.
If you notice any issues, we would appreciate it if you could contact our support desk.
Windows/macOS/Linux versions include MWSDK, which contains compilers and sample code. For more details, please refer to the following:
- MWSDK Overview - https://sdk.twelite.info/
- MWX Library - https://mwx.twelite.info/
It operates on various platforms:
- Windows 10
- macOS (High Sierra or later, supports both Intel and Apple Silicon Macs)
- Linux (Ubuntu 18.04)
- Raspberry Pi (Raspberry Pi 3 Model B, LCD Touch Screen, Raspberry Pi OS August 2020)
- (M5stack: Supported up to version 1.0. Versions 1.3 and later are not supported at the source level.)
※ Depending on the platform, operating conditions, distribution formats, and features may differ.

Root Menu

Real-time Acceleration Graph
About this Document
- To indicate the target platforms, some pages specify the following:
- Windows – Windows 10
- macOS – Mac OS X, OS X, macOS
- Linux – Ubuntu, etc. (64bit)
- RasPi – Raspberry Pi
1.1 - Obtaining the Package
The latest TWELITE STAGE app can be obtained by one of the following methods.
Entire TWELITE STAGE SDK (Official Website)
The Mono Wireless official website distributes a complete set of development tools (for Windows/macOS/Linux), including the TWELITE STAGE app.
TWELITE STAGE-トワイライトステージ - MONO-WIRELESS.COM
TWELITE STAGE App Only (GitHub)
The Mono Wireless official repository distributes the standalone binary of the TWELITE STAGE app. Please use this if you want to update only the TWELITE STAGE app or obtain the M5Stack version. The version of each binary can be identified from the tags on GitHub.
Windows
monowireless/TWELITE_Stage_BIN_Win: Binary Distribution of TWELITE Stage.
macOS
monowireless/TWELITE_Stage_BIN_macOS: Binary distribution of TWELITE Stage for macOS
Linux
Linux binaries are not distributed separately. Please obtain binaries from the TWELITE STAGE SDK package or build from source code.
Raspberry Pi
Raspberry Pi binaries are not distributed separately. Please obtain binaries from the TWELITE STAGE SDK package or build from source code.
M5Stack
Versions up to 1.0.3a are distributed on the following page.
monowireless/TWELITE_STAGE_Bin_M5Stack
Source Code (MWM5 Library)
The MWM5 library, including the source code of TWELITE STAGE, is published on the following page.
The source code of the TWELITE STAGE app is placed in examples/TWELITE_Stage.
1.2 - How to Use
How to Launch the App
To launch the TWELITE STAGE app, execute the executable file located in {MWSTAGE Installation}
.
{MWSTAGE Installation}
. Behavior is undefined if the executable is placed in any other path.The method of execution varies depending on the platform (Windows, macOS, Linux).
System | Extension | Notes |
---|---|---|
Windows | .exe | Double-click the executable file in Explorer |
macOS | .command | Double-click the executable file in Finder |
Linux RasPi | .run | Depends on the distribution and installation environment.Execute as a command from a terminal window (such as xterm) on the X Window System |
Executable Types of the App
The TWELITE STAGE APP has two types of executables.
- TWELITE_Stage.{extension} - Launches with standard settings.
- TWELITE_Stage_VSCode.{extension} - Configured to “Use VSCode” (settings saved in
TWELITE_Stage_VSCode.ini
). When the VSCode usage setting is enabled, the app operates in a way suitable for development work using VSCode.
App Interface
When you launch the app, two types of windows are displayed:
- Main Window
- Displays the user interface of the TWELITE STAGE APP.
- The serial port under connection (e.g. TWELITE-R or TWELITE STICK) is displayed in the title bar.
- All operations of the TWELITE STAGE APP are performed within this window.
- Press the ALT (Cmd) key to display the operating aid screen.
- The
[ A ]
[ B ]
[ C ]
buttons appear at the bottom of the screen and are used for operation. These buttons can be pressed and held down to call up sub-functions.
- Displays the user interface of the TWELITE STAGE APP.
- Command Window
- Usually not used, but displays auxiliary information.
- Shows serial communication content, making it ideal for checking logs.
- When launched from the command line, the originating terminal acts as the command window.
- Usually not used, but displays auxiliary information.

Example Screen of TWELITE STAGE APP
Exiting the App
Exit the app by any of the following methods:
- Move the mouse pointer to the upper right of the execution screen and press the exit button displayed within the screen.
- Close the app window (on macOS,
⌘Q
can also be used).
On rare occasions, the execution screen may remain after the exit operation. In such cases, please try the following:
- Close the TWELITE STAGE APP command line window.
- Force quit the app (refer to your system’s documentation for how to force quit).
1.2.1 - Key and Mouse Operations
Windows macOS Linux RasPi
Key Operations
Windows macOS Linux RasPi
Key inputs performed while holding down Alt (Cmd)
are assigned to operations such as changing the settings of TWELITE STAGE APP. Other key operations generally function as normal text input.
Common Keys
Windows macOS Linux RasPi
Key | Meaning |
---|---|
ESC ESC | Quickly press ESC twice. Cancel or return to the previous screen.On some screens, pressing once returns to the previous screen. |
ENTER | Enter, Select |
BS | Delete one character |
Cursor Keys↑ ↓ | Select item |
Help Screen
Windows macOS Linux RasPi
Hold down Alt (Cmd)
to display the help screen. The help screen shows explanations of keys that can be used together with Alt (Cmd)
and some operational status.
The help screen can also be displayed by moving the mouse pointer to the top-left corner of the screen.

Help Screen
Alt (Cmd) + Operations
Windows macOS Linux RasPi
This section explains operations performed while holding down Alt (Cmd)
.
In the table below, the Alt (Cmd)+
prefix is omitted. You can check the available keys from the help screen above, but supplementary explanations are provided in the table below.
Alt (Cmd) + Key | Meaning |
---|---|
I | Inputs + + +. This is the key sequence to enter interactive mode.※ Apps that perform intermittent operation due to sleep are not supported. |
R | Resets the module. Controls the reset pin using the functions of TWELITE R or MONOSTICK. |
A , S , D | Press buttons A, B, C. |
Shift +A , S , D | Long press buttons A, B, C. |
C | Copies the text displayed on the screen to the clipboard. (The range varies depending on the screen) |
V | Pastes from the clipboard as keyboard input. |
F | Switches to full-screen display. If Shift+F is pressed, it enlarges further if possible. |
G | Changes the screen rendering method. It emulates a 640x480 LCD screen, but for enlargement, four rendering styles can be selected: (1. LCD monitor style / 2. CRT style / 3. Enlarged with dots emphasized / 4. Enlarged with dots blurred).※ You can change the startup setting in the settings menu. |
J | Selects the screen size. Available sizes are {640,480}, {1280,720}, {1280,960}, {1920,1440}, {2560,1440}, {320,240}.※ Can be set as startup setting in the settings menu. |
Q | Quits TWELITE STAGE APP. |
0 | Disconnects the serial port and shows the list of serial ports again. |
1 , 2 , … | Selects the serial port. |
B | Change baud rate if serial port is open (9600, 19200, 38400, 57600, 115200, 234000). |
L , Shift +L | Starts logging serial port input/output. When finished, the log file opens with Notepad on Windows or Log Viewer on macOS. Shift +L opens the log storage folder. |
Other Operations
Key | Meaning |
---|---|
Alt (Cmd) +Shift +Ctrl +m | Opens the MWX library code folder. |
Alt (Cmd) +Shift +l | Opens the log folder. |
Mouse Operations
Windows macOS Linux RasPi
Mouse operations mainly involve left-clicking, but right-click, right double-click, and the scroll wheel may be used.
Mouse Operation | Meaning |
---|---|
Left click | Select |
Left click and drag | Used on some screens (e.g., dragging on graph screens) |
Left double-click | Not used |
Right click | Used on some screens |
Right double-click | Exit the screen (same as ESC ESC ) |
Scroll wheel | Used on some screens (e.g., zoom in/out on graph screens) |
Mouse Control of A, B, C Buttons
Windows macOS Linux RasPi
When you move the mouse pointer to the menu display at the bottom of the screen, buttons labeled [ A ]
, [ B ]
, and [ C ]
appear. TWELITE STAGE APP assigns functions of the hardware buttons arranged in this way to each screen. You can call the functions by left-clicking or long-pressing these buttons. (They can also be selected with Alt (Cmd)
+a
,s
,d
or Alt (Cmd)
+Shift
+a
,s
,d
)
![Example of virtual [ B ] button displayed at the bottom of the screen](../../../../images/stage-app-abc-button.webp)
Example of virtual [ B ] button displayed at the bottom of the screen
Mouse Control of Screen Operations
Windows macOS Linux RasPi
On Windows/macOS/Linux, TWELITE STAGE APP screens are basically composed of text only, but menus, buttons, and tabs can be operated with the mouse.

Example of Commander Screen
The screen consists of text only, but the tabs at the top of the screen and inverted text can be selected by left-clicking with the mouse.
1.2.2 - Screen Operations
Windows macOS Linux RasPi

Example of the menu screen
Windows / macOS / Linux / Raspberry Pi
TWELITE STAGE APP is an application launched from the console screen (command line). It outputs information to both the console screen and window screen.
The console screen displays UART output similar to a terminal.
Raspberry Pi (nox)
Displays on the framebuffer without using X11.
Normally (when started from a shell screen on the framebuffer), the console screen is not displayed.
1.2.2.1 - Serial Port Selection
Windows macOS Linux RasPi
Overview
On Windows / macOS / Linux, a screen to select the serial port connected to TWELITE is displayed at startup. However, the serial port can also be connected later.

Example of the serial port selection screen
In the TWELITE STAGE app, the serial port selection and the processing of each screen are not linked. For example, if you start the viewer without selecting a serial port, the display will not update. When you select a serial port in this state, the viewer display will be updated.
Also, the serial port can be switched at any time using the shortcut keys Alt(Cmd)
+ 0
, 1
, 2
, …
Windows
Press the c
key to display the COM port name of the serial port currently highlighted in the list.
Raspberry Pi
On Raspberry Pi, in addition to USB devices, if /dev/serial0
and /dev/serial1
exist, serial0
and serial1
will be displayed. Normally, serial0
is used.
1.2.2.2 - Main Menu
Windows macOS Linux RasPi
This is the top level of the hierarchical menu.

Example of the main menu screen
On this screen, you select a menu. When a menu is highlighted, a brief explanation is displayed in green text at the bottom.
- Viewer: A viewer that interprets and displays packets received from TWELITE. In many cases, the receiving TWELITE is programmed with App_Wings.
- Write Firmware: Build the firmware and write it to the connected TWELITE.
- Interactive settigns mode: Configure the connected TWELITE settings via interactive mode.
- Settings of TWELITE STAGE: Configure various settings of the TWELITE STAGE app.
- Select SERIAL port: Select the serial port.
- Open MANUAL: Menu to display manuals. Opens the following manuals in a browser:
- TWELITE STAGE App (this document)
- MWX Library
- TWENET_C Library
1.2.2.2.1 - Viewer
Windows macOS Linux RasPi
The viewer is a feature for displaying information received from a connected TWELITE and sending commands.
1.2.2.2.1.1 - Terminal
Windows macOS Linux RasPi

Example of the Terminal screen
Overview
A general VT100-compatible serial terminal.
Supports TWELITE interactive mode and reset control.
Operations
Operation | Description |
---|---|
[ A ] | Input the + + + sequence (interactive mode) |
[ A ]Long press | Exit this screen and return to the previous menu. |
[ B ] | Display a partial area of the first screen with a larger font.The area is selected so that the cursor is visible on the screen, but depending on the screen output, the desired part may not be visible. |
[ B ]Long press | Toggle word wrap ON/OFF.By default, word wrap is enabled, but you can also display without wrapping. Characters beyond the right edge of the screen will not be displayed. |
[ C ] | Move to the firmware update screen.During firmware development, source code modification, operation check, build & write are frequently performed, so a shortcut is provided. |
[ C ]Long press | Control and reset the TWELITE reset pin. |
ESC ESC | Press the ESC key twice quickly to exit this screen.※ In most screens, pressing the ESC key once exits the screen, but in the terminal, a single ESC key input is used for other purposes, so double input is assigned. |
1.2.2.2.1.2 - Standard App Viewer
Windows macOS Linux RasPi

Example of the Standard App Viewer screen
Overview
The TWELITE communicating partner should have App_Twelite
(Standard App) programmed. When a message indicating the status of buttons or analog inputs of the Standard App (0x81
message) is received, its contents are interpreted and displayed using the mwm5
parser library.
Operations
Operation | Description |
---|---|
[ A ] | No assignment |
[ A ]Long press | Exit this screen and return to the previous menu. |
[ B ] | Change the font. |
[ B ]Long press | Display the screen with test dummy data. |
[ C ] | No assignment |
[ C ]Long press | Control the reset pin of the TWELITE to reset it. |
ESC ESC | Press the ESC key twice to exit this screen. |
1.2.2.2.1.3 - Graph
- Accelerometer Real-Time Graph: Displays accelerometer sensor packets in real time. Frequency domain display and CSV file saving are available.
- Sensor Graph: Saves data from various TWELITE sensors into an sqlite3 database and displays graphs.
1.2.2.2.1.3.1 - Accelerometer Real-Time Graph
Windows macOS Linux RasPi

Example Display of Demo Data
Overview
This refers to packets received from TWELITE CUE and TWELITE Motion Sensor PAL. It can display accelerometer data in real-time, and includes features for frequency analysis and CSV export.
It supports three modes: CUE mode, MOT mode, and 2525 FIFO mode.
When a continuous series of samples reaches a certain number (analysis window), frequency analysis of the XYZ axes is displayed. However, in 2525 FIFO mode, it is assumed to be always continuous.
When packet boundaries are explicit (e.g., when more than 3 seconds have elapsed since the previous packet, in CUE mode for each packet, or in MOT mode when the packet sequence number is discontinuous), four dummy samples are inserted and a pink background is shown.
Data from up to four nodes are stored on a first-come, first-served basis.
The factory default TWELITE CUE is set to TWELITE CUE mode.
For continuous data measurement, please switch to Motion Sensor PAL mode.
Typical settings for Motion Sensor PAL mode when using the Accelerometer Real-Time Graph are as follows:
- To measure continuously at about 25Hz
t: set Transmission Interval (0)
p: set Sensor Parameter (03000000)
- To measure continuously at about 50Hz
t: set Transmission Interval (0)
p: set Sensor Parameter (03000100)
- To measure continuously at about 100Hz
t: set Transmission Interval (0)
p: set Sensor Parameter (03000200)
- To measure 128 samples at about 100Hz every ~10 seconds
t: set Transmission Interval (10)
p: set Sensor Parameter (03000208)
- To measure 256 samples at about 100Hz every ~10 seconds
t: set Transmission Interval (10)
p: set Sensor Parameter (03000210)
- To measure 64 samples at about 50Hz every ~10 seconds
t: set Transmission Interval (10)
p: set Sensor Parameter (03000104)
- To measure 128 samples at about 200Hz every ~10 seconds
t: set Transmission Interval (10)
p: set Sensor Parameter (03000308)
Operation
Operation | Description |
---|---|
Top right(i)ID# button | Click to switch the ID.(Note: Continuous sample data in FIFO mode is not suitable for multi-ID operation) |
Top right(f)SMP# button | Click to change the analysis window size among 64, 128, and 256. |
Bottom right(c)Save Display Data button | Exports data in CSV format to the log folder.Outputs from the oldest sample in the buffer to the latest sample at the right edge of the screen.(Note: The output is always 5120 samples, with the latest data at the end) |
Bottom rightPAUSE( ) button | Pauses display updates.(Note: Samples are still collected until the internal temporary sample buffer is full) |
Mouse drag(Graph area) | Moves the position of displayed samples. |
Mouse drag(Bottom scrollbar) | Moves the displayed sample position in larger steps. |
Arrow keys→ ← | Moves the sample display area. |
Arrow keys↑ ↓ | Zooms in/out on the horizontal axis of samples (1x / 2x / 3x / 4x).(Note: Up to 2x when the analysis sample count is 256) |
Sample Rate Estimation
The sampling rate is calculated from the packet reception times. It averages the reception times of multiple past samples to estimate one sample interval, so packet drops may cause significant errors.
Also, the related log timestamp (T_SMPL
) is an estimated value and is delayed compared to the packet acquisition time.
Once sample rate estimation completes, graph scrolling becomes smooth.
Opening the CUE Graph Mode on Startup
Specify 31
in [STAGE Common Settings → Startup App Selection].
Log Output (Save Display Data)
Pressing the (c) Save Display Data
button outputs up to 512 samples starting from the current display position (rightmost sample).
Log file name is {log folder}/acc_snap_{timestamp}.csv
.
- Data has the newest sample at the right edge as sample number 512 (file end).
- When frequency analysis is performed, the last samples used for frequency analysis are included.
- Frequency analysis results are added to rows containing frequency analysis target samples (for 64 samples, results appear from sample 449 for 32 rows, showing from DC to high frequency components).
Label | Item Name | Description |
---|---|---|
# | SampleNumber | |
T_PKT[ms] | PacketReception Time | Multiple samples may be included in one packet, so samples with the same timestamp are listed. |
SEQ | PacketSequence Number | Assigned to each packet; continuity indicates no packet loss. |
T_SMPL[ms] | SampleTime (Virtual/Estimated) | Timestamp generated for each sample from packet reception time.Does not match the actual sampling time.(Note: Sample rate is estimated from packet reception intervals, and sample times are cumulatively added, so timestamps are delayed by one packet interval compared to actual sample time) |
X[G] | X-axis Sample Value | Unit is G . Based on sensor values. |
Y[G] | Y-axis Sample Value | Unit is G . Based on sensor values. |
Z[G] | Z-axis Sample Value | Unit is G . Based on sensor values. |
FD# | Frequency Analysis Calculation Index | For 64 samples, ordered as DC,1,2,...,31 . |
Hz | Frequency Analysis Frequency Axis Value | Estimated frequency, calculated as (FD# / FD_Len) * FD_Freq . |
X | Frequency Analysis Value on X-axis | |
Y | Frequency Analysis Value on Y-axis | |
Z | Frequency Analysis Value on Z-axis | |
Label | Additional Info Name | See table below |
Info | Additional Info | See table below |
Additional Information
Info Name | Description |
---|---|
ModuleSID | Serial number of the sender |
Tick[ms] | System time when the log file was opened(Note: TWELITE STAGE app side) |
Date | Date when the log file was opened |
Time | Time when the log file was opened |
Time_Msec_part | Sub-second part of time when the log file was opened [ms] |
Samples | Valid sample data |
FD_Len | Frequency analysis sample count |
FD_Start# | Frequency analysis start sample number |
FD_Freq | Estimated frequency range for frequency analysis [Hz](Note: estimated from sample reception interval) |
Log Output (Auto Save)
When the Accelerometer Real-Time Graph screen is opened and data is input, log files are automatically saved.
Log file name is log folder/accel_{serial number}_{timestamp}.csv
.
Label | Item Name | Description |
---|---|---|
# | SampleNumber | |
T_PKT[ms] | PacketReception Time | Multiple samples may be included in one packet, so samples with the same timestamp are listed. |
SEQ | PacketSequence Number | Assigned to each packet; continuity indicates no packet loss. |
T_SMPL[ms] | SampleTime (Virtual/Estimated) | Timestamp generated for each sample from packet reception time.Does not match the actual sampling time.(Note: Sample rate is estimated from packet reception intervals, and sample times are cumulatively added, so timestamps are delayed by one packet interval compared to actual sample time) |
X[G] | X-axis Sample Value | Unit is G . Based on sensor values. |
Y[G] | Y-axis Sample Value | Unit is G . Based on sensor values. |
Z[G] | Z-axis Sample Value | Unit is G . Based on sensor values. |
Label | Additional Info Name | See table below |
Info | Additional Info | See table below |
Additional Information
Info Name | Description |
---|---|
ModuleSID | Serial number of the sender |
Tick[ms] | System time when the log file was opened(Note: TWELITE STAGE app side) |
Date | Date when the log file was opened |
Time | Time when the log file was opened |
Time_Msec_part | Sub-second part of time when the log file was opened [ms] |
1.2.2.2.1.3.2 - Sensor Graph
Windows macOS Linux RasPi

Example of data display
Overview
Various sensor data are recorded in an SQLite database and displayed on the screen in graph format. The database file can also be accessed by external applications.
You cannot run multiple instances of TWELITE STAGE APP with the same executable name to use the Sensor Graph simultaneously.
The database file is stored in the {MWSTAGE Installation}/log
folder, and the filename is determined based on the executable name of TWELITE STAGE APP. If the executable names are the same, they will refer to the same database file. The TWELITE STAGE APP implementation does not assume multiple apps add data to the same database simultaneously. In some cases, this may cause database file access errors and cause TWELITE STAGE APP to crash.
For example, if you want to connect two MONOSTICK devices to a PC and run multiple “Sensor Graph” instances simultaneously, run multiple TWELITE STAGE apps with different executable names (e.g., TWELITE_Stage_a.exe
, TWELITE_Stage_b.exe
). The database filenames will be log/TWELITE_Stage_a_WSns.sqlite
and log/TWELITE_Stage_b_WSns.sqlite
, respectively.
- The database uses SQLite (sqlite3) and is stored in the file
{MW_STAGE Install}/log/{executable_name}_WSns.sqlite
. - Screen navigation is
[List (with graph preview)]
>[24-hour Data]
>[Live View]
.- From
[24-hour Data]
, you can further navigate to[Year]
,[Month]
, and[Day (with graph preview)]
selection screens.
- From
- About the
[Live]
display screen:- Select a specific node from the list.
- Displays real-time data every second, showing data from the past 450 seconds.
- About the
[24-hour Data]
display screen:- Displays data for a specific day.
- Updates every second; if multiple data points occur during that time, some are thinned out.
- Except at maximum zoom (1 pixel = 1 second), the average value for the data within each pixel range is displayed.
- If values exceed the screen, measurement points are shown at the top or bottom edges.
- If the current time is included, the display updates with new data.
- Mouse wheel or cursor keys
↑
and↓
: zoom in/out on the time axis. - Moving the mouse pointer: briefly displays the data corresponding to the time under the pointer.
- Cursor keys
→
and←
: move to the adjacent data point.
- Cursor keys
- Mouse click & drag: scroll (only when zoomed).
- When zoomed, scrollbar operation is also possible.
- The
[CSV Export]
function outputs all data in the database.
Operations
Operation | Description |
---|---|
Mouse drag(graph area) | Move the displayed sample position when zoomed. |
Mouse drag(bottom scrollbar) | Move the displayed sample position. |
Cursor keys→ ← | Move the sample display area. |
Cursor keys↑ ↓ | Zoom in/out on the sample horizontal axis. |
[Live] | Switch to the view displaying the latest data updated every second. |
[24-hour Data] | Switch to the daily graph view. |
[<<List] | Switch to the list selection screen. |
[Year] [Month] [Day] | Select a specific date by year, month, and day. |
[Latest] | Switch to today’s data. |
[CSV Export] | Export one day’s data to a CSV file. |
In the list, [Display] | Change the list display mode. |
In the list, [Sort] | Change the list sorting order. |
In the list, [↑] | Reverse the list sorting order. |
Editing Sensor Node Notes (Supplementary Information)
v1.3.9+In the “24-hour Data” screen, left-clicking on the sensor node’s note area at the top right of the screen allows you to edit the note using a prompt.

Editing sensor node notes (IME enabled)
Key | Description |
---|---|
Normal half-width characters | If you directly enter normal half-width alphanumeric characters, they are displayed on the screen. |
Input via IME | Input from IME is displayed as intermediate characters at the top left of the screen.Press ENTER to confirm the input string. |
BS | Deletes the last character displayed. |
ENTER | Reflects the entered string in the database. |
IME input operations may depend on the system environment.
Unexpected characters may be entered during IME input. If unwanted characters appear in the input area, delete them using the BS
key.
Screen Navigation
The basic screens are divided into three types: List, 24-hour, and Live.
[List] <--> [24-hour] <--> [Live]
↓↑
[Year/Month/Day Selection]
Starting Sensor Graph Mode on Launch
Specify 32
in [STAGE Common Settings → Launch App Specification].
About the Database Tables
sensor_data
Stores received data.
Column Name | Type | Description |
---|---|---|
_uqid | INTEGER | Sequential number used in the database |
sid | INTEGERint32_t | Serial number stored as int32_t type.For example, a serial number “8123abcd” is stored as the integer value -2,128,368,691. |
ts | INTEGERint64_t | Timestamp when the system received the packet, stored as int64_t .UNIX epoch (seconds since 1970). |
ts_msec | INTEGER | Milliseconds part of the timestamp. |
year | INTEGER | Year part of the local time from the timestamp. |
month | INTEGER | Month part of the local time from the timestamp. |
day | INTEGER | Day part of the local time from the timestamp. |
hour | INTEGER | Hour part of the local time from the timestamp. |
lid | INTEGER | Identifier such as LID assigned by the user. |
lqi | INTEGER | Link Quality Indicator, an estimate of reception strength. |
pkt_seq | INTEGER | Packet sequence number. The range of values depends on the firmware. |
pkt_type | INTEGER | Type of wireless packet.2 PAL AMB 6 ARIA 1 PAL MAG *3 PAL MOT 5 CUE 0x101 App_Twelite *0x103 App_IO *Currently unsupported types |
value | REAL | Measured value (definition varies by packet type).pkt_type-> 2,6: Temperature [°C] 1: Magnet detection (00->No magnet, 01->N pole, 02->S pole) 3,5: X-axis acceleration (average if multiple samples in packet) [G] 0x101,103: Input IO bitmap (same as lower 8 bits of val_dio) |
value1 | REAL | Measured value (definition varies by packet type).pkt_type-> 2,6: Humidity [%] 1: Unused 3,5: Y-axis acceleration (average if multiple samples in packet) [G] 0x101: ADC1 [V] 103: Unused |
value2 | REAL | Measured value (definition varies by packet type).pkt_type-> 2: Illuminance [lx] 6: Unused 1: Unused 3,5: Z-axis acceleration (average if multiple samples in packet) [G] 0x101: ADC2 [V] 103: Unused |
value3 | REAL | Measured value (definition varies by packet type).pkt_type-> 2: Unused 6: Unused 1: Unused 3,5: Unused 0x101: ADC3 [V] 103: Unused |
val_vcc_mv | INTEGER | Power supply voltage [mV] |
val_dio | INTEGERint32_t | b0..b7 : Values of DI1..DI8 (1 is LOW, 0 is HIGH level)b24..b25 : Magnet value (if b28 is 1 ): 00 ->No magnet, 01 ->N pole, 10 ->S poleb28 : If 1 , magnet data is stored in b24..b25 b31 : Periodic transmission bit (magnet only) |
val_adc1_mv | INTEGER | ADC1 measurement value for pkt_type-> 1,2,3,0x101 |
val_adc2_mv | INTEGER | ADC4 measurement value for pkt_type-> 0x101 |
val_aux | INTEGER | For storing other data |
ev_src | INTEGER | Event source |
ev_id | INTEGER | Event IDpal_type-> 5: Dice (1...6) 16→MOVE etc. Refer to documentation |
ev_param | INTEGER | Event parameter |
sensor_node
Stores text notes (supplementary information) for sensor nodes.
Column Name | Type | Description |
---|---|---|
sid | INTEGER | SID as described above |
sid_text | TEXT | String representation of SID converted to hexadecimal for readability |
desc | TEXTUTF-8 | Note (supplementary information) corresponding to the SID, displayed in lists, etc. |
sensor_last
Manages the timestamp of the last received data.
Column Name | Type | Description |
---|---|---|
sid | INTEGER | SID as described above |
ts | INTEGER | Timestamp of the last reception |
lid | Excerpt of data from the last reception below | |
lqi | ||
pkt_type | ||
value | ||
value1 | ||
value2 | ||
value3 | ||
val_vcc_mv | ||
val_dio | ||
ev_id |
1.2.2.2.1.4 - Simple Monitor
- CUE Viewer: Interprets packets from TWELITE CUE and displays them simply
- ARIA Viewer: Interprets packets from TWELITE ARIA and displays them simply
- Glancer: A simple monitor supporting many formats of TWELITE
1.2.2.2.1.4.1 - CUE Viewer
Windows macOS Linux RasPi

Example of Dice Face Detection
Overview
Interprets and displays messages received from TWELITE CUE.
Operation of TWELITE CUE
The factory default setting of TWELITE CUE is configured to CUE mode.
In CUE mode, it operates intermittently to enable coin cell battery operation, waking from sleep due to several factors and transmitting various data.
Wake-up Factors
TWELITE CUE requires one of the following factors to wake from sleep:
- Wake-up by timer (periodic wake-up)
- Wake-up by acceleration detection
- Wake-up by magnetic sensor (when a magnet is detected nearby)
Types of Data Transmitted
TWELITE CUE sends the following data in packets:
- Detection events (see below)
- Module power voltage
- Magnetic sensor detection value
- Acceleration data
Packet Attributes
The attributes of received packets provide basic information.
Attribute | Description |
---|---|
#???? | The count of received packets so far. |
Type | Packet type as the value of E_PKT in the mwm5 library.Packets from TWELITE CUE are usually PKT_PAL=02 . |
ID | Logical ID of the sender, usually a value from 0..100 . |
AD | Serial number of the sender. |
LQ | Approximate reception strength (Link Quality Indicator). |
SQ | Sequence number of the packet. |
Events
In CUE mode, acceleration events are always output. Regardless of the wake-up factor, a fixed number of acceleration samples are measured after waking. Events are determined based on the acceleration measurement results.
Event | Number | Description |
---|---|---|
Dice | 1(0x00) .. 6(0x06) | Determined based on periodic wake-up and magnetic sensor wake-up.If a large acceleration is detected after waking,an undetermined event (0xFF ) may be detected. |
Move | 16(0x10) | Occurs when the acceleration sensor detects acceleration above a threshold,resulting in a move or shake event.Move occurs when the measured acceleration change is relatively small,(acceleration change detected but no continuous acceleration change). |
Shake | 0x08 | Occurs when the acceleration sensor detects acceleration above a threshold,resulting in a move or shake event.Shake occurs when the measured acceleration change is relatively large,(continuous acceleration changes detected). |
Voltage
Power supply voltage of the module [mV].
Magnet
Displays the detected magnetic pole or no detection.
Acceleration
Displays acceleration measured after waking.
- Samples: Displays the number of acceleration samples, fixed at 10 samples.
- Rate ID: Sample rate of acceleration, fixed at 04 (100Hz).
- X, Y, Z: Acceleration on three axes. Calculated as the average of 8 samples. Unit is milli-G (1000mG = 1G = 9.8m/s²).
Example Screens

Example of Move Event Detection

Example of Shake Event Detection
1.2.2.2.1.4.2 - ARIA Viewer
Windows macOS Linux RasPi

Example display of temperature and humidity data table
Overview
Interprets and displays messages received from TWELITE ARIA.
Operation of TWELITE ARIA
The factory default setting of TWELITE ARIA is TWELITE ARIA mode.
In TWELITE ARIA mode, it operates intermittently to allow coin battery power, waking from sleep due to several factors, and sending various data.
Wake-up Factors
TWELITE ARIA requires one of the following factors to wake from sleep:
- Wake-up by timer (periodic wake-up)
- Wake-up by magnetic sensor (when a magnet is detected nearby)
Types of Data Sent
TWELITE ARIA sends the following data packed in a packet:
- Module power supply voltage
- Magnetic sensor detection value
- Temperature and humidity data
Packet Attributes
Basic information can be obtained from the attributes of the received packet.
Attribute | Description |
---|---|
#???? | Number of packets received so far. |
Type | Packet type based on the E_PKT value in the mwm5 library.Packets from TWELITE ARIA are usually PKT_PAL=02 . |
ID | Logical ID of the sender. Usually a value between 0..100 . |
AD | Serial number of the sender. |
LQ | Approximate received signal strength (Link Quality Indicator). |
SQ | Packet sequence number. |
Temperature and Humidity Data Table
Displays the history of the last 9 data packets received from TWELITE ARIA. The latest data is displayed at the top.
Time [s]
Time [seconds] from when the TWELITE STAGE APP started until the data was received.
ID
Logical device ID of the module.
VCC (mV)
Power supply voltage of the module [mV].
Temperature (°C)
Temperature measured by the module (°C).
Humidity (%)
Humidity measured by the module (%).
Magnet
Displays the detected magnetic pole or no detection.
1.2.2.2.1.4.3 - Glancer
Windows macOS Linux RasPi
Overview
Glancer provides a simplified display of the information contained in received messages.
By programming the connected TWELITE with App_Wings
, it can display information received from communication partners’ TWELITE devices (App_Twelite
, TWELITE PAL, … as long as the application ID and frequency channel match, mixed operation is possible).
Operation
Use by switching between the list display screen and the selection display screen.
List Display

Example of list display
Lists information from communication partners.
Displayed content includes message type, logical device ID, serial ID, LQI (Lq), power voltage (if included in the information), and timestamp.
Operation | Description |
---|---|
[ A ] | Move to the previous item in the list. |
[ A ]Long press | Exit this screen and return to the previous menu. |
[ B ] | Switch to selection display. |
[ B ]Long press | Sort items.The sort key changes sequentially each time sorting is performed. |
[ C ] | Move to the next item in the list. |
[ C ]Long press | Control the TWELITE reset pin and reset it. |
ESC | Exit this screen. |
Selection Display

Example of selection display
By moving items and highlighting one in the list display, then performing a selection operation, you transition to this screen. It shows information related to a specific communication partner in order of arrival.
The number of received packets and the average LQI since selection are displayed.
Operation | Description |
---|---|
[ A ] | No assignment |
[ A ]Long press | Exit this screen and return to the previous menu. |
[ B ] | No assignment |
[ B ]Long press | No assignment |
[ C ] | No assignment |
[ C ]Long press | Control the TWELITE reset pin and reset it. |
ESC | Return to the list display screen. |
1.2.2.2.1.5 - Commander
Windows macOS Linux RasPi
Overview
Commander is a feature to send serial messages to TWELITE.
Operation
The first screen of the Commander displays important notes.
At the top of the screen, there are tabs represented by text, which you can navigate by clicking with the mouse to switch between tab screens.
Operation | Description |
---|---|
[ A ] | Move tab (left) |
[ A ]Long press | Exit this screen and return to the selection screen. |
[ B ] | No assignment |
[ B ]Long press | No assignment |
[ C ] | Move tab (right) |
[ C ]Long press | Control the reset pin of TWELITE to reset it. |
ESC | Exit this screen and return to the selection screen. |
Tab: TWELITE
This screen generates and sends the 0x80 command of the Standard App (App_Twelite).
Make sure the connected TWELITE has App_Twelite or parent/relay app (App_Wings) programmed, and after setting the application ID and channel, confirm that messages are being received from the communication partner.

Example display of the TWELITE tab
Item | Description |
---|---|
Destination | Specify the TWELITE to send to.If you are a child device, specify “Parent:0”.If you are a parent device, specify “All children = 0x78” or a specific child ID (can be specified from 1 to 8). |
DI1..DI4 | Settings state from DI1 to DI4.■ means selected (LOW = GND level), □ means (HIGH = VCC level).Please specify SEL in the next item. |
SEL | Selection bits for each DI.(If 0, the DI specification is ignored; if 1, the specification is enabled.) |
PWM1..4 | Set the PWM duty ratio.0 corresponds to GND level, 1024 (100%) corresponds to VCC level.PWM ports set to N.A. will not be changed.(Note: On the MW-STA-KIT-0/MW-STA-SOLO-0 boards, PWM1 is pulled up to VCC, so the LED lights brightest at 0 and turns off at 100%.) |
Tab: NOTICE
This screen generates the LED control command of the Notification PAL (NOTICE PAL).
Make sure the connected TWELITE has App_Wings programmed, and after setting the application ID and channel, confirm that messages are being received from the communication partner.

Example display of the NOTICE tab
Item | Description |
---|---|
Destination | Specify the ID of the TWELITE PAL to send to.Valid range is 1 to 8. |
Color | Specify the lighting color from 7 colors.There are two types of white: one is RGB mixed color, and the other is a single white LED lit. |
Brightness | Specify from 0 to 15. 0 means off. |
Lighting/Blinking | Select lighting or blinking pattern. |
Lighting Time | Automatically turns off after a certain time has passed since the command was issued. |
Turn off (x) | Generate a turn-off message to turn off the LED. |
Turn on (SPACE) | Send the current settings to turn on the LED. |
Display at the bottom of the screen
At the bottom of the screen, the timestamp when the command was generated and the command starting with : are displayed. The clipboard copies the contents of this screen.
1.2.2.2.2 - Write App Firmware
Windows macOS Linux RasPi
The firmware writing function allows you to write the TWELITE app (firmware).
- Write pre-built
.BIN
files - Build from source files such as act and write
It eliminates the hassle of building source files, terminal disconnection, launching the writing utility, and terminal connection.
- Automatically recognize TWELITE
- After writing is complete, reset and then transition to interactive mode or terminal
- From the list of projects, launch the project folder or environments like VSCode (except Raspberry Pi version)
- From the list of projects, open related information web pages (except Linux and Raspberry Pi versions)
1.2.2.2.2.1 - Select from BIN
Windows macOS Linux RasPi
Overview
You can write pre-built applications ( .BIN
files ).

Example of the Select from BIN screen
When you select the menu, a list of .BIN
files will be displayed. Please select the firmware to write.
If you want to use a file other than the pre-prepared .BIN
files, please store the file to be written in the following location before selecting the menu.
Platform | Location |
---|---|
Windows, macOS, Linux, Raspberry Pi | {MWSTAGE folder}/BIN |
In the BIN
folder, please store .BIN
files built with TWELITE STAGE without renaming the files (they are stored under the build
folder of each project).
../BIN/App_Wings_MONOSTICK_BLUE_L1304_V1-1-3.bin
App_Wings_MONOSTICK_RED_L1304_V1-1-3.bin
App_Twelite_BLUE_L1304_V1-9-1.bin
App_Twelite_RED_L1304_V1-9-1.bin
...
1.2.2.2.2.2 - act Build & Write
Windows macOS Linux RasPi
Overview
You can build and rewrite acts (act) written with the MWX library.

Example of sample act selection screen
This screen displays a list of projects using acts placed in the following path.
{MWSTAGE installation folder}/MWSTAGE/Act_samples
Operation
You can build and write by selecting the project to write from the list.
After writing is finished, pressing ENTER
or the [ B ] button will reset the TWELITE and transition to the interactive mode screen (or terminal screen, depending on settings).
.BIN
file under build/
.Operation | Description |
---|---|
[ A ] | Menu selection up |
[ A ]Long press | Exit this screen and return to the selection screen. |
[ B ] | Select |
[ B ]Long press | Open related website in the OS default browser.(If registered in 000desc.txt in the project folder) |
[ C ] | Menu selection down |
[ C ]Long press | Open folder (project or related folder).You can set it to open with VS Code in the settings menu. |
ESC | Exit this screen and return to the app rewrite menu. |
Mouse click [Help] | Open related website. |
Mouse click [Folder] or [VSCode] | Open related folder. |
Mouse click [▽] or [△] | Move to next page or previous page. |
1.2.2.2.2.3 - TWELITE APPS Build & Write
Windows macOS Linux RasPi
Overview
You can build and write TWELITE APPS written with the TWENET C library.

Example of the app selection screen
This screen displays a list of projects located in the following path:
{MWSTAGE installation folder}/MWSTAGE/Wks_TweApps
Operation
By selecting the project to write from the list, you can perform build and write operations.
After writing is completed, pressing ENTER
or the [ B ] button will reset the TWELITE and transition to the interactive mode screen (or terminal screen, depending on settings).
.BIN
files under build/
will open instead. ScreenOperation | Description |
---|---|
[ A ] | Menu selection up |
[ A ]Long press | Exit this screen and return to the selection screen. |
[ B ] | Select |
[ B ]Long press | Open the related website in the OS default browser.(If registered in the project folder’s 000desc.txt ) |
[ C ] | Menu selection down |
[ C ]Long press | Open folders (project, related folders).You can set to open with VS Code in the settings menu. |
ESC | Exit this screen and return to the App Write menu. |
Mouse click [Help] | Open the related website. |
Mouse click [Folder] or [VSCode] | Open the related folder. |
Mouse click [▽] or [△] | Move to the next or previous page. |
1.2.2.2.2.4 - Act_extras
Windows macOS Linux RasPi
Overview
You can build and rewrite acts written with the MWX library.

Example of the act selection screen
This screen displays a list of projects using acts placed in the following path:
{MWSTAGE installation folder}/MWSTAGE/Act_extras
Operation
By selecting a project to write from the list, you can perform build and write operations.
After writing is complete, pressing ENTER
or the [ B ] button will reset the TWELITE and transition to the interactive mode screen (or terminal screen, depending on settings).
.BIN
files under build/
will open instead: screen.Operation | Description |
---|---|
[ A ] | Menu selection up |
[ A ]Long press | Exit this screen and return to the selection screen. |
[ B ] | Select |
[ B ]Long press | Open the related website in the OS default browser.(If registered in the project folder’s 000desc.txt ) |
[ C ] | Menu selection down |
[ C ]Long press | Open the folder (project or related folder).You can set it to open with VS Code in the settings menu. |
ESC | Exit this screen and return to the app rewrite menu. |
Mouse click [Help] | Open the related website. |
Mouse click [Folder] or [VSCode] | Open the related folder. |
Mouse click [▽] or [△] | Move to the next or previous page. |
1.2.2.2.2.5 - Folder (Specify)
Windows macOS Linux
By dragging and dropping a folder or .BIN
file onto the TWELITE STAGE APP screen, you can write a specific project. Select the dropped target when performing build or write operations.
.BIN
file, the firmware list in the folder containing that file will be displayed, just as if you had dropped the folder itself.1.2.2.2.2.6 - Last (Re-execute)
Windows macOS Linux RasPi
Re-select the most recently rewritten or specified project.
Depending on the item, one of the following will be performed:
- Rewrite the selected project
- Redisplay the list of recently selected projects
1.2.2.2.2.7 - Build & Write Screen
Windows macOS Linux RasPi
During Build
This is the screen during the build (compile) process. The contents of the build command are output to the console screen. The ...
in the middle of the screen indicates the number of files built, and the dark-colored display at the bottom shows the filenames currently being built.

Example of the screen during compilation
Build Error
If a build error occurs, a screen like the one above is displayed. You can execute a rebuild or display the error log. Also, after a certain timeout, it will return to the previous menu.

Example of error display screen
Only representative error messages are displayed on the screen. When the build fails, there may be cases where the error message is not displayed.
Operation | Description |
---|---|
[ A ] | No assignment |
[ A ]Long press | Exit this screen and return to the previous menu. |
[ B ] | Rebuild on error. |
[ B ]Long press | No assignment |
[ C ] | |
[ C ]Long press | Display the error log (Windows/macOS).The save location is {project folder}/build/builderr.log . |
ESC | Exit this screen and return to the write menu. |
ENTER | Rebuild on error. |
During Write
When the build succeeds, the screen to write the firmware is displayed.

Example of write-in-progress screen
Write Failure
If writing results in an error, a screen like the one below is displayed.

Example of write failure screen
Operation | Description |
---|---|
[ A ]Long press | Exit this screen and return to the selection screen. |
[ B ] | Rewrite again(Returns to the previous write menu.Since the menu item is automatically selected,pressing [ B ] again will rewrite.) |
ESC | Exit this screen and return to the write menu. |
Write Complete
When writing completes successfully, a screen like the one below is displayed.

Example of write completion screen
Operation | Description |
---|---|
[ A ]Long press | Exit this screen and return to the selection screen. |
[ B ] | Reset the TWELITE and move to the interactive mode screen (or terminal screen depending on settings). |
ESC | Exit this screen and return to the write menu. |
1.2.2.2.3 - Interactive Settings Mode
Windows macOS Linux RasPi
Overview
From this screen, you can use the interactive mode of the connected TWELITE.

Example of the Interactive Mode screen
This screen behaves almost the same as a terminal, but adds functions specific to interactive mode, such as operations to transition to interactive mode and detection of exit from it.
- The connected TWELITE must have firmware compatible with interactive mode pre-installed.
- Since TWELITE input/output is used, if garbled characters occur in serial communication, transitions to and exits from interactive mode may not work as expected.
- Mouse operations are not supported. Please use keyboard operations (cursor
↑
↓
keys are usable).
You can also transition to and operate interactive mode using the Terminal.
- In the terminal, the SET pin operation is not performed automatically. You need to manually set the SET pin to LO.
- In the terminal, operations such as entering
+ + +
,Alt(⌘)+I
for interactive mode, and module resetAlt(⌘)+R
are also defined.
Interactive Mode Screen Operation Flow
Below is an outline of the process flow.
[Set screen background to black]
↓
[Reset TWELITE (if controllable, SET=LO)]
↓
--YES--> [Operation screen]
↓timeout
[Input '+' three times]
↓
--YES--> [Operation screen]
↓timeout
[Operation screen] ※ This state is not interactive mode
[Operation screen]
↓
--> [Exit]
↓
--> [Exit]
↓
-> --NO-> [Exit]
↓ ↓
[Send input string to TWELITE]
↓
[Return to operation screen]
[Exit]
↓
[Reset TWELITE]
↓
[Exit screen] Exit the interactive mode screen and return to the previous screen
1.2.2.2.4 - Settings of TWELITE STAGE
Windows macOS Linux RasPi
Overview
From this screen, you can configure various settings of the TWELITE STAGE APP.

Example of the settings screen
The menu on this screen cannot be operated with a mouse.
Also, changing the screen colors may make it difficult to see.
Some menu items explained below may not exist on certain platforms, but all are listed and explained.
Color settings other than the common menu are omitted from the explanation.
Root Menu
Common
Terminal
Standard App Viewer
Graph Viewer (Acceleration Real-time/Sensors)
Simple Monitor (CUA/ARIA/Glancer)
Commander
Write firmware
Interactive Settings Mode
Save Data Utilities (Dump/Erase)
Information
Common Settings
a: ( 0x00) Startup App Specification
G: ( 0x00) Screen Size and Drawing Method
F: ( ) Serial Device ID
f: (0x00FFFFFF) Foreground (Text) Color
b: (0x005A0032) Background Color
B: ( 115200) Baud Rate
Setting | Description |
---|---|
Startup App Specification | This setting determines which viewer app to switch to when TWELITE STAGE starts.The setting value is 1..{the number listed in the viewer app menu} .Note: If the serial device ID is not set,the startup will wait for input on the serial device selection screen. |
Screen Size and Drawing Method | (Except for M5Stack version) Specified by two characters XY (X : screen size, Y : drawing method).X 0 :640x480 1 :1280x720 2 :1280x960 3 :1920x1440 4 :2560x1440 5 :320x240Y 0 :LCD style 1 :CRT style 2 :Blur 3 :Block |
Serial Device ID | (Except for M5Stack version) Set by serial device name or a number 1..9 .Note: The number indicates the device enumeration order. |
Text Color / Background Color | Specify text and background colors.The common settings color values are inherited by other screens’ settings.If not set on other screens, the common settings colors are used.Colors are specified as 24-bit RGB hexadecimal values but are internally rounded to 16-bit 565 format. |
Baud Rate | Set to avoid garbled display in terminals etc. when the TWELITE baud rate is not 115200 . |
Write Firmware
f: (0x00FFFFFF) Foreground (Text) Color
b: (0x005A0032) Background Color
j: ( 0) Number of make jobs at build time
v: ( 0) Open a folder with VSCode
l: ( 0) Disable LTO
n: ( 0) Screen after rewriting is completed
Setting | Description |
---|---|
Number of make jobs at build time | (Except for M5Stack version) Number of parallel jobs during build to shorten build time.Default 0 calculates jobs as (physical processor count - 1).A guideline is to set up to the number of logical processors. |
Open a folder with VSCode | (Requires VSCode installation) Setting 1 opens folders using the code command (VSCode) instead of the OS standard folder window.The executable TWELITE_Stage_VSCode defaults to 1 . |
Screen after rewriting is completed | (Except for M5Stack version) Setting 1 opens the terminal instead of the interactive mode screen.Setting 2 returns to the rewrite menu.TWELITE_Stage_VSCode sets this to 2 . |
Disable LTO | (Windows only) Setting 1 disables LTO in the Windows compiler.LTO produces smaller binaries but takes longer to link.Disabling LTO results in faster linking. |
Save Data Utilities
r: Read sector.
R: Read ALL sectors.
e: Erase sector.
E: Erase ALL sectors.
This screen is a utility for maintaining data save areas. It emulates EEPROM (64 bytes per sector, up to 60 sectors, 3840 bytes).
Setting | Description |
---|---|
r | Reads a sector.Input 0..59 to display the contents of the specified sector. |
R | Input YES to read all sectors, but only the tail part is displayed. |
e | Erases a sector (0xFF ).Input 0..59 to erase the specified sector. |
E | Input YES to erase all sectors. |
{executable name}.sav
(default TWELITE_Stage.sav
file).1.2.2.2.5 - Select SERIAL port
Windows macOS Linux RasPi
Overview
On this screen, you can (re)select the serial port.

Example of the serial port selection screen
Alt(⌘)+0
, Alt(⌘)+1,2,..
.1.2.3 - Logging Function
Windows macOS Linux RasPi
Operation
Start Recording
Press Alt(Cmd)+L
.

Example of the log start screen
Stop Recording
While recording, press Alt(Cmd)+L
again.

Example of the log stop screen
The log recording will stop, and the log file at that point will be opened using the OS default application (Notepad on Windows, Console.app on macOS).
Specifications
Log Recording
Strings received from TWELITE are recorded as-is.
Strings sent to TWELITE are recorded one character at a time.
On Windows, they are enclosed in 「 」
, and on macOS / Linux / Raspberry Pi, they are enclosed in « »
.
For example, «t»
means that the character t
was input from the keyboard.
Log Folder and File Name
Logs are saved in the {folder where the TWELITE STAGE APP executable is located}/log
folder, with a file name based on the start date and time of the logging.
Press Alt(Cmd)+Shift+L
to open that folder.

Example of the log output folder
1.3 - Detailed Specifications
1.3.1 - Detailed Settings with Command-line Arguments and ini Files
Command-line Arguments
Command-line arguments configure some detailed settings of the TWELITE STAGE APP.
Command-line Argument | Description |
---|---|
-E 0 | Disables graphical effects such as fade-out. |
-R {type} | Sets the rendering type with the {type} value.0: Default1: OpenGL2: DirectX (Windows) Metal (macOS)3: Software |
-J | Enables the game controller. |
-x {x_pos},-y {y_pos} | Sets the position of the TWELITE STAGE App graphical window at startup.{x_pos} and {y_pos} are the screen coordinates of the top-left corner of the window. |
ini Files
ini files are used to configure basic settings of the TWELITE STAGE APP (such as referencing the MWSDK folder).
The ini file name is {base name of the TWELITE STAGE APP executable} + .ini
. Usually, it is TWELITE_Stage.ini
.
;;; Change the MWSDK reference.
; MWSDK=MWSDK
mwsdk=mwsdk2020_10
;;; Interface language
; LANG=en
;;; Window geometry
GEOM_X=200
GEOM_Y=100
Syntax
- ini files are written as plain text files.
- Keys and values are stored on a single line separated by
=
(e.g.,KEY=value
). - The key and value strings start at the beginning of the line (no spaces or other characters allowed before the key).
- Spaces are not allowed between the key and the value.
- Comment lines start with
;
or#
at the beginning of the line.
Settings
Key | Value |
---|---|
MWSDK | Changes the MWSDK folder. The default folder is MWSDK located in the same folder as the TWELITE STAGE APP executable. If you need to use an older or custom MWSDK, you can specify the folder name here. |
LANG | LANG=en changes the user interface language from the default (Japanese) to English. This setting is carried over to the make parameter (TWE_LANG_PREF ) and is reflected in the interactive mode display language setting of some firmware (apps) such as TWELITE_Apps. |
GEOM_X, GEOM_Y | Changes the location where the TWELITE STAGE App window appears. |
Running TWELITE STAGE APP with Different Settings
If you need different settings for the TWELITE STAGE APP, copy the executable to the same folder as the TWELITE STAGE APP and create an .ini
file with the same name.
For example, to use the English interface, copy TWELITE_Stage.exe
(note: .exe is the Windows executable extension) to TWELITE_Stage_en.exe
and write the setting LANG=en
in TWELITE_Stage_en.ini
to create an executable with the English interface enabled.
TWELITE_Stage.exe
TWELITE_Stage.ini | No special settings
TWELITE_Stage_ja.exe | Copy of TWELITE_Stage.exe
TWELITE_Stage_en.ini | LANG=en is set.
1.3.2 - Environment Variables
Environment Variables Set Internally
Environment Variable | Description |
---|---|
MWSDK_ROOT | By default, the MWSDK folder located in the folder where the TWELITE STAGE APP executable is stored (that is, ../MWSTAGE/MWSDK ) is specified. If MWSDK.ini is specified, the specified folder name is adopted. |
MWSDK_TWENET_LIBSRC | For sample code and TWELITE APPS source code folders, definition files for Microsoft Visual Studio Code (VS Code) are pre-created. In these definition files, the library source code reference path is specified for code interpretation within the VS Code editor, and this environment variable is used for that purpose.If the MWSDK_TWENET_LIBSRC environment variable is properly set, code interpretation will work even in project folders outside of MWSDK , enabling features such as function name completion for the library. (Reference) |
LANG=C | Explicitly set to make the toolchain messages appear in the default language (English). |
PATH | On Windows, adds the PATH to the SDK-included msys utilities. |
MWSDK_MAKE_JOBS MWSDK_MAKE_DISABLE_LTO MWSDK_MAKE_LANG_PREF | Used in VS Code configuration definitions.JOBS : Passes the number of parallel builds set in STAGE APPDISABLE_LTO : Disables LTO (
Windows
)LANG_PREF : The display language (JP : Japanese, EN : English) of the TWELITE STAGE APP is set.This setting is also inherited by the parameter (TWE_LANG_PREF ) of make at build time. |
Reference
Excerpt from .vscode/settings.json
configuration example:
"C_Cpp.default.includePath": [
"${env:MWSDK_TWENET_LIBSRC}/include/**",
"${env:MWSDK_TWENET_LIBSRC}/src/**"
],
"C_Cpp.default.browse.path": [
"${env:MWSDK_TWENET_LIBSRC}/include/**",
"${env:MWSDK_TWENET_LIBSRC}/src/**"
],
Definitions starting with "../../"
are unnecessary when opening a project from the TWELITE STAGE app. These specify source reference paths in the default folder structure when the environment variable MWSDK_TWENET_LIBSRC
is not set.
1.3.3 - Adding Project Descriptions with 000desc.txt
When you create a 000desc.txt
file in the project folder, TWELITE STAGE APP displays its contents in the project folder list.

Example display of 000desc.txt
The file should be written as plain text in UTF-8 format. There are two formats as follows.
Format 1
LED lights up when the switch is pressed
act4 operates an act that lights up the LED when the switch connected to TWELITE DIP is pressed.
https://mono-wireless.com/jp/products/act/index.html
- The first line is the title line.
- The following lines describe details.
- If the last line starts with http, it becomes a link to a website.
Format 2
[JAPANESE]
TITLE=act template
DESC=This file contains only empty setup() and loop() functions.
Please use it to write a new act.
URL=jp/MWX/content/Act_samples/README.html
[ENGLISH]
TITLE=act empty template
DESC=This act file only contains empty setup() and loop(),
which is intended to write a new act.
URL=en/MWX/content/Act_samples/README.html
This format is like an ini file. The item name starting from the beginning of the line and the =
character define the item, and the content after =
is the item’s content.
Item Definition | Details |
---|---|
[JAPANESE] , [ENGLISH] | Block separators |
TITLE= | Title line |
DESC= | Description. Can include multiple lines with line breaks. |
URL= | Link to a website or file |
About URL specification
URL= | Details |
---|---|
Starting with https: , http: | Opens that address |
Others | Specify a relative folder based on {MWSDK_ROOT}/docs/ .If set as a/b/c.html , it is converted to {MWSDK_ROOT}/docs/a/b/c.html . |
1.4 - License
The executable format of TWELITE_Stage distributed by Mono Wireless Inc. is subject to MW-SLA-1J,1E.
The source code is subject to MW-OSSLA-1J,1E. Please refer to the linked page for an overview.
If you build from the source code, operation under MW-OSSLA-1J,1E, which has more relaxed restrictions for non-commercial purposes, is possible.
Some distribution packages (as of 2020/10/9, only the M5Stack 0.8.9a package) apply a dual license of MW-SLA-1J,1E and MW-OSSLA-1J,1E. Please check the license description within the package.
Please note that for commercial use, you will need to select MW-SLA-1J,1E.
Open Source Components Used
We appreciate the open source projects that provided high-quality source code.
Name | Description |
---|---|
SDL2 | Simple DirectMedia Layer Copyright (C) 1997-2020 Sam Lantinga |
getopt | Copyright (c) 1987, 1993, 1994 The Regents of the University of California. All rights reserved. |
regex | regex - Regular expression pattern matching and replacement By: Ozan S. Yigit (oz) Dept. of Computer Science York University |
printf | Copyright (c) 2014 Marco Paland |
Shinonome Font | 2001 The Electronic Font Open Laboratory http://openlab.ring.gr.jp/efont/ |
M+ BITMAP FONTS | Copyright 2002-2005 COZ coz@users.sourceforge.jp |
SQLiteC++ | Copyright (c) 2012-2021 Sebastien Rombauts (sebastien.rombauts@gmail.com) |
sqlite3 | All of the code and documentation in SQLite has been dedicated to the public domain by the authors. |
1.5 - Revision History
Please refer to https://github.com/monowireless/mwm5 for the source code change history.
- Depending on the platform, the latest version distributed and the latest version in the revision history may not match.
- The latest version of the source code may not be registered at the above sites.
2.4.4 MWSTAGE2025_07 Release
Major Version Upgrade
- Added support for TWELITE STICK
- Enhanced serial port functionality
- Added baud rate switching via
ALT+B
- Connection status now displayed in the title bar
- Added baud rate switching via
- Makefile error message handling
- Extracts the message part
...
from errors output in the format$(error <MWERRM>...</MWERRM>)
- These error messages are intended to be used when attempting to build projects for unsupported architectures (e.g., GOLD only, or BLUE/RED only)
- Extracts the message part
- Support for language setting in interactive mode
- Interactive mode language can now be specified at build time via
TWE_LANG_PREF=(JP|EN)
- When launching external tools (e.g., VSCode), the
MWSDK_MAKE_LANG_PREF
environment variable is now set
- Interactive mode language can now be specified at build time via
2.4.3
- For projects with multiple configuration types located in subfolders (and not directly under the root
build
), folder listing is now limited to only those that contain abuild/
directory, preventing unnecessary folders from being shown - Fixed a crash that occurred when error messages were too long during build errors
- Changed the order of serial protocol checks for determining BLUE/RED/GOLD: now tries GOLD first (for GOLD-targeted SDK)
2.4.2
- Added support for interactive mode transition control using the SET pin (CTS pin on MONOSTICK)
- Behavior in TWELITE_Apps is as follows:
- If SET pin is held for less than ~100ms → normal boot (prevents accidental interactive mode entry due to noise)
- If held longer than the above → enter interactive mode on boot
- If held for ~3 seconds or more → erase entire EEPROM on startup
- Each app is informed of the interactive mode transition via a startup parameter
- Apps receiving this parameter will, in principle:
- Skip app-specific initialization
- Skip interrupt handler setup, etc.
- Automatically start interactive mode on UART0 at 115200 8N1
- Suppress exit from interactive mode via
+++
- Apps receiving this parameter will, in principle:
- Under this spec, the STAGE app behaves as follows:
- For regular transition to interactive mode, hold the SET pin for about 300ms
- When holding [ C ] on the interactive mode guidance screen, SET pin is held for about 5 seconds
- If
Entering Interactive ...
message is not received within timeout, fallback to trying+++
as per previous behavior
- For regular transition to interactive mode, hold the SET pin for about 300ms
- Behavior in TWELITE_Apps is as follows:
- Additional code cleanup
2.4.1
- Initial support for TWELITE GOLD
- If a control command response from GOLD is received at startup, it’s recognized as GOLD; if it fails, control commands for the BLUE/RED series are attempted instead
1.3.8 MWSTAGE2022_08 Included Version
Major version upgrade.
- Changed internal rendering resolution from 320x240 to 640x480 pixels
- Added real-time graph for accelerometer sensor
- Added sensor graph that saves sensor data and displays graphs
- Supported English display
- Changed main manuals to local HTML files
1.0.8 MWSTAGE2021_09 Included Version
- There was a case where buttons [ A ] [ B ] [ C ] remained pressed even after the pointer moved away
- STAGE APP sends CRLF to TWELITE when Enter is input
- Updated Mac FTDI library to allow operation without serial intermediary program on Apple Silicon (M1)
- Internally set PATH for msys toolset on Windows to prevent unexpected make calls
- Allowed moving to the writing screen even if TWELITE is not connected (input B,R keys and specify the target TWELITE model)
- When configured to use VSCode, selecting act or TweApps opens the writing screen for .bin files under build/ without building (build is done from VSCode)
- Internally set several environment variables so that VSCode launched from TWELITE STAGE can refer to them, enabling proper builds and library resource referencing in VSCode
- Sample code is stored under MWSDK folder, but dropping a folder for build target allows build and write operations for folders other than MWSDK (folder names must not contain spaces or Japanese characters)
- Displayed internal folder settings and environment variable settings on the console screen at startup
- Waited 1 second before exiting STAGE APP on termination
1.0.7pre2
- Enhanced support for Raspberry Pi (1.0.7pre2)
- Support for serial0 (TWELITE STAGE HAT)
- Added build for Zero (build with supported libraries & disabled rendering fade feature)
- Added build for X11 desktop
- Made it usable with general FTDI devices (FT232, FT230). Firmware writing mode must be done manually
- Added feature to display COM ports assigned in Windows by pressing c key on serial port selection screen
- Allowed changing baud rate from 115200bps
- Added command line option (-E 0) to disable rendering fade feature.
1.0.3 MWSTAGE2020_12 Included Version
- Supported TWELITE CUE (parser and CUE viewer)
- Enabled verification (comparison) during writing in the rewrite menu
- Provisional support for Apple Silicon (TWELITE_Stage.command is a universal app; external command sersrv_ftdi.command and Tools are rebuilt Intel binaries runnable with Rosetta2; serial communication is slower due to external command)
- Moved MWSTAGE/MWSDK/Tools to MWSTAGE/Tools (to allow direct use of MWSDK_COMMON repository)
- TWELITE_Stage.ini (removes extension from startup filename and adds .ini) is loaded at startup to allow selecting MWSDK folder (makes it easy to switch old library sets)
- Updated SDL2 library for screen rendering to 2.0.12 (Windows, MacOS, RaspberryPi)
- Static build on Windows with no DLL files required
- Set parallel build count for make -j to (number of physical CPUs - 1)
- Explicitly reopened serial port in several places in rewrite menu to improve recovery when USB connection is disconnected due to device removal
- When opening mwx or twesettings with Alt(Cmd)+Shift+m, t, opens folders listed in TWENET/usever.mk
- Fixed issue where writing menu transition failed on first startup at /dev/serial0 on Raspberry Pi
Known Issues
- Help message when pressing Alt(Cmd) at startup may not appear; can be shown by inputting Alt(Cmd)+0
- Line wrapping may be broken when filenames are too long in rewrite menu
- Apple Silicon operation has not been sufficiently tested
0.9.11 MWSTAGE2020_10, Raspberry Pi Version (Provisional)
(* This version is not comprehensively tested *)
- Operation on Raspberry Pi
- Other feature adjustments
0.9.9 - MWSTAGE2020_10 Included Version
- Added [Web] button to the top-level menu to open related links in browser
- Implemented folder, web, and VS Code open features for Linux version
- Sometimes difficult to transition to writing menu when TWELITE frequently outputs UART
0.9.8a
https://github.com/monowireless/TWELITE_STAGE_Bin_M5Stack/releases/tag/0.9.8a
M5Stack version made dual-licensed for MW-SLA-1J,E / MW-OSSLA-1J,E and updated readme-j.txt.
0.9.8
Added [Web] button to viewer list to open related sites.
Revision Details
- Added Commander to viewer
- Standard app 0x80 command
- NOTICE PAL LED control (send commands to App_Wings)
- NOTICE PAL support for viewer > PAL viewer
- Added menu for Act_extras
- More advanced than Act_samples
- Uses external open source libraries (e.g. sensor procedures)
- Expanded mouse operation (lists, buttons, tabs)
- Focus on mouse move, confirm with left click, right click inputs [ESC] key
- Reduced screen rendering load
- Disabled screensaver when app is in background
- Reduced rendering frequency when app is in background to lower CPU load
- Enhanced build project list (act, TWE_Apps, Act_extras)
- Show summary at bottom when selecting items (reads 000desc.txt, processed by TWE_Desc class)
- Ability to open project folder (or open in VSCode)
- Ability to open related websites
- Open mwx library with Alt+Shift+m and twesettings library with Alt+Shift+t
- Open selected folder or build error files in build menu
- Added logging (serial port input/output)
- Start/stop log with (Alt/Cmd+L)
- Log files saved in {folder containing TWELITE_Stage executable}/log
- Filename format: twestage_{date-time}.log
- Open log file folder with Shift+Alt/Cmd+L
- Other changes and fixes
- Changed display method for serial (FTDI) device names and IDs
- Fixed issue where App_UART did not transition to interactive mode
- Changed behavior on folder drop (previously sometimes triggered binary write, now transitions menu)
- On terminal long press [C], clears screen in addition to reset
Known Issues
- M5Stack may hang and reset settings to default when saving settings
0.8.9
2020_05 Release Version
- Added window icon
- Relaxed maximum list constraints on BIN file list screen (win/linux/mac)
- Added Glancer viewer
- Adjusted explanatory text
- Adjusted console screen rendering
- Fixed issue where setting destination screen after firmware write (interactive mode or terminal) did not work
- Changed assignment of Alt(or Cmd)+W
- Other bug fixes
0.8.6
Initial release of Linux version
0.8.5
Initial release