STM32 Nucleo F207Z ultrasonic radar. TODO: send the data over the net

Dependencies:   HC_SR04_Ultrasonic_Library PinDetect

Committer:
vhx
Date:
Fri Jun 29 08:52:41 2018 +0000
Revision:
1:b4179d7a5f2c
Parent:
0:23a36e52a5fa
Envoi d'une donn?e

Who changed what in which revision?

UserRevisionLine numberNew contents of line
vhx 0:23a36e52a5fa 1 #include "radar.h"
vhx 0:23a36e52a5fa 2 // Callback routine is interrupt activated by a debounced pb hit
vhx 1:b4179d7a5f2c 3 // must import Cookbook PinDetct library into project
vhx 1:b4179d7a5f2c 4 // URL: http://mbed.org/users/AjK/libraries/PinDetect/lkyxpw
vhx 1:b4179d7a5f2c 5 #include "PinDetect.h"
vhx 0:23a36e52a5fa 6
vhx 0:23a36e52a5fa 7 void pb_hit_callback (void) {
vhx 0:23a36e52a5fa 8 position++;
vhx 0:23a36e52a5fa 9 position = position % RANGE_MAX;
vhx 0:23a36e52a5fa 10 led3 = (position >= RANGE_CLOSE);
vhx 0:23a36e52a5fa 11 led2 = (position >= RANGE_MID);
vhx 0:23a36e52a5fa 12 led1 = (position >= RANGE_FAR);
vhx 0:23a36e52a5fa 13 }