This is the multi-page printable view of this section. Click here to print...

Return to the regular view of this page

As of 2025-07-24

How to Use

How to use TWELITE STAGE APP
This section explains the screens and operation methods of the TWELITE STAGE APP.

How to Launch the App

To launch the TWELITE STAGE app, execute the executable file located in {MWSTAGE Installation}.

The method of execution varies depending on the platform (Windows, macOS, Linux).

SystemExtensionNotes
Windows.exeDouble-click the executable file in Explorer
macOS.commandDouble-click the executable file in Finder
Linux RasPi.runDepends 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.
  • 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.
Example Screen of TWELITE STAGE APP

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).

1 - Key and Mouse Operations

Key and mouse operations for TWELITE STAGE APP

Windows   macOS   Linux   RasPi

This section explains the key and mouse operations used in TWELITE STAGE APP.

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

KeyMeaning
ESC ESCQuickly press ESC twice. Cancel or return to the previous screen.
On some screens, pressing once returns to the previous screen.
ENTEREnter, Select
BSDelete 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

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)+ KeyMeaning
IInputs + + +. This is the key sequence to enter interactive mode.
※ Apps that perform intermittent operation due to sleep are not supported.
RResets the module. Controls the reset pin using the functions of TWELITE R or MONOSTICK.
A, S, DPress buttons A, B, C.
Shift+A, S, DLong press buttons A, B, C.
CCopies the text displayed on the screen to the clipboard. (The range varies depending on the screen)
VPastes from the clipboard as keyboard input.
FSwitches to full-screen display. If Shift+F is pressed, it enlarges further if possible.
GChanges 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.
JSelects 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.
QQuits TWELITE STAGE APP.
0Disconnects the serial port and shows the list of serial ports again.
1, 2, …Selects the serial port.
BChange baud rate if serial port is open (9600, 19200, 38400, 57600, 115200, 234000).
L, Shift+LStarts 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

KeyMeaning
Alt (Cmd)+Shift+Ctrl+mOpens the MWX library code folder.
Alt (Cmd)+Shift+lOpens 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 OperationMeaning
Left clickSelect
Left click and dragUsed on some screens (e.g., dragging on graph screens)
Left double-clickNot used
Right clickUsed on some screens
Right double-clickExit the screen (same as ESC ESC)
Scroll wheelUsed 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

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

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.

2 - Screen Operations

Operation instructions for each screen of TWELITE STAGE APP

Windows   macOS   Linux   RasPi

Example of the menu screen

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.

2.1 - Serial Port Selection

Operation instructions for the serial port selection screen

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

Example of the serial port selection screen

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.

2.2 - Main Menu

Operation instructions for the main menu screen

Windows   macOS   Linux   RasPi

This is the top level of the hierarchical menu.

Example of the main menu screen

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

2.2.1 - Viewer

About the viewer

Windows   macOS   Linux   RasPi

The viewer is a feature for displaying information received from a connected TWELITE and sending commands.

2.2.1.1 - Terminal

Operation instructions for the Terminal screen

Windows   macOS   Linux   RasPi

Example of the Terminal screen

Example of the Terminal screen

Overview

A general VT100-compatible serial terminal.

Supports TWELITE interactive mode and reset control.

Operations

OperationDescription
[ 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 ESCPress 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.

2.2.1.2 - Standard App Viewer

Operation instructions for the Standard App Viewer screen

Windows   macOS   Linux   RasPi

Example of the Standard App Viewer screen

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

OperationDescription
[ 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 ESCPress the ESC key twice to exit this screen.

2.2.1.3 - Graph

List of graph screens
  • 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.

2.2.1.3.1 - Accelerometer Real-Time Graph

Operation instructions for the Accelerometer Real-Time Graph screen

Windows   macOS   Linux   RasPi

Example Display of Demo Data

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.

Operation

OperationDescription
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 right
PAUSE( ) 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).
LabelItem NameDescription
#Sample
Number
T_PKT[ms]Packet
Reception Time
Multiple samples may be included in one packet, so samples with the same timestamp are listed.
SEQPacket
Sequence Number
Assigned to each packet; continuity indicates no packet loss.
T_SMPL[ms]Sample
Time (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 ValueUnit is G. Based on sensor values.
Y[G]Y-axis Sample ValueUnit is G. Based on sensor values.
Z[G]Z-axis Sample ValueUnit is G. Based on sensor values.
FD#Frequency Analysis Calculation IndexFor 64 samples, ordered as DC,1,2,...,31.
HzFrequency Analysis Frequency Axis ValueEstimated frequency, calculated as (FD# / FD_Len) * FD_Freq.
XFrequency Analysis Value on X-axis
YFrequency Analysis Value on Y-axis
ZFrequency Analysis Value on Z-axis
LabelAdditional Info NameSee table below
InfoAdditional InfoSee table below

Additional Information

Info NameDescription
ModuleSIDSerial number of the sender
Tick[ms]System time when the log file was opened
(Note: TWELITE STAGE app side)
DateDate when the log file was opened
TimeTime when the log file was opened
Time_Msec_partSub-second part of time when the log file was opened [ms]
SamplesValid sample data
FD_LenFrequency analysis sample count
FD_Start#Frequency analysis start sample number
FD_FreqEstimated 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.

LabelItem NameDescription
#Sample
Number
T_PKT[ms]Packet
Reception Time
Multiple samples may be included in one packet, so samples with the same timestamp are listed.
SEQPacket
Sequence Number
Assigned to each packet; continuity indicates no packet loss.
T_SMPL[ms]Sample
Time (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 ValueUnit is G. Based on sensor values.
Y[G]Y-axis Sample ValueUnit is G. Based on sensor values.
Z[G]Z-axis Sample ValueUnit is G. Based on sensor values.
LabelAdditional Info NameSee table below
InfoAdditional InfoSee table below

Additional Information

Info NameDescription
ModuleSIDSerial number of the sender
Tick[ms]System time when the log file was opened
(Note: TWELITE STAGE app side)
DateDate when the log file was opened
TimeTime when the log file was opened
Time_Msec_partSub-second part of time when the log file was opened [ms]

2.2.1.3.2 - Sensor Graph

Operation instructions for the Sensor Graph screen

Windows   macOS   Linux   RasPi

Example of data display

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.

  • 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.
  • 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.
    • 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

OperationDescription
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

Editing sensor node notes (IME enabled)

KeyDescription
Normal half-width charactersIf you directly enter normal half-width alphanumeric characters, they are displayed on the screen.
Input via IMEInput from IME is displayed as intermediate characters at the top left of the screen.
Press ENTER to confirm the input string.
BSDeletes the last character displayed.
ENTERReflects the entered string in the database.

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 NameTypeDescription
_uqidINTEGERSequential number used in the database
sidINTEGER
int32_t
Serial number stored as int32_t type.
For example, a serial number “8123abcd” is stored as the integer value -2,128,368,691.
tsINTEGER
int64_t
Timestamp when the system received the packet, stored as int64_t.
UNIX epoch (seconds since 1970).
ts_msecINTEGERMilliseconds part of the timestamp.
yearINTEGERYear part of the local time from the timestamp.
monthINTEGERMonth part of the local time from the timestamp.
dayINTEGERDay part of the local time from the timestamp.
hourINTEGERHour part of the local time from the timestamp.
lidINTEGERIdentifier such as LID assigned by the user.
lqiINTEGERLink Quality Indicator, an estimate of reception strength.
pkt_seqINTEGERPacket sequence number. The range of values depends on the firmware.
pkt_typeINTEGERType 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
valueREALMeasured 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)
value1REALMeasured 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
value2REALMeasured 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
value3REALMeasured value (definition varies by packet type).
pkt_type->
2: Unused
6: Unused
1: Unused
3,5: Unused
0x101: ADC3 [V]
103: Unused
val_vcc_mvINTEGERPower supply voltage [mV]
val_dioINTEGER
int32_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 pole
b28: If 1, magnet data is stored in b24..b25
b31: Periodic transmission bit (magnet only)
val_adc1_mvINTEGERADC1 measurement value for pkt_type->
1,2,3,0x101
val_adc2_mvINTEGERADC4 measurement value for pkt_type->
0x101
val_auxINTEGERFor storing other data
ev_srcINTEGEREvent source
ev_idINTEGEREvent ID
pal_type->
5: Dice (1...6)
16→MOVE etc.Refer to documentation
ev_paramINTEGEREvent parameter

sensor_node

Stores text notes (supplementary information) for sensor nodes.

Column NameTypeDescription
sidINTEGERSID as described above
sid_textTEXTString representation of SID converted to hexadecimal for readability
descTEXT
UTF-8
Note (supplementary information) corresponding to the SID, displayed in lists, etc.

sensor_last

Manages the timestamp of the last received data.

Column NameTypeDescription
sidINTEGERSID as described above
tsINTEGERTimestamp of the last reception
lidExcerpt of data from the last reception below
lqi
pkt_type
value
value1
value2
value3
val_vcc_mv
val_dio
ev_id

2.2.1.4 - Simple Monitor

Simple Monitor list
  • 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

2.2.1.4.1 - CUE Viewer

Operation instructions for the CUE Viewer screen

Windows   macOS   Linux   RasPi

Example of Dice Face Detection

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.

AttributeDescription
#????The count of received packets so far.
TypePacket type as the value of E_PKT in the mwm5 library.
Packets from TWELITE CUE are usually PKT_PAL=02.
IDLogical ID of the sender, usually a value from 0..100.
ADSerial number of the sender.
LQApproximate reception strength (Link Quality Indicator).
SQSequence 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.

EventNumberDescription
Dice1(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.
Move16(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).
Shake0x08Occurs 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 Move Event Detection

Example of Shake Event Detection

Example of Shake Event Detection

2.2.1.4.2 - ARIA Viewer

Operation instructions for the ARIA Viewer screen

Windows   macOS   Linux   RasPi

Example display of temperature and humidity data table

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.

AttributeDescription
#????Number of packets received so far.
TypePacket type based on the E_PKT value in the mwm5 library.
Packets from TWELITE ARIA are usually PKT_PAL=02.
IDLogical ID of the sender. Usually a value between 0..100.
ADSerial number of the sender.
LQApproximate received signal strength (Link Quality Indicator).
SQPacket 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.

2.2.1.4.3 - Glancer

Operation instructions for the Glancer screen

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

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.

OperationDescription
[ 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.
ESCExit this screen.

Selection Display

Example of 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.

OperationDescription
[ 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.
ESCReturn to the list display screen.

2.2.1.5 - Commander

Operation instructions for the Commander screen

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.

OperationDescription
[ 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.
ESCExit 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

Example display of the TWELITE tab

ItemDescription
DestinationSpecify 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..DI4Settings state from DI1 to DI4.
■ means selected (LOW = GND level), □ means (HIGH = VCC level).
Please specify SEL in the next item.
SELSelection bits for each DI.
(If 0, the DI specification is ignored; if 1, the specification is enabled.)
PWM1..4Set 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

Example display of the NOTICE tab

ItemDescription
DestinationSpecify the ID of the TWELITE PAL to send to.
Valid range is 1 to 8.
ColorSpecify 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.
BrightnessSpecify from 0 to 15. 0 means off.
Lighting/BlinkingSelect lighting or blinking pattern.
Lighting TimeAutomatically 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.

2.2.2 - Write App Firmware

About the firmware writing function

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)

2.2.2.1 - Select from BIN

Operation instructions for the Select from BIN screen

Windows   macOS   Linux   RasPi

Overview

You can write pre-built applications ( .BIN files ).

Example of the Select from BIN screen

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.

PlatformLocation
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
       ...

2.2.2.2 - act Build & Write

Operation instructions for the act build & write screen

Windows   macOS   Linux   RasPi

Overview

You can build and rewrite acts (act) written with the MWX library.

Example of sample act selection screen

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).

Build and Write Screen

OperationDescription
[ 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.
ESCExit 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.

2.2.2.3 - TWELITE APPS Build & Write

Instructions for operating the TWELITE APPS Build & Write screen

Windows   macOS   Linux   RasPi

Overview

You can build and write TWELITE APPS written with the TWENET C library.

Example of the app selection screen

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).

Build and Write Screen

OperationDescription
[ 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.
ESCExit 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.

2.2.2.4 - Act_extras

Operation instructions for the Act_extras screen

Windows   macOS   Linux   RasPi

Overview

You can build and rewrite acts written with the MWX library.

Example of the act selection screen

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).

Build and write screen

OperationDescription
[ 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.
ESCExit 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.

2.2.2.5 - Folder (Specify)

Write a specified firmware

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.

2.2.2.6 - Last (Re-execute)

Re-execute writing the most recently written firmware

Windows   macOS   Linux   RasPi  

Re-select the most recently rewritten or specified project.

2.2.2.7 - Build & Write Screen

Operation instructions for the build & write screen

Windows   macOS   Linux   RasPi  

This section provides operation instructions for the screen displayed when building or writing a project.

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

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

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.

OperationDescription
[ 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.
ESCExit this screen and return to the write menu.
ENTERRebuild on error.

During Write

When the build succeeds, the screen to write the firmware is displayed.

Example of write-in-progress screen

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

Example of write failure screen

OperationDescription
[ 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.)
ESCExit 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

Example of write completion screen

OperationDescription
[ 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).
ESCExit this screen and return to the write menu.

2.2.3 - Interactive Settings Mode

Using 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

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).

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

2.2.4 - Settings of TWELITE STAGE

Settings for TWELITE STAGE APP

Windows   macOS   Linux   RasPi

Overview

From this screen, you can configure various settings of the TWELITE STAGE APP.

Example of the settings screen

Example of the settings screen

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
SettingDescription
Startup App SpecificationThis 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:320x240
Y 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 ColorSpecify 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 RateSet 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
SettingDescription
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).

SettingDescription
rReads a sector.
Input 0..59 to display the contents of the specified sector.
RInput YES to read all sectors, but only the tail part is displayed.
eErases a sector (0xFF).
Input 0..59 to erase the specified sector.
EInput YES to erase all sectors.

2.2.5 - Select SERIAL port

Select SERIAL port menu

Windows   macOS   Linux   RasPi

Overview

On this screen, you can (re)select the serial port.

Example of the serial port selection screen

Example of the serial port selection screen

3 - Logging Function

Logging function between TWELITE and PC

Windows   macOS   Linux   RasPi

You can record serial communication logs between TWELITE and PC.

Operation

Start Recording

Press Alt(Cmd)+L.

Example of the log start screen

Example of the log start screen

Stop Recording

While recording, press Alt(Cmd)+L again.

Example of the log stop screen

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

Example of the log output folder