How sensirion/smartgadget-firmware works
Project type and purpose
• This is an embedded‐firmware project composed of two independent modules:
– BLE_Module_nRF51822: firmware for the Sensirion Smart Gadget’s nRF51822 BLE SoC. It reads temperature/humidity from an SHT31 sensor, logs data, and exposes it over BLE GATT.
– LCD_Driver_MC9S08LL8: firmware for a Freescale MC9S08LL8 microcontroller that drives the gadget’s LCD display.
File structure
• BLE_Module_nRF51822
– BLE_API (common + public): wrapper classes around SoftDevice APIs (Gap, GattService, UUID, etc.)
– mbed + TARGET_NRF51822: mbed OS HAL layer and Nordic SDK / SoftDevice integration
– nRF51822: low‐level BLE stack glue code (btle/*.cpp, Nordic SDK files)
– source/: application code (main.cpp, sensor drivers, FlashCmdQueue, RingBuffer, ServiceDataHandler) and GATT service implementations (TemperatureService, HumidityService, BatteryService, DeviceInformationService, LoggerService)
– project files: Keil uVision project and mbed build scripts
• LCD_Driver_MC9S08LL8
– Project_Settings, .project, .cproject: CodeWarrior IDE setup
– Sources/: LCD.c/h, SPI.c/h, startup and system code, main.c
– bin/, cmd/, prm/: generated binaries, flash scripts, parameter files
Key insights from README
– The gadget integrates an SHT31 humidity & temperature sensor, data logging, BLE comms to smartphone, and an LCD display.
– Toolchains: Keil µVision (nRF51822) and Freescale CodeWarrior (MC9S08LL8).
Elements
– Firmware stacks (SoftDevice, mbed, BLE_API) in another (blue)
– Application modules (services, logging) in a third (green)
– External entities (smartphone) in a fourth (orange)
– Rectangles for components