Sharjah, UAE GST
Intermediate45-60 min setup, then 5 lessons of 25-60 min (about 4 hours in all)6 parts5 lessonsCode for 5

Start here: ESP32 Fall-Detection Learning Prototype

Everything for the bench, in the order you need it: set up the computer and the board, then the lessons. Keep this page open while you build.

Start here: your learning path

Follow these 7 steps before Lesson 1. They take about 45-60 minutes, most of it the one-time ESP32 download, and prove your computer, cable and ESP32 work - so if something goes wrong later, you know it is the wiring, not the setup.

  1. 0Start here45-60 min · setup
  2. 1 Button & OLED Countdown 40 min
  3. 2 Tilt Angle from a Baseline 30 min Adult help
  4. 3 Motion Data Lab 30 min Extra equipment
  5. 4 Buzzer Alert 25 min Extra equipment
  6. 5 Fall-Detection Learning Prototype 45-60 min Extra equipment

Lessons 1-4 need only the kit, a computer and a USB-C data cable. Lesson 4 needs the buzzer module, an optional add-on - without it, Lesson 5 still works, silently. Lessons 3 and 5 also need a cushion and a small box or book from home. Lesson 5 is an experiment on a padded bench - never on a person or a wheelchair.

Safety rules for every lesson
  • This is a learning experiment, not a medical device, wheelchair safety system or emergency alarm. It sends no message and calls no one.
  • Never attach it to a person or a wheelchair. Test only on a light, padded, unoccupied platform.
  • Power the ESP32 from USB only. Do not connect batteries or chargers.
  • Every part in this kit goes to 3V3 - never to 5V or VIN.
  • Unplug the USB cable before you add, move or remove any wire.
  • Keep the buzzer away from your ears.
  • If anything gets hot or smells, or the ESP32 keeps restarting, unplug at once.
  • Small parts: keep them away from young children. Adult supervision for learners under 12.
  1. 1

    Check the parts

    • Open the box and lay the parts out on a clear table.
    • Tick each one off against the photos and descriptions below.

    Safety: Small parts: keep them away from young children and pets.

    ESP32U DevKitC Type-C - ESP32 WiFi & Bluetooth Development…
    1 × ESP32U DevKitC Type-C - ESP32 WiFi & Bluetooth… ESP32U DevKitC board: a metal-covered ESP32 chip, two rows of pins, a USB-C socket and two small buttons (EN and BOOT).
    GY-521 MPU-6050 6DOF IMU Sensor Module – 3-Axis Gyroscope +…
    1 × GY-521 MPU-6050 6DOF IMU Sensor Module – 3-Axis… Small blue board marked GY-521 with 8 pins: VCC, GND, SCL, SDA, XDA, XCL, AD0, INT. Its pins may need soldering.
    0.96" OLED Display Module 128x64 I2C (White)
    1 × 0.96" OLED Display Module 128x64 I2C (White) Small display with a glass screen and 4 pins labelled GND, VCC, SCL and SDA (the order varies).
    Tactile Microswitch Kit 25pcs 12x12x7.3mm Momentary Push Bu…
    1 × Tactile Microswitch Kit 25pcs 12x12x7.3mm Momen… Box of 25 square push buttons (12 × 12 mm) with coloured caps. Each has 4 legs. The lessons use one.
    Jumper Wire Assorted Pack 120 Pieces - Male-to-Male, Male-t…
    1 × Jumper Wire Assorted Pack 120 Pieces - Male-to-… Rainbow ribbons of 10 cm jumper wires: male-male, male-female and female-female.
    Transparent 830 Points Solderless Breadboard Clear Prototyp…
    1 × Transparent 830 Points Solderless Breadboard Cl… Clear 830-hole breadboard with red and blue lines along the edges.

    Photos are the catalogue pictures of each part. Your parts may differ slightly in colour - go by the shape, the pins and the labels.

    You should see: You have the 6 items listed below - plus the buzzer module if you added it (it is optional).

    If it doesn't work
    Something is missing or brokenSend us a photo with your order number on WhatsApp.
    Breadboard
    A clear board full of holes that lets you connect parts without soldering.
  2. 2

    Check what else you need

    • Read the "You also need" list below.
    • Find a USB-C data cable for the ESP32, and a computer you are allowed to install software on.
    You also need (not in the box)ForNote
    A computer (Windows, macOS or Linux) where you can install the free Arduino IDE 2 and the ESP32 toolsAll lessons
    A USB-C data cable - not a charge-only cableAll lessonsThe ESP32U has a USB-C socket
    An internet connection, for the IDE, the ESP32 tools and the librariesStart here, Lesson 1
    A small light box or book, and tape, as a test platformLessons 2, 3 and 5
    A cushion or foam padLessons 3 and 5Tests only on a padded, unoccupied platform
    Soldering, by an adultOnly if the GY-521 or OLED pins arrive looseAdult only
    A multimeterOptionalNo lesson needs one. Useful for an adult checking 3.3 V and GND.

    You should see: You have a computer, a USB-C data cable, an internet connection and an adult nearby.

  3. 3

    Install the Arduino IDE and the ESP32 tools

    • Download the free Arduino IDE 2 from arduino.cc/en/software and install it.
    • Open File → Preferences. In "Additional boards manager URLs" paste: https://espressif.github.io/arduino-esp32/package_esp32_index.json
    • Open Tools → Board → Boards Manager, search esp32 and install "esp32 by Espressif Systems". It is a big download - allow 10-20 minutes.

    You should see: Tools → Board now has an "esp32" section.

    If it doesn't work
    The download or install is blockedSchool and work computers often block installs. Ask an adult or use a home computer.
    "esp32 by Espressif Systems" is not listedCheck the Preferences address is pasted exactly, then close and reopen the Boards Manager.
    IDE
    The program where you write code and send it to the board.
    Core
    The add-on that teaches the IDE about a type of board, here the ESP32.
  4. 4

    Connect the ESP32 with a USB-C data cable

    • Plug the cable into the ESP32 and the computer. Nothing else is connected yet.

    Safety: Put the ESP32 on a dry table, away from coins, paper clips and other metal - they can touch the pins underneath and cause a short.

    You should see: A small red power light on the ESP32 lights up.

    If it doesn't work
    No light at allPush the plug fully in. Try another USB port, then another cable.
  5. 5

    Select the board and the port

    • Open Tools → Board → esp32 → ESP32 Dev Module.
    • Open Tools → Port and choose your ESP32: COM3, COM4… on Windows, /dev/cu.usbserial… or /dev/cu.SLAB… on a Mac, /dev/ttyUSB0 on Linux.
    • Not sure which one? Unplug the ESP32, look at the list, plug it back in: the new entry is yours.

    You should see: The bottom of the IDE window shows "ESP32 Dev Module" and your port.

    If it doesn't work
    The Port menu is emptyMany USB cables only charge. Use a data cable.
    Windows shows an unknown deviceLook at the small chip next to the USB socket: CP2102 or CH340. The computer needs the free driver for that chip - ask us on WhatsApp for the link.
    Linux: "permission denied" on the portAsk an adult to add your user to the dialout group (sudo usermod -a -G dialout $USER), then log out and back in.
    Port
    The name your computer gives the USB connection to the board.
  6. 6

    Upload a first test

    • Open File → Examples → ESP32 → ChipID → GetChipID.
    • Click Upload (→) and wait for "Hard resetting via RTS pin..." or "Done uploading".
    • Open Tools → Serial Monitor and set the speed to 115200 baud.

    You should see: Every 3 seconds the Serial Monitor prints the chip model (ESP32-D0WD…), its revision and the number of cores.

    Try it: Change delay(3000) to delay(1000) and upload again. The lines appear every second. Now you know you can change code and upload it.

    If it doesn't work
    The upload stops at "Connecting....____"Hold down the BOOT button on the ESP32 when "Connecting" appears, and let go when the percentage starts.
    "Failed to connect" or "port is busy"Close the Serial Monitor and any other program using the port, choose the port again (step 5) and retry.
    A red "Compilation error"Check Tools → Board is ESP32 Dev Module. Close the example without saving and open it again.
    The Serial Monitor shows strange symbolsSet the speed to 115200 baud. Press the EN (reset) button to start the sketch again.
    Upload
    Sending your sketch from the computer into the board. It stays there after you unplug.
    Serial Monitor
    A window in the IDE (Tools → Serial Monitor) that shows the text the board sends.
  7. 7

    Continue to Lesson 1

    • Unplug the USB cable.
    • Open Lesson 1: Button & OLED Countdown and follow it step by step.
    • Do the lessons in order: each one builds on the last, and the wiring stays in place.

    You should see: You are ready to build.

    Open Lesson 1 → Printable manual
Try a lesson in the simulator first

Every lesson runs on screen with the same code and pins. It is a good way to check your code - but it is not the real breadboard:

  • The simulator checks your code and pins, not your wiring: it does not know whether a module is on 3V3 or 5V, or which button legs you used.
  • The tilt and g sliders give perfectly clean numbers. A real GY-521 is noisy, and real knocks and drops are much messier.
  • The buzzer is shown switching on and off. The simulator cannot tell how loud your module is at 3.3 V.
  • The simulator needs no ESP32 tools or libraries installed - the real Arduino IDE does (Start here and Lesson 1).
Open the simulator →

Stuck?

Most problems are one wire in the wrong hole. Check these first:

  1. Unplug, then compare every wire with the lesson's diagram and table. One pin off is the most common problem.
  2. Are all VCC wires on 3V3 (not 5V or VIN), and all GND wires on GND?
  3. OLED and GY-521: SDA on GPIO21 and SCL on GPIO22, by the labels on each module?
  4. Serial Monitor: is it set to 115200 baud?
  5. Upload problems: Tools → Board = ESP32 Dev Module, the right port, and hold BOOT if it stops at "Connecting". (Start here, step 6.)
Still stuck? Ask us on WhatsApp. Send this message with a photo of your wiring - it tells us exactly where you are.
Hi DIY KIT, I'm stuck on the ESP32 Fall-Detection Learning Prototype.
Lesson: __
Step number: __
What should happen: __
What happens instead: __
Error message (copied exactly): __
I'll attach a photo of my wiring.
Message us on WhatsApp

5 projects in this kit

Every one is built from the parts in the box, plus the basics listed under You'll also need.

Free with this kit · print or PDF The complete kit manual Everything on this page, ready for the bench: a parts checklist, wiring tables and step-by-step instructions for every project. 5 step-by-step guides Parts checklist QR to every project Open the manual
Sensing Intermediate 03

Lesson 3: Motion Data Lab

Draw the total g-force on a live graph and count every jolt and every drop - the two signals the main build looks for.

ESP32U GY-521 DIY-003 OLED DIY-158 tactile switch DIY-212 jumper pack DIY-295 breadboard a foam pad or cushion (yours)
Step-by-step guide, code & parts →
Basics Beginner 04

Lesson 4: Buzzer Alert

Add the buzzer and build an alert that beeps until you press the button - and stops by itself after 15 seconds.

ESP32U DIY-016 active buzzer module DIY-003 OLED DIY-158 tactile switch DIY-212 jumper pack DIY-295 breadboard
Step-by-step guide, code & parts →
Automation Intermediate 05

Lesson 5: Fall-Detection Learning Prototype

Put it all together: a jolt or drop followed by staying tipped over starts a beeping 20-second countdown that the button cancels. A learning experiment on the bench - not a safety device.

ESP32U GY-521 DIY-003 OLED DIY-158 tactile switch DIY-016 buzzer module DIY-212 jumper pack DIY-295 breadboard a padded test platform (yours)
Step-by-step guide, code & parts →
Build guide · ESP32 · Intermediate

ESP32 Fall-Detection Learning Prototype

Start here installs the ESP32 tools. Then 5 lessons build one bench experiment step by step: a button and screen, a tilt angle, jolt and drop data, a buzzer alert (the buzzer is an optional add-on), and finally the fall-detection rule. Every lesson page has a connection diagram, a wiring table, numbered steps, the code, what you should see and a fix-it table.

Start here + 5 lessons6 parts + optional buzzerAbout 4 hoursUSB power onlyLearning experiment - not a safety device

What this kit teaches

Measure · Lessons 2 and 3

Read an accelerometer over I2C, work out a tilt angle from a baseline, and see free fall and impacts in g.

React · Lessons 1 and 4

A debounced button, a countdown on the OLED and a buzzer alert that can be acknowledged and times out.

Decide · Lesson 5

A state machine that needs a jolt and staying tipped over, handles faults clearly, and is tested for false alarms and misses.

Learning experiment only: never attach it to a person or a wheelchair, and never rely on it to detect a fall. It sends no message and calls no one.

The detection rule (Lesson 5)

StepWhat must happenNamed in the code
1. CalibrateKept still for 3 seconds: the sensor learns "upright"150 samples
2. CandidateTotal above 2.5 g (jolt) or below 0.45 g (drop)IMPACT_G, FREEFALL_G
3. ConfirmWithin 5 s, tipped more than 55° from upright for 1.5 sCANDIDATE_MS, TILT_DEG, TILT_HOLD_MS
4. Countdown20 seconds, a beep each second; the button cancelsCOUNTDOWN_MS
5. Local alertBeeps until the button acknowledges - nothing is sent-

These are starting values for an experiment, not validated fall criteria.

What the OLED shows

ScreenMeaningWhat to do
KEEP STILL AND LEVELLearning "upright" for 3 secondsDo not move the platform
MONITORINGReading the sensor; shows total g and the event countStart your controlled tests
POSSIBLE EVENTThe rule matched; the countdown is runningPress the button to cancel
NO EVENTA jolt or drop, but it did not stay tipped over within 5 secondsNothing - monitoring resumes
CANCELLED / ACKNOWLEDGEDYou pressed the buttonMonitoring resumes
LOCAL ALERTThe countdown ran outPress to acknowledge - no message was sent
FAULT - POWER OFFA device is missing, calibration failed or reads failedUnplug USB and check the wiring

One pin plan

PartESP32 pin (printed label)Lessons
OLED and GY-521 SDA / SCLGPIO21 / GPIO22All
OLED, GY-521 and buzzer VCC3V3 (never 5V)All
Push buttonGPIO26 and GNDAll
Buzzer I/OGPIO274, 5
On-board LED (if fitted)GPIO21, 5

Status

All 5 sketches compile for the ESP32 Dev Module (ESP32 core 3.3.11) with no warnings and run in the kit simulator. The complete physical build, the thresholds and the detection have not been bench-tested. Parts may differ slightly from the photos - go by the labels printed on your parts.

Build steps (6)

Tick steps off as you go — your place is kept on this device.

0 / 6
ℹ These steps come from the build reference recorded for this kit. The firmware is in the Code section below.

Code (5 files)

One sketch per project, written for the boards in this kit. Open a project to read it with its wiring, or copy it there.

5
833
arduino
ℹ Pin numbers and thresholds are written for the board in this kit. Change the board and the pin map changes with it — ask and we'll adjust it.
Bot
ECHO
Online — usually replies instantly
Catalog assistant: verify final stock/price on the product page before checkout.