> ## Documentation Index
> Fetch the complete documentation index at: https://stem-docs.intellectualpoint.com/llms.txt
> Use this file to discover all available pages before exploring further.

# The sensors that keep it stable

> Discover the sensors that let your drone balance itself, hold position, and see the world.

## Why your drone doesn't just fall over

Balancing a quadcopter by hand would be impossible - it would need thousands of tiny motor corrections every second. Your drone does exactly that automatically, thanks to a set of **sensors** feeding data to the flight controller.

<Frame caption="Four sensors work together to keep your drone stable and aware">
  <img src="https://mintcdn.com/intellectualpoint/WG-N0km0lS3L3ZkH/images/drones/drone-sensors.png?fit=max&auto=format&n=WG-N0km0lS3L3ZkH&q=85&s=c992513a8c1bb07b0eb64fdd672e8c30" alt="Diagram of drone sensors: IMU, optical-flow camera, barometer, and FPV camera" width="1536" height="1024" data-path="images/drones/drone-sensors.png" />
</Frame>

<Frame caption="Where each sensor lives on the drone">
  <img src="https://mintcdn.com/intellectualpoint/eW7U9shBQKKM3XX9/images/drones/sensor-locations.png?fit=max&auto=format&n=eW7U9shBQKKM3XX9&q=85&s=c917b57fe35199e3803454d96f274235" alt="Cutaway diagram showing the IMU at the center, optical-flow camera on the belly, barometer on the board, and FPV camera on the nose" width="1536" height="1024" data-path="images/drones/sensor-locations.png" />
</Frame>

## The key sensors

<AccordionGroup>
  <Accordion title="Gyroscope + accelerometer (the IMU)" icon="axis-3d">
    The **Inertial Measurement Unit** senses rotation and acceleration in every direction. It tells the flight controller how the drone is tilting and moving - the core of staying level. These are the same chips inside your phone that rotate the screen and count your steps.
  </Accordion>

  <Accordion title="Optical-flow camera" icon="scan">
    A downward-facing camera that watches the texture of the ground and measures how it slides past. This lets the drone hold its position when hovering, even with no GPS. It works best indoors, in good light, over a patterned (not blank or shiny) floor.
  </Accordion>

  <Accordion title="Barometer" icon="gauge">
    A pressure sensor that measures tiny changes in air pressure to estimate **altitude**. It helps the drone hold a steady height when you let go of the throttle.
  </Accordion>

  <Accordion title="FPV camera" icon="camera">
    The forward 720p camera that streams **First-Person-View** video to your device over Wi-Fi. It's your eyes in the sky - you'll fly with its live view on Day 4.
  </Accordion>
</AccordionGroup>

## Sensors + flight controller = stable flight

Here's the loop that repeats hundreds of times per second while your drone is in the air:

```mermaid theme={null}
flowchart LR
    S["Sensors read
tilt, motion, height"] --> FC["Flight controller
does the math"]
    FC --> M["Adjust the
four motors"]
    M --> D["Drone stays
stable"]
    D --> S
```

This constant **sense - think - act** loop is the same idea behind self-driving cars and robots. It's why you can let go of the sticks and your drone just hovers.

## A closer look at optical flow

The optical-flow camera is the sensor you'll notice most while flying. It watches the floor pattern slide past and tells the flight controller to cancel out any unwanted drift - which is why the *kind of floor* you fly over matters so much.

<Frame caption="How the down-facing camera keeps your drone locked in place - and why the floor matters">
  <img src="https://mintcdn.com/intellectualpoint/eW7U9shBQKKM3XX9/images/drones/optical-flow-how.png?fit=max&auto=format&n=eW7U9shBQKKM3XX9&q=85&s=0a7e6e190abd6e355d4e931c9c04305a" alt="Diagram of optical flow watching floor texture, comparing a textured well-lit floor to a blank shiny floor" width="1536" height="1024" data-path="images/drones/optical-flow-how.png" />
</Frame>

<Warning>
  The optical-flow sensor needs a **textured, well-lit floor** to work. Over a plain white floor, glass, water, or in dim light, the drone may drift because the sensor can't "see" the ground moving. Fly over a patterned rug or floor with good lighting for the steadiest hover.
</Warning>

<Tip>
  When your drone drifts on Day 2, think about which sensor might be struggling. Often the fix is simply better lighting or a more textured floor - not a broken drone.
</Tip>

<Check>
  You can name the four main sensors on your drone and explain how the sense-think-act loop keeps it stable.
</Check>
