vježba

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
jnovosel
Date:
Thu Nov 03 18:29:23 2016 +0000
Commit message:
VT1_novosel

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
diff -r 000000000000 -r 6c5ab92f9d12 main.cpp
--- /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);
+    }
+}
diff -r 000000000000 -r 6c5ab92f9d12 mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Thu Nov 03 18:29:23 2016 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/9bcdf88f62b0
\ No newline at end of file