Recounting Recent: Lucid Flight

Lucid Dreaming app for Android

Lucid Flight is an android app I wrote in Kotlin to assist in lucid dreaming. I’m working on an iOS version in swift and plan to add both to their stores once leisure allows some refinement. The source code is private so the following shows functionality and demonstrates concept.

Lucid Flight app icon | Flying after ‘waking up’ is a quintessential lucid dream

Lucid dreaming has become pretty well known recently but to briefly summarize, it is realizing that you are dreaming while you are dreaming. Given that we sleep for about one third of our lives, gaining the ability to be conscious during our sleep greatly lengthens and enriches our lives. Lucid dream research and scholarship continues being published.

LaBerge, Stephen, et al. “Lucid Dreaming: Physiological Correlates of Consciousness during REM Sleep.” The Journal of Mind and Behavior, vol. 7, no. 2/3, 1986, pp. 251–258. JSTOR, Accessed 22 May 2020.

The benefits of lucid dreaming are far vaster than I want to go into here but suffice it to say that it is awesome, in the literal sense of the word. I chose the name and icon because flying once lucid is one of the most common and most exhilarating experiences.

simple animated vector graphic for load screen

All the incomplete lucid dreaming devices of recent years inspired me to create this. Several have gained full funding on Kickstarter and similar platforms and never released a product. Starting at $200+ dollars makes them cost prohibitive to many as well. Better to use the phone and (hopefully) fitness tracker we already have.

Basically they are masks or devices that take readings from your body in order to determine when you enter the dream stage of sleep. The devices then trigger signals to your dreaming body that you can learn to recognize within the dream state and use as cues to realize you are dreaming.

“[…] dreaming can be viewed as the special case of perception without the constraints of external sensory input. Conversely, perception can be viewed as the special case of dreaming constrained by sensory input.” -Stephen LaBerge

Integration with google fit api’s heart rate data provides data for the apps prediction of REM entry

Some of the Lucid Dream devices use EEG brain signals, some watch for eye movement with sensors over the eyes. Lucid flight predicts REM with heart rate data. Ouraring has an image showing precisely how in their article on heart rate while sleeping.

Resting heart rate curve

Ouraring ignores the sharp peaks in sleeping heart rate for this curves abstraction but the sharp peaks are exactly what lucid flight looks for. Spikes in heart rate are from entry into dreams.

The strategy is to predict REM then signal the sleeper they’re dreaming but not so loud it wakes them completely. Most use lights and some also use sound. The app allows users to customize their dream alarm. The highly customizable alarm allows users to find the sweep spot between waking and being easily recognizable within dreams. Like how shining a flashlight on a dreamers face can trigger the appearance of an oncoming train if it doesn’t wake them.

Heart rate data is in a scrolling view above min, mean, and max for testing adjustments to the REM prediction algorithm.

The middle toggle activates dream detection mode. The bottom three toggles control whether the alarm strobes the flashlight and screen brightness, plays a recorded sound or default tone, and third whether the alarm causes vibration.

Options allow users to record a custom message which the alarm plays back. As well as changing alarm length and previewing the alarm.

Lucid dreaming is very difficult for most people and learning to recognize dream signals while you are dreaming is hard. Nonetheless, having some software and hardware’s help can seriously accelerate the learning curve.

The biggest predictor of successful lucidity is a strong motivation to learn. To that end the app home screen displays inspirational messages about lucid dreaming.