ECE595 - Lab 3 Part 3 - Analog2Digital - TA

Revision:
0:f61eba51d14a
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Sun Feb 06 02:01:18 2022 +0000
@@ -0,0 +1,15 @@
+#include "mbed.h"
+AnalogIn AnIn(A0);
+DigitalOut led(LED1);
+Serial pc(USBTX,USBRX);
+float x;
+int main()
+{
+    pc.printf(" ADC demo code\r\n");
+    while (1)
+    {
+        x=AnIn.read();
+        pc.printf("ADC0_Ch12=(%d)\r\n", x);
+        wait(.2);
+    }
+}
\ No newline at end of file