Source: https://mokxi.com/teachers/plans/build-nerf-sentry
Updated: 2026-11-19

Lesson plan

# Build a foam dart sentry lesson plan

A foam dart desk guard built safety first: a thermal camera that finds a warm body, pan and tilt aim from its pixels, a range check, a solenoid trigger with a flyback diode, an arm switch, and no-fire zones in code.

3 chapters, 6 lessons, about 5 hours, on the Arduino Uno R3. Every lesson runs in the browser, with nothing to install.

Start a class from this course

The unit

## Objectives and materials

### By the end, students can

- Pixels as directions for a pan and tilt pair, and an 8 x 8 thermal camera that tells a person from a mug.
- An ultrasonic range check with no range no fire, and a solenoid on a MOSFET with its flyback diode and an arm switch.
- Face height, a doorway and a lock time in code, and a desk guard with a magazine that runs out.

### Materials for the whole unit

- Arduino Uno R3
- Bench power supply
- Diode
- Hobby servo x 2
- MOSFET
- Slide switch
- Solenoid
- Thermal camera, AMG8833
- Ultrasonic ranger

Every part is already on the simulator’s bench, so there is nothing to buy or hand out. The counts are the most any one lesson uses, if you build it on real breadboards too.

Chapter 1. About 1 h 50 min

## Find and aim

Pixels as directions for a pan and tilt pair, and an 8 x 8 thermal camera that tells a person from a mug.

Lesson | Time | What students do

Pan and tilt from a heat map Two servos aim the launcher. A thermal camera fixed on the base gives each of its 64 pixels a direction, and one line of arithmetic turns a pixel into a pan and a tilt. | 55 min

- Run it
- Aim by hand
- A pixel is a direction
- Follow the heat
- Down the desk

Heat tracking An 8 x 8 thermal camera finds a warm body against a cool room. Pick a threshold, find the hottest pixel, and ignore a hot mug that is not a person. | 55 min

- Sixty-four thermometers
- Warm enough to count
- Anywhere in view
- Not a person
- A colder room

### Materials

- Arduino Uno R3
- Bench power supply
- Diode
- Hobby servo x 2
- MOSFET
- Slide switch
- Solenoid
- Thermal camera, AMG8833
- Ultrasonic ranger

### Check for understanding

Each student finishes "Heat tracking" on their own, without opening the hints. The simulator checks 5 of its 5 steps as they go.

Then ask each one to explain, in a sentence or two, the last thing it asked of them: "A colder room".

Chapter 2. About 1 h 50 min

## Range and trigger

An ultrasonic range check with no range no fire, and a solenoid on a MOSFET with its flyback diode and an arm switch.

Lesson | Time | What students do

Range check A thermal camera cannot tell near from far. An HC-SR04 can: fire only between 1 and 3 meters, and never when there is no echo at all. | 55 min

- How far
- Too close
- Too far
- In range is not enough
- A safer minimum

A trigger solenoid A 12 V solenoid pulls the launcher’s trigger through a logic-level MOSFET, a diode catches the coil’s kick, and an arm switch decides whether any of it can happen. | 55 min

- Arm it
- Pull the trigger
- The kick
- Reload
- A faster reload

### Materials

- Arduino Uno R3
- Bench power supply
- Diode
- Hobby servo x 2
- MOSFET
- Slide switch
- Solenoid
- Thermal camera, AMG8833
- Ultrasonic ranger

### Check for understanding

Each student finishes "A trigger solenoid" on their own, without opening the hints. The simulator checks 5 of its 5 steps as they go.

Then ask each one to explain, in a sentence or two, the last thing it asked of them: "A faster reload".

Chapter 3. About 1 h 30 min

## Safe zones and the guard

Face height, a doorway and a lock time in code, and a desk guard with a magazine that runs out.

Lesson | Time | What students do

Safe zones Places the sentry must never fire: face height, a doorway, and anything it has not watched long enough. Each one is a line of code, checked before every shot. | 45 min

- Face height
- Lock on first
- The doorway
- A lower ceiling

Project: a desk guard Put the desk guard together: a full engagement, a magazine that runs out instead of a sentry that never stops, and your no-fire zones. | 45 min

- An engagement
- A magazine
- Your zones
- Guard duty

### Materials

- Arduino Uno R3
- Bench power supply
- Diode
- Hobby servo x 2
- MOSFET
- Slide switch
- Solenoid
- Thermal camera, AMG8833
- Ultrasonic ranger

### Check for understanding

Each student finishes "Project: a desk guard" on their own, without opening the hints. The simulator checks 4 of its 4 steps as they go.

Then ask each one to explain, in a sentence or two, the last thing it asked of them: "Guard duty".

Your class

## Teach this unit as a class

Start a class from this course and its 6 lessons are assigned in one go, in order. Students join with a six-character code or printed login cards, and each one’s work comes back to you.

The class tools are free for 30 days for one class of up to 20 students, with no card. The lessons themselves are free either way.

Start a class from this course See the demo class

More units

## Other lesson plans

Electronics basics 20 lessons, about 10 h. Embedded on the Arduino Uno 16 lessons, about 12 h. Embedded on the ESP32-C3 13 lessons, about 11 h. Embedded on the Raspberry Pi Pico 7 lessons, about 6 h. Build your own fight stick 5 lessons, about 4 h. Embedded on the STM32F411 6 lessons, about 6 h. C++ on a board 13 lessons, about 10 h. Digital logic and memory 4 lessons, about 4 h. Interactive devices on the Uno 9 lessons, about 8 h. From gates to a computer 23 lessons, about 16 h. Build a claw machine 8 lessons, about 6 h. Every unit All the courses as ready-made units, on the teachers page.
