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

Dependencies:   HC_SR04_Ultrasonic_Library PinDetect

radar.h

Committer:
vhx
Date:
2018-06-29
Revision:
1:b4179d7a5f2c
Parent:
0:23a36e52a5fa

File content as of revision 1:b4179d7a5f2c:

#ifndef _RADAR_H_
#define _RADAR_H_
// must import HC_SR04_Ultrasonic_Library
// https://os.mbed.com/components/HC-SR04/
#include <ultrasonic.h>

/* Range enum */
enum {
    RANGE_NONE=0,
    RANGE_FAR,
    RANGE_MID,
    RANGE_CLOSE,
    RANGE_MAX
 };

extern void radar(void); 


/* Globals */
 // Global position variable
extern int volatile position;
//Set the trigger pin to PC_8 and the echo pin to PC_6
//have updates every .1 seconds and a timeout after 1
//second, and call dist when the distance changes
extern ultrasonic mu;

extern DigitalOut led1;
extern DigitalOut led2;
extern DigitalOut led3;

#endif //_RADAR_H_