Skip to content

This Unity sample uses IMU-driven hysteresis-based projector control, auto-toggling both displays and showing a simple clock HUD.

License

Notifications You must be signed in to change notification settings

digilens-ar/UnityStatusDisplay

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DigiLens Inc. Unity Status Display

This Unity sample demonstrates sensor (IMU)-driven projector control on DigiLens ARGO. By tilting your head downward (~30°), the app automatically turns both eye displays (left and right projectors) on and shows a simple clock HUD; tilting back up turns them off. It uses the DigiOS SDK to switch projector modes safely and reliably.

The repository contains the Unity Status Display. This guide will help you download, set up, and build the APK.


Prerequisites


Downloading the Project

  1. Open Unity Hub.
  2. Go to the Installs tab.
  3. If not installed, download Unity Editor 2022.3.64f1 from the Unity Download Archive.
  4. In the Instructions App GitHub repository:
  • Click the green Code button:
  • Use Open with GitHub Desktop, or
    • Select Download ZIP and extract manually.
  1. Back in Unity Hub, head to the Projets tab and click AddAdd project from disk, and select the cloned/extracted repository folder.

The project has now been added to the Unity Hub and is ready to be opened.


Building & Installing the APK

  1. Go to File → Build Settings.
  2. Ensure Android is selected.
  3. Click Build to generate the APK.
  4. Install the application on your device and run it. You can install the apk using adb (Android Debug Bridge), also known as Android Tools, using this command:
adb install test.apk

Alternatively, you can connect your device using Vysor, and drag & drop the installation file into the Vysor window while mirroring.

  1. After installing the application, run it. Looking forward, both displays should be off. Looking about 30 degrees downwards will turn both displays on and show you a clock.

How it works (runtime behavior)

  1. On launch: projectors are set OFF (safety).

  2. When you tilt down ~30° (configurable), the app:

  • Turns both projectors ON

  • Fades in a clock HUD

  1. Looking up reduces the “down” angle; below a lower threshold (hysteresis) the app:
  • Turns both projectors OFF

  • Fades out the HUD

  1. On pause/quit: projectors are restored ON (safety).

Tuning (IMUHeadTiltDisplayController.cs)

Angles

Show When Pitch Down (default 30)

Hide When Down Below (default 24) - smoothing to prevent flicker

Smoothing / Debounce / Fade

Smooth Time (default 0.12s)

Debounce Seconds (default 0.15s)

Fade Seconds (default 0.18s)

Options

Invert Pitch (if down/up is reversed)

Force On In Editor (keeps optics on in Play Mode)

Debug Log/Interval


Related Projects

This is one of three Status Display versions. To find the other two versions, follow these links:

Android Status Display: This Android sample uses IMU-driven hysteresis-based projector control and utilizes the DigiOS SDK API to control both displays, auto-toggling them and showing a simple clock HUD when looking downwards.

Android Status Display LDGreen: This Android sample uses DigiOS SDK API-based projector control to only leave the left display turned on, showing a simple clock HUD in green.

About

This Unity sample uses IMU-driven hysteresis-based projector control, auto-toggling both displays and showing a simple clock HUD.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published