AnalogIn - use median of the sampling data for stabler input value

Dependencies:   mbed

Revision:
0:bbe67df5e586
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/AnalogIn2.h	Mon Jun 20 10:47:02 2011 +0000
@@ -0,0 +1,18 @@
+#ifndef MBED_ANALOG_IN2
+#define MBED_ANALOG_IN2
+
+#include "mbed.h"
+
+class AnalogIn2 {
+public:
+    AnalogIn2(PinName pinName);
+    float read(int nSamples = 10);
+    unsigned short read_u16(int nSamples = 10);
+    operator float();
+    
+private:
+    PinName pinName;
+    int channel;
+};
+
+#endif
\ No newline at end of file