Handle LoRa Basic Function
Diff: ADC.h
- Revision:
- 0:f8af47d9f0cd
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ADC.h Wed Mar 08 18:54:32 2017 +0000 @@ -0,0 +1,24 @@ +#ifndef _ADC_H +#define _ADC_H + +#include "mbed.h" +#include "mDot.h" + + +class ADC_class +{ +private: + int movBits; + int ADCwaitTime; + unsigned short adcDistance; + // AnalogIn Distance(); + + bool init(); +public: + ADC_class(){init();} + unsigned short sample(); + unsigned short read_ADC(){return adcDistance;} + bool sample_and_judge_result(unsigned short threshold); +}; + +#endif \ No newline at end of file