This project is a driver for interfacing LSM303AGR magnetic sensor with NRF52 microcontroller. The driver is designed to detect the proximity of a magnet to the sensor and trigger an event on state change. When a magnet is detected, the system receives an event and turns on LED 2. If no magnet is detected, the system turns on LED 0.
- Install Nordic required tools and IDE nrf_tools.
- Install nordic nrf5 sdk install_nrf5_sdk.
- Add the path of your nRF5 SDK to the '''NRF5_SDK''' environment variable.
- Nordic nRF52840DK or similar.
- LSM303AGR acceleration and magnetic sensor.
Connect LSM303AGR to the nRF52840DK as follows:
- LSM303AGR
SCLwith nRF52 GPIOP0.3. - LSM303AGR
SDAwith nRF52 GPIOP0.4. - LSM303AGR
INT_MAGwith nRF52 GPIOP0.5. - LSM303AGR
Vinwith nRF52VDD. - LSM303AGR
GNDwith nRF52GND.
The example project files are licensed under Nordic License