Tummas Tomasson / Mbed 2 deprecated PingDetector_mbedadc

Dependencies:   mbed

Committer:
tummastt
Date:
Mon Jul 30 09:57:42 2012 +0000
Revision:
0:efb27fbc92c0
Child:
1:227db871d328
Working

Who changed what in which revision?

UserRevisionLine numberNew contents of line
tummastt 0:efb27fbc92c0 1 /*
tummastt 0:efb27fbc92c0 2
tummastt 0:efb27fbc92c0 3 */
tummastt 0:efb27fbc92c0 4
tummastt 0:efb27fbc92c0 5 #ifndef PARAMETERS_H
tummastt 0:efb27fbc92c0 6 #define PARAMETERS_H
tummastt 0:efb27fbc92c0 7
tummastt 0:efb27fbc92c0 8 // used by main and PingDetect class
tummastt 0:efb27fbc92c0 9 enum {stop=0, start, calcFFT, doNothing};
tummastt 0:efb27fbc92c0 10
tummastt 0:efb27fbc92c0 11 // used by FFT class
tummastt 0:efb27fbc92c0 12 enum {notFound, found};
tummastt 0:efb27fbc92c0 13
tummastt 0:efb27fbc92c0 14 //-------------------------------
tummastt 0:efb27fbc92c0 15 // Used for FFT class
tummastt 0:efb27fbc92c0 16 #define SAMPLES 256 // Number of points used for FFT
tummastt 0:efb27fbc92c0 17 #define FREQ 15000 // Frequency in Hz of pinger
tummastt 0:efb27fbc92c0 18 #define AMPLITUDE_LIMIT 35 // amplitude limit for detection
tummastt 0:efb27fbc92c0 19 #define SAMPLE_RATE 60500 // Sampling frequency
tummastt 0:efb27fbc92c0 20 #define DCOFFSET 2048 // Binary offset voltage
tummastt 0:efb27fbc92c0 21
tummastt 0:efb27fbc92c0 22
tummastt 0:efb27fbc92c0 23 //-------------------------------
tummastt 0:efb27fbc92c0 24 // Used for ADC class
tummastt 0:efb27fbc92c0 25 #define TIME 120 // time in ms
tummastt 0:efb27fbc92c0 26
tummastt 0:efb27fbc92c0 27 //-------------------------------
tummastt 0:efb27fbc92c0 28 // Used for PingDetect class
tummastt 0:efb27fbc92c0 29 #define TIME_OFFSET 70
tummastt 0:efb27fbc92c0 30 #define mbedSAMPLE_RATE 187500
tummastt 0:efb27fbc92c0 31 #define BAUD 921600
tummastt 0:efb27fbc92c0 32 #define NO_OF_FFT 1000
tummastt 0:efb27fbc92c0 33
tummastt 0:efb27fbc92c0 34 //-------------------------------
tummastt 0:efb27fbc92c0 35 // used by main
tummastt 0:efb27fbc92c0 36 #define PING_PERIOD 1000
tummastt 0:efb27fbc92c0 37
tummastt 0:efb27fbc92c0 38 #endif