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.
Diff: MB1210.h
- Revision:
- 3:05183e50a923
- Parent:
- 2:997b4057c879
- Child:
- 4:a615b75d4126
--- a/MB1210.h Mon Aug 23 07:11:10 2010 +0000 +++ b/MB1210.h Thu Aug 26 18:25:19 2010 +0000 @@ -50,8 +50,10 @@ //this tells the device to prepare a synchronous range reading; //must be called at least 99 ms before the reading is needed; //changes asynchronous mode to synchronous equivalent - void DiscardBuffer(); - //empties the buffer on the serial port to sync the next reading + void DiscardSerialBuffer(); + //the serial port has a buffer and only the oldest data is read from it; + //the buffer has limited space and, when full, the newest data is discarded; + //this method allows the user to empty the buffer of old data so new data is used float Read(); //get a reading from the device in the set mode; //RequestSyncRead() must be called at least 99 ms