Skip to content

2.1.2 Mini Avionics Bay Software And Code Upload

Step-by-Step Assembly (Continued)

Lesson 2 – Software & Code Upload

STEP 5 Install Arduino IDE & Libraries
* Install Arduino IDE 2.x on classroom computer * Add ESP32 board support via Board Manager URL: https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json * Install libraries via Library Manager: Adafruit_SSD1306, Adafruit_GFX, MPU6050_light * Select board: ESP32 Dev Module; select correct COM port
STEP 6 Upload & Test the Code
* Open avionics_bay.ino from Kit 4 USB drive * Review code with students: identify sensor reading, alert logic, and display sections * Upload to ESP32; open Serial Monitor at 115200 baud to verify sensor readings * OLED should show: ALT: XXcm

Lessons 3–4 – Calibration, Testing & Wiring Diagram

STEP 7 Sensor Calibration
* Place ESP32 assembly flat on a level surface * Check Serial Monitor: pitch and roll should read near 0° * If offset exists, note values and adjust pitch_offset and roll_offset variables in code * Hold hand 100 cm above ultrasonic sensor; reading should show ~100 cm * Test at 30 cm and 15 cm; confirm alert triggers at < 30 cm
STEP 8 Alert System Verification
* Slowly move hand toward sensor; confirm Red LED + buzzer activate at 30 cm * Tilt sensor board to 30°; confirm Yellow LED + buzzer activate * Return to flat and all-clear: Green LED illuminates; buzzer off * Record each test result in the Test Verification Table (Section 6)
STEP 9 Produce the Wiring Diagram
* Each student draws a complete, labelled wiring diagram on A4 paper * Colour coding: red = 3.3V, orange = 5V, black = GND, other colours = signal wires * Label every component and every GPIO number * Compare with partner to check accuracy; teacher signs off completed diagram