This is an application that is designed for the MentraOS platform to run on the Even Realities G1. This app has not been tested on any other device that works with the MentraOS app, but it may work on other devices with minimal changes. The goal of this app is to pipe data from servo temps and battery percentage from a humanoid robot such as the Unitree G1 EDU into the smartglasses heads up display.
MentraOS install links: mentra.glass/install
-
brew install ngrok -
Make an ngrok account
-
Navigate to console.mentra.glass
-
Click "Sign In", and log into your Mentra account
-
Click "Create App"
-
Set a unique package name like
com.yourName.yourAppName -
For "Public URL", enter your Ngrok's static URL
-
Make a fork of this repo
-
Clone your fork of this repo locally:
git clone <your-repo-url> -
cd into your repo, then type
bun install -
Set up your environment variables:
- Create a
.envfile in the root directory by copying the example:cp .env.example .env - Edit the
.envfile with your app details:PORT=3000 PACKAGE_NAME=com.yourName.yourAppName MENTRAOS_API_KEY=your_api_key_from_console - Make sure the
PACKAGE_NAMEmatches what you registered in the MentraOS Console - Get your
API_KEYfrom the MentraOS Developer Console
- Create a
-
Run your app with
bun run dev -
To expose your app to the internet (and thus MentraOS) with ngrok, run:
ngrok http --url=<YOUR_NGROK_URL_HERE> 30003000is the port. It must match what is in the app config. For example, if you enteredport: 8080, use8080for ngrok instead.
To extend the app further, read the Mentra SDK documentation at docs.mentra.glass
You can listen for events within the onSession function. You can use that to replace the on-screen variables with whatever you'd like.
All data displayed in the app currently is synthetic placeholder data meant to simulate live temperature changes on a humanoid robot.