vježba

Dependencies:   mbed

Revision:
0:6c5ab92f9d12
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Thu Nov 03 18:29:23 2016 +0000
@@ -0,0 +1,14 @@
+//Reads input through the ADC, and transfers to PC terminal
+#include "mbed.h"
+Serial pc(USBTX, USBRX);
+AnalogIn Ain(p20);
+float ADCdata;
+int main()
+{
+    pc.printf("ADC Data Values... \n\r");
+    while (1) {
+        ADCdata=Ain*3.3;
+        pc.printf("Ulazni napon = %.2f V\n\r",ADCdata);
+        wait (0.5);
+    }
+}