Skip to content

Commit

Permalink
#32 Adding comments if this project needs to be used with DotBot boar…
Browse files Browse the repository at this point in the history
…d. This project calls the US driver, initializes US and starts the ranging implemented using PPI. The value of the ECHO pin from the US sensor is passed to a callback us_callback in the us_reading parameter.
  • Loading branch information
trifuns authored and aabadie committed Jun 23, 2022
1 parent a614a98 commit d80b85b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions projects/01bsp_us_ranging/01bsp_us_ranging.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
/**
* @file 01bsp_us_ranging.c
* @author Trifun Savic <[email protected]>
*
* @brief This is a short example of how to do Ultrasound ranging with HC-SR04 sensor on the DotBot board.
* This code currently works on nRF52840. To use the code on DotBot you need to define different GPIO for US sensor ON and READ pin (trigger and echo) in hc_sr04.c
*
* @copyright Inria, 2022
*
Expand Down Expand Up @@ -38,6 +40,9 @@ int main(void) {
timer0 = NRF_TIMER0;
timer1 = NRF_TIMER1;

// uncomment if using this code on DotBot Turn ON the DotBot board regulator
//db_board_init();

// initilize the US sensor, set callback and chose the timers
us_init(&us_callback, &timer_callback, timer0, timer1);

Expand Down

0 comments on commit d80b85b

Please sign in to comment.