BL475-SensorHub
A zephyr based project on stm32BL475 to collect onboard sensor data and transmit it over mqtt to a dashboard.
- wifi connectivity.
- configured static ip adress.
- configured mqtt ipv4 sockets.
- configured a thread that collects sensor data and stores it into a queue.
- configured a thread that reads sensor data form queue and sends it over mqtt.
- main loop for maintaining the connection to mqtt broker.
This projects uses a local mqtt broker mosquitto
supported sensors:
- hts221: Temperture sensor
- lsm6dsl: Acceleromter and Gyroscope sensor
- lis3mdl: Magnetometer sensor
- lps22hb: Pressure sensor
- vl53l0x: TOF(Time of Flight) sensor
Usage
- Buidling
west -p always -b disco_l475_iot1
- Flashing
west flash --runner openocd
TODO
- FIX the accelerometer and gyroscope sensor readings (reading 0 )
- Use the json module in zephy to package the data
- Make the modules (.h/.c) kconfig
- Move the mqtt main connection loop to a sperate thread
- Make the system use low power reads data every 5 min them go to sleep
- Store wifi credentials in FLASH mem (QSPI)
- Make the wifi Reconnect upon disconnection
- Add support for dhcp and connect to mosquitto broker online
- Add support for mqtt TLS