Skip to content

Run existing examples

With a complete toolkit containing prebuilt examples, open the EXE on Windows or install the DMG and open the app on macOS. Import the workspace before selecting an example. Trying examples does not require coding or installing Python, GCC or Node.js.

Prepare only what you need to try the examples#

This page uses examples already supplied with the toolkit; it does not create hello-web or my_glass. Keep the example assets, prebuilt GMPs and matching packaging sidecars. If files are missing, use this page's troubleshooting section first.

What you want to doWhat to prepare
Try it on the computer firstThe fully extracted toolkit and desktop Studio for your OS. Windows also requires Edge WebView2 Runtime; macOS installs from the DMG. You can preview simulated behavior without connecting a phone or glasses.
Then try it on real glassesMatching MemoMind App and glasses firmware, glasses connected within the App, and a LAN on which the computer and phone can reach each other.

Step 1: install and open Studio for your operating system#

Follow the Studio guide to install and launch it for your OS, then return here to try the examples.

Step 2: import the workspace, then choose an example#

Import the complete toolkit root and wait until example names such as GM Breakout appear in the dropdowns. Then continue. The Studio guide explains folder selection and what to do after reopening.

Step 3: select GM Breakout and try the glasses simulator#

  1. Set the Phone plugin dropdown to No phone plugin (glasses debugging only).
  2. Select GM Breakout in the Glasses plugin dropdown. It loads and runs automatically. The virtual glasses screen should show bricks, a ball and a paddle at the bottom.
  3. Drag left or right in the Head movement area and watch the paddle move. You can also use the simulated accessory's left and right buttons. Click the main button to pause; click again to resume.
  4. Hold the main button until the exit countdown finishes. To play again, refresh the glasses-plugin list to reload it. After winning or losing, click the main button to restart.

Step 4: switch to other included examples#

You do not need another Studio window or source changes for each example. Switch the dropdown selection, confirm the name and observe the new simulation. The names below come from example manifests; available examples depend on the actual release.

2048 uses directional accessory-button events; head-movement controls are not a substitute. If keyboard arrow keys do nothing, click a glasses-side Up / Down / Left / Right button to move focus away from a dropdown or phone input, then try the arrow keys. After game over, click the main button to restart; long-press it to exit.

What to tryPhone plugin selectionGlasses plugin selectionExpected result
Breakout gameNo phone plugin (glasses debugging only)GM BreakoutBricks, a ball and a movable paddle. Use the controls from the previous step.
Another gameNo phone plugin (glasses debugging only)GM 2048Click Up / Down / Left / Right in Accessory button events to move tiles, or use keyboard arrow keys. Physical-device operation requires a directional-button accessory. If you do not have one, try Breakout first.
Basic UI controlsNo phone plugin (glasses debugging only)GM LVGL UIAn example interface drawn by the glasses C plugin.
Pixel-by-pixel drawingNo phone plugin (glasses debugging only)GM FramebufferAn example pattern drawn through the framebuffer.
Control the glasses display from the phoneDisplay Control LabDisplay Control LabThe phone control page works with the glasses state; see the next step.

Step 5: try the existing phone Web page#

  1. Select Display Control Lab in the phone dropdown and confirm Display Control Lab on the glasses side too. Studio provides pairing guidance. Do not select the generic GM Web Bridge for this pair.
  2. Wait for the display-control page in the phone preview and the glasses-plugin running state. If it keeps waiting for a connection, check both selections and the page/glasses logs.
  3. Drag and release the Brightness slider, then observe the returned level and state. The interface supports Chinese and English.
  4. When finished, click Restore Initial Settings. If you turned the display off, use Turn On to restore it.

Step 6: scan the QR code to run the same example on real glasses#

  1. For a first device test, use No phone plugin + GM Breakout. To try the phone page, keep Display Control Lab + Display Control Lab. Check the current names in both dropdowns.
  2. Follow QR installation and device testing to connect, download, authorize and start, then return here to check the example's behavior.
  3. Try the same actions on real glasses: in Breakout, turn your head left/right to move the paddle and click to pause/resume. In Display Control Lab, adjust brightness on the phone and restore the initial settings afterward.

Scan another example or restart it later#

  1. To try another example, select its combination in Studio, verify the simulation and wait for the new ZIP and QR code.
  2. Stop the currently running entry in the App, then scan the current Studio QR code. Confirm that the download name matches the example you just selected. Do not scan an older saved screenshot.
  3. Downloaded examples are saved as local entries in the App. Next time, connect the glasses and tap Start on the saved entry. The computer does not need to remain on when using a saved entry.

Troubleshoot the stage where execution stopped#

SymptomNext
Cannot find Studio for your operating systemOn Windows, look for the EXE in Studio/windows/; on macOS, look for the DMG in Studio/macos/. Do not download only an example directory. If the platform directory lacks an executable, obtain the corresponding release.
Windows reports that WebView2 is missingInstall Edge WebView2 Runtime as described in the Studio installation guide, then reopen Studio.
Studio is installed on your Mac, but the example list is empty or discovery failsClick Import workspace and select the complete downloaded toolkit root. The current version requires importing it each time the application restarts.
Workspace import reports a missing SDK or a non-plugin-open-platform directorySelect the directory containing GlassSDK and PhoneSDK together. Do not select the application, DMG, Studio/macos/, a single SDK or an examples subdirectory.
GM Breakout is missing from the glasses listImport the complete toolkit root and refresh. If the list is still empty, check that the release contains prebuilt GMPs. A source-only checkout requires a build or a complete example release.
The virtual screen is stationary or the plugin has exitedBreakout may be paused or exited. Click to resume, or refresh the glasses list to reload it.
2048 displays correctly but arrow keys do nothingClick a glasses-side Up / Down / Left / Right button before using keyboard arrow keys. Do not keep focus in a dropdown or phone-page input. Head movement does not move 2048 tiles; physical-device use requires a directional-button accessory.
The simulator runs, but the QR area reports Missing build review snapshotThe current GMP lacks matching source-review sidecars. Obtain a complete package containing them, or follow the build guide to regenerate them. Do not fabricate JSON or mix sidecars from another version.
The phone Web page keeps waiting or the pair is incompatibleCheck both phone and glasses selections against the example table. Inspect page logs and matching versions.
Cannot find Scan to open app in the AppUse the App version supplied for the toolkit and confirm that you are signed in with the account that owns the application.
QR connection times out or download failsCheck LAN connectivity, the computer IP, VPN/guest-network isolation and firewall rules. Keep Studio online.
Download finished, but the glasses did not run the appCheck App Bluetooth connectivity, authorization and installation/startup messages. Stop the old entry and retry.

After trying an example, write your first program#

Once an example works, install the development environment and choose a C or Web tutorial below. Let an AI assistant use the toolkit documentation to help with coding. Add one small, verifiable feature at a time.

Reference files in the toolkit#

  • Studio/README.md
  • GlassSDK/examples/game/breakout/manifest.json
  • GlassSDK/examples/game/breakout/breakout.c
  • PhoneSDK/examples/display-control-lab/manifest.json
  • PhoneSDK/examples/display-control-lab/plugin.js
  • GlassSDK/examples/display_control_lab/manifest.json