Skip to content

Latest commit

 

History

9 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Proximity Sensor

Description

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.

Getting Started

  1. Install Nordic required tools and IDE nrf_tools.
  2. Install nordic nrf5 sdk install_nrf5_sdk.
  3. Add the path of your nRF5 SDK to the '''NRF5_SDK''' environment variable.

Requirements

  1. Nordic nRF52840DK or similar.
  2. LSM303AGR acceleration and magnetic sensor.

Wiring

Connect LSM303AGR to the nRF52840DK as follows:

  • LSM303AGR SCL with nRF52 GPIO P0.3.
  • LSM303AGR SDA with nRF52 GPIO P0.4.
  • LSM303AGR INT_MAG with nRF52 GPIO P0.5.
  • LSM303AGR Vin with nRF52 VDD.
  • LSM303AGR GND with nRF52 GND.

Reference

  1. LSM303AGR datasheet
  2. LSM303 Pinout

License

MIT

The example project files are licensed under Nordic License

About

Driver for interfacing LSM303AGR magnetic sensor with NRF52 microcontroller.

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors