Interface class for the Max Botix ultrasonic range finder model 1210. It includes input methods for PWM, Analog, and Serial. A PwmIn class was created to allow the PWM input to be read. Now includes automatic range update via interrupts.
PwmIn/PwmIn.h
- Committer:
- Blaze513
- Date:
- 2010-08-22
- Revision:
- 0:3d969e0b4ca0
- Child:
- 2:997b4057c879
File content as of revision 0:3d969e0b4ca0:
#ifndef PwmInLibrary #define PwmInLibrary #include "stdint.h" #include "mbed.h" class PwmIn : private InterruptIn, Timer { private: unsigned int PeriodMeasurement; unsigned int PulseWidthMeasurement; void PulseStart(); void PulseStop(); public: PwmIn(PinName pwi); float read(); float period(); int period_ms(); int period_us(); float pulsewidth(); int pulsewidth_ms(); int pulsewidth_us(); }; #endif