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/main.cpp	Mon Jun 20 10:47:02 2011 +0000
@@ -0,0 +1,12 @@
+#include "mbed.h"
+#include "AnalogIn2.h"
+
+AnalogIn2 a20(p20);
+AnalogIn2 a15(p15);
+
+int main() {
+    printf("Temperature AnalogIn2 test\n");
+    printf("a15 %d, %f\n", a15.read_u16(), (3.3 * a15.read() - 0.424) / 0.00625);
+    printf("a20 %d, %f\n", a20.read_u16(100), (3.3 * a20.read(100) - 0.424) / 0.00625);
+    wait(1);
+}
\ No newline at end of file