GitHunt
LU

lucidcode/Halovision-INSPEC

A lucid dreaming device with REM detection that triggers audio cues to promote lucidity. Like having your own private sleep lab technician that watches you sleep and alerts you when you are dreaming.

Halovision-INSPEC

The INSPEC is a lucid dreaming device that detects eye movements during REM sleep with a night-vision smart camera and triggers audio and visual alerts to promote lucidity. Like having your own private sleep lab technician that watches you sleep and alerts you when you are dreaming.

A wild INSPEC appeared

I fondly began to call them INSPECS - short for "intelligent species"

Works with

Lucid Scribe App

Hypnogram with REM Episodes

Lucid Scribe Settings

Lucid Scribe REM sleep at 06:23

Lucid Scribe REM sleep at 07:38

Documentation

Webhook API

Start the webhook API server

cd api
python webhook_server.py

Start the webhook demo

cd api
python webhook_demo.py

Refer to the Interfaces documentation for API endpoints.

Accessories

Firmware build

Install build dependencies

sudo apt-get update
sudo apt-get install git build-essential

Install GNU ARM toolchain

TOOLCHAIN_PATH=${HOME}/cache/gcc
TOOLCHAIN_URL="https://developer.arm.com/-/media/Files/downloads/gnu/13.2.rel1/binrel/arm-gnu-toolchain-13.2.rel1-x86_64-arm-none-eabi.tar.xz"
mkdir -p ${TOOLCHAIN_PATH}
wget --no-check-certificate -O - ${TOOLCHAIN_URL} | tar --strip-components=1 -Jx -C ${TOOLCHAIN_PATH}
export PATH=${TOOLCHAIN_PATH}/bin:${PATH}

Build the firmware

To build the firmware, run the following commands:

cd firmware
make -j$(nproc) -C lib/micropython/mpy-cross
make -j$(nproc) TARGET=LUCIDCODE_INSPEC

Languages

C94.9%Assembly1.4%Python0.9%OpenEdge ABL0.7%C++0.5%Makefile0.3%Shell0.3%Linker Script0.3%HTML0.2%CMake0.2%C#0.1%Jupyter Notebook0.1%Perl0.1%Java0.0%Starlark0.0%Jinja0.0%JavaScript0.0%M40.0%Objective-C0.0%TeX0.0%CSS0.0%Roff0.0%Yacc0.0%Visual Basic .NET0.0%SmPL0.0%Lua0.0%Ruby0.0%sed0.0%Batchfile0.0%LLVM0.0%Dockerfile0.0%Lex0.0%GDB0.0%Answer Set Programming0.0%Tcl0.0%

Contributors

Created July 13, 2020
Updated March 22, 2026