5722

LifeX is an all-in-one smart companion built on the STM32N6570-DK, combining security, monitoring, fun, and music into a single system. From detecting wildlife at night, tracking personnel during the day, snapping creative photobooth pictures, to sensing your dance moves and playing matching music — LifeX transforms a development board into a versatile, interactive, and intelligent daily companion.

image-september-30-2025-10-15am-20250930120142.png

LifeX – The All-in-One Smart Companion on STM32N6570-DK

Hi! In this tutorial, I’ll walk you through my project LifeX – a multi-application smart system built on the STM32N6570-DK board using TouchGFX.

I designed LifeX to bring together serious security features, useful monitoring tools, and a touch of fun and creativity – all inside one unified system.


Why I Built LifeX

I wanted my STM32N6 board to be more than just a demo platform. Instead of one single-purpose app, why not make it a multi-purpose system that adapts to different times of the day and user needs?

  • At night, it should keep me safe.

  • During the day, it should help with personnel tracking.

  • In free time, it should let me have fun with friends.

  • And when I want to relax, it should even play music based on my moves.

That’s how LifeX was born 


Features in LifeX

LifeX packs four applications in one system:

  1. Night Guardian 

    • Detects wild animals (like tigers) at night.

    • Logs detection events with timestamps.

    • Acts as a mini security system.

  2. Day Vision 

    • Applies a heat-vision style filter to highlight people.

    • Logs personnel faces for attendance/security.

  3. SnapBooth 3X 

    • Takes 3 fun photos with filters.

    • Generates a QR code to download the pictures from an ESP32 server.

  4. GrooveSense 

    • Detects dance movements.

    • Plays music that matches the style of movement.

All of this is managed by a wheel-style App Manager, so I can quickly switch apps.


 How I Built LifeX


Hardware

  • STM32N6570-DK board

  • Camera module

  • ESP32 (for photobooth QR hosting)

  • Speaker/headphone output


Software

  • STM32CubeIDE

  • TouchGFX Designer

  • STM32CubeProgrammer


Project Structure

I organized the project into app-specific folders:

gui/ 
├── nightguardian_screen/ # Night Guardian App 
├── dayvision_screen/ # Day Vision App 
├── snapbooth_screen/ # Photobooth 
└── groovesense_screen/ # Mood Music 

Each app has its own assets, while the Model keeps everything connected.


Edge Impulse

Understanding the files


  • network_data.hex → Compiled weights for STM32 (X-CUBE-AI runtime).
    • Hex is basically a binary dump you cannot directly include in C code.

  • What we need → network_data.c and network_data.h:

    • .c contains the byte array of the model.

    • .h contains function declarations and constants.

Edge Impulse usually generates this via their STM32 deployment/export.


Generate network_data.c and network_data.h

  1. Open your project on Edge Impulse Studio.

  2. Go to Deployment → STM32Cube.AI.

  3. Click Build or Download for STM32Cube.AI.

  4. You’ll get a ZIP containing something like:

network_data.c network_data.h network_initialize.c network_initialize.h 

  • network_data.c → contains your model weights in a const unsigned char network_data[].

  • network_data.h → contains extern declaration and some helper macros.

  • The network will output 4 classes, based on the labels you set in Edge Impulse (boar, tiger, deer, elephant).

Simple Inference Code

float input[INPUT_SIZE]; // your preprocessed sensor/image data float output[OUTPUT_SIZE]; // 4 classes
ai_network_run(network, input, output);
// Map output to labels const char* labels[4] = {"boar", "tiger", "deer", "elephant"}; int max_idx = 0; for (int i=1; i<4; i++) { if (output[i] > output[max_idx]) max_idx = i; }
printf("Predicted: %s\n", labels[max_idx]);



Step-by-Step Build

  1. Open the Project in STM32CubeIDE.

  2. Load TouchGFX Designer and open contest_Project_hBz.touchgfx.

  3. Generate code for the GUI.

  4. Build the firmware inside CubeIDE.

  5. Flash it to the STM32N6570-DK with CubeProgrammer.

  6. Run the board – the App Manager appears first, then I can switch between apps.


My Future Plans

  • Add ML-based detection for better accuracy in Night Guardian & Day Vision.

  • Enable cloud connectivity for remote monitoring.

  • Add more creative filters to SnapBooth.

  • Integrate online music streaming in GrooveSense.

With LifeX, my STM32N6570-DK is no longer just a dev board – it’s a daily companion that keeps me safe, helps me work, and entertains me.