onaralili / pothole-detector

Simple example of pothole detection on the roads 🛣 using accelerometer on X-NUCLEO-IKS01A2, board NUCLEO-F401RE and mbed OS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

This simple example demonstares pothole detection using accelerometer and free-fall interrupt. Date and time is also displayed using real-time clock.

The project is forked from mbed os examples and modified.

Used board and sensor

The application uses X-NUCLEO-IKS01A2's built-in LSM6DSL accelerometer sensor on top of the NUCLEO-F401RE board.

Dependencies

The example uses The official mbed C/C++ SDK and the library for X-NUCLEO-IKS01A2 (MEMS Inertial & Environmental Sensors) Expansion Board.

Build

The easiest way is to use online IDE provided by Mbed : https://os.mbed.com/. After creating account for the online IDE on the website follow following steps:

  1. Create a new file main.cpp and copy the code from here to the new created main.cpp
  2. Add above dependecies
  3. Use Compile menu to build and download the binary file (automatically started)
  4. Connect your device
  5. Drag and drop the downloaded binary file to the device
  6. Use terminal tools such as CoolTerm to the connect serial port

Notes

The real-time clock is using unix time, you can convert time to the unix time using this website and set the time to desired time by changing following value set_time(1524497278); on the main.cpp file

References

https://os.mbed.com/teams/ST/code/FreeFall_IKS01A2/file/3aa150c1a624/X_NUCLEO_IKS01A2.lib/

About

Simple example of pothole detection on the roads 🛣 using accelerometer on X-NUCLEO-IKS01A2, board NUCLEO-F401RE and mbed OS


Languages

Language:C++ 100.0%