February 6, 2026
Your iPhone Pro has a sensor that most people never think about. It fires thousands of invisible infrared beams every second, measures how long each one takes to bounce back, and builds a real-time 3D map of everything in front of it. No light required.
It's called LiDAR. Apple added it to the iPhone 12 Pro in 2020. Most people only know about it because it makes Portrait Mode slightly better or helps AR apps place furniture on their floor. That's like buying a sports car and only using it to drive to the mailbox.
I built Alarmist to use that LiDAR sensor for something practical: motion detection that works when you're sleeping in a pitch-black room and want to know if someone walks through your door.
What LiDAR actually does (and why cameras fail at night)
A camera captures reflected visible light. No light, no image. This is why every "security camera" app on the App Store is worthless after you turn off the lights.
LiDAR is different. It emits its own infrared light, invisible to the human eye, and measures how long each pulse takes to return. The result is a depth map, not an image. It knows exactly how far away every surface is in the room, updated many times per second.
Left: A camera sees nothing in darkness. Right: LiDAR builds a depth map using infrared. The orange figure is detected at 2.3 meters.
Your iPhone can "see" without any light at all. Not with a camera image, but with depth data. A wall is at 3 meters. A chair is at 1.5 meters. And when a person walks through a doorway at 2 meters, that depth reading changes dramatically. A big, sustained change in depth at the right distance is unmistakable: someone just entered the room.
This is the key advantage over camera-based detection. Shadows, headlights through windows, changing ambient light, all the things that cause false positives with cameras, are irrelevant. LiDAR measures physical distance. Either an object is there or it isn't.
How I turned this into a motion alarm
When I travel, I sometimes sleep in unfamiliar places. Hotels, Airbnbs, guest rooms. I wanted one extra layer of awareness if someone entered the room while I was asleep. Not a full security system. Just something that would wake me up.
Camera-based motion detection needs visible light. Leaving a light on defeats the purpose of trying to sleep. LiDAR does not. So I built an app around it.
The setup is simple: position your iPhone on a nightstand or stable surface, point it at the doorway, and arm the app. The screen goes dark to save battery (but stays awake). The LiDAR sensor keeps scanning.

Armed and monitoring. The screen goes dark so you can sleep. LiDAR keeps scanning with infrared.
When someone enters the detection zone, the app measures the depth change across multiple consecutive frames. If the change is large enough and sustained enough (not a brief flicker from sensor noise), it triggers.
The two-stage pipeline
Alarmist uses a two-stage approach to balance battery life with fast response:
Stage A runs continuously with low power: scanning depth, comparing frames, filtering by distance. When motion is confirmed, Stage B activates the torch, captures a photo, and raises a loud alarm.
Stage A (Monitoring) runs at low power. It reads depth data from the LiDAR sensor, compares each frame to the previous one, and filters out changes at distances outside your configured range. A cup on your nightstand won't trigger it because it's too close. The back wall won't trigger it because it's static.
Stage B (Triggered) is the response. When Stage A confirms motion, Stage B fires immediately: the flashlight turns on to illuminate the intruder, the camera captures a photo for evidence (saved to your camera roll), and a loud alarm plays at full volume. The alarm ignores Silent Mode. You will wake up.
Real use cases
Hotel rooms and Airbnbs
You're sleeping in a room with a door that someone else has a key to. Housekeeping, the Airbnb host, or a previous guest who copied the key. Position your phone on the nightstand, aim it at the door, arm the app. If that door opens in the middle of the night, you'll know.
Dorm rooms
Your roommate's friends have a habit of wandering in at 3am. Or maybe you just want to know if someone enters while you're napping between classes. Set up Alarmist pointed at the door and sleep without wondering.
Shared living situations
You rented a room in a house with people you don't know well. Your bedroom door doesn't have a lock, or the lock is flimsy. One more layer of awareness while you sleep.
Camping (with power)
In a cabin or RV with a power outlet, point the phone at the door. LiDAR doesn't care that it's midnight in the woods with zero ambient light.
The depth heatmap: see what the sensor sees
Before you arm Alarmist, you can preview what the LiDAR sensor sees using the depth heatmap view. Objects within detection range appear in green and yellow. Objects too close (like your hand holding the phone, or the nightstand itself) appear in purple and get excluded from monitoring.
The depth heatmap before arming. Green/yellow means "in range." Purple means "too close, excluded." You can see exactly what will be monitored.
This is useful for calibrating the setup. You want the doorway in the detection zone and the nightstand excluded. The heatmap makes that obvious before you commit to arming.
What happens when the alarm triggers
When someone enters the detection zone:
- Immediate loud alarm at full volume, ignoring Silent Mode and volume settings
- Optional flashlight activates to illuminate the intruder
- Optional photo capture saves evidence to your camera roll
- Countdown display shows the alarm state on screen
Alarm triggered. The depth heatmap shows the intruder's silhouette in the doorway. The alarm is playing at full volume.
The alarm is loud enough to wake you and startle the intruder. The photo gives you evidence. The flashlight makes sure the photo captures something useful.
Configuring for your environment
Every room is different. Alarmist gives you control over:
Sensitivity: How much depth change is needed to trigger detection. High sensitivity catches subtle motion. Lower sensitivity avoids false positives from curtains or pets.
Distance bands: Set a minimum and maximum distance for the detection zone. Ignore objects too close (your nightstand, your phone stand) and too far (the back wall, a window).
Temporal smoothing: Require motion in multiple consecutive frames before triggering. This eliminates one-off sensor noise. A person walking creates sustained depth changes across many frames. Random noise doesn't.

Settings for sensitivity, distance range, and timing. Adjust these for your specific room layout.
What it can't do (honest limitations)
I'm not going to oversell this. Alarmist is a convenience tool, not a security system. Here's what you need to know:
Device must stay plugged in. LiDAR and keeping the screen awake drain battery. For overnight monitoring, plug it in.
App must stay in the foreground. If you lock the screen or switch to another app, monitoring stops. iOS does not allow LiDAR access from the background. Keep the app open with the screen on (it goes dark automatically to reduce light emission).
Requires a LiDAR-equipped device. iPhone 12 Pro or newer, or iPad Pro 2020 or newer. Standard iPhone models (non-Pro) do not have LiDAR.
Not a security system. It cannot guarantee detection of all motion or protect you from harm. This is one extra layer of awareness, not a replacement for proper locks, deadbolts, or a commercial alarm system. I built this for my own travel use. It works for me. Test it in your environment before depending on it.
How LiDAR actually works in your iPhone
For the technically curious: Apple's LiDAR scanner is a direct time-of-flight (dToF) sensor. It uses a VCSEL array (vertical-cavity surface-emitting laser) to fire infrared pulses at 940nm wavelength. A SPAD array (single-photon avalanche diode) detects the returning photons and measures the round-trip time at nanosecond precision.
The result is a depth map with thousands of points, updated multiple times per second. ARKit exposes this data as a per-pixel depth buffer that apps can read. Alarmist reads this buffer on every frame, compares it to the previous frame, filters by the configured distance range, and looks for sustained changes that indicate motion.
The LiDAR sensor on the nightstand fires invisible infrared beams across the room. When someone walks through the doorway, the depth changes are detected immediately.
Your phone is holding out on you
Most people carry a LiDAR sensor every day and never use it for anything meaningful. Apple markets it as an AR feature, and it does improve AR. But real-time 3D depth sensing that works without any light has uses that go way beyond placing virtual furniture on your floor.
Motion detection in the dark is one of those uses. I built Alarmist because I needed it, and because the hardware was already in my pocket. If you travel, if you sleep in unfamiliar places, or if you just want one more layer of awareness at night, this is what your phone can do.
Alarmist is available on the App Store for iPhone 12 Pro and newer. No account required. No cloud backend. All processing happens on-device.
Bless up! 🙏✨