This repository includes embedded systems projects using the STM32 NUCLEO platform to explore analog input reading from light sensors (LDR) and digital data acquisition from a MEMS accelerometer. The projects also demonstrate efficient data handling using DMA and callback mechanisms.
- Function: Reads analog values from a Light-Dependent Resistor (LDR) using the ADC.
- Purpose: To observe light intensity variations in real time.
- Learning Outcome: Basic ADC setup and data conversion from sensor input.
- Function: Continuously reads LDR data using DMA, triggers action halfway through the buffer.
- Purpose: Improves ADC efficiency using DMA and interrupt-driven processing.
- Learning Outcome: Using
HAL_ADC_ConvHalfCpltCallbackfor real-time data streaming.
- Function: Reads and displays motion data from a MEMS accelerometer.
- Purpose: Tracks movement or orientation using multi-axis accelerometer data.
- Learning Outcome: SPI/I2C communication, sensor interfacing, and data display.
- Hardware: STM32 NUCLEO board, LDR, MEMS accelerometer module
- Software: STM32CubeIDE, STM32 HAL Drivers
- Core Concepts:
- ADC with DMA
- Callback functions for real-time control
- Sensor interfacing (LDR, MEMS)
- Data visualization/logging
- Open each project folder in STM32CubeIDE.
- Connect STM32 NUCLEO board and relevant sensors (LDR or MEMS accelerometer).
- Flash the firmware and open a serial terminal if needed.
- Monitor behavior:
- Light sensitivity changes (LDR)
- Buffer callbacks for ADC (DMA)
- Motion readings from accelerometer