Zephyr RTOS firmware for streaming 6-axis IMU data (accelerometer + gyroscope) over Bluetooth Low Energy. Built for the LSM6DSL inertial sensor, targeting nRF52 series board.
The firmware continuously samples the LSM6DSL at 104 Hz via a hardware data-ready interrupt, buffers samples in a kernel FIFO, and a periodic consumer task drains the FIFO every 50 ms to send batched BLE notifications to a connected client (e.g. a Flutter mobile app).
An LED blink indicator reflects the device state: blinking while advertising, steady-on when a BLE connection is established.
.
├── CMakeLists.txt # Zephyr CMake build definition
├── prj.conf # Kconfig: BLE, sensor, GPIO, buffer tuning
├── src/
│ └── main.c # Application entry point (all logic)
└── README.md
- nRF Connect SDK (v2.6+ recommended)
- VS Code with the nRF Connect for VS Code extension pack installed
- A board with an LSM6DSL connected via I2C/SPI and a BLE-capable SoC (e.g. Seeed XIAO nRF52840)
- Open this project folder in VS Code.
- In the nRF Connect side panel, click Add Build Configuration.
- Select your board (e.g.
xiao_ble/nrf52840) and the nRF Connect SDK version, then click Build Configuration. - Click Build in the Actions bar to compile the firmware.
- Connect your board via USB, then find
zephyr.uf2in thebuild/IMUble/zephyrand flush to the board.
Tip: If your board is not listed in the default set, add a custom board root via Board Roots in the build configuration dialog, or place a board overlay in the
boards/directory of this project