Day 4 Starts Isme potentiometer ka float value dikhtai screen me

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
akashlal
Date:
Fri Jul 01 09:10:37 2016 +0000
Commit message:
na; ;

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
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Fri Jul 01 09:10:37 2016 +0000
@@ -0,0 +1,16 @@
+#include "mbed.h"
+
+Serial pc(USBTX,USBRX);
+AnalogIn pot(PTB0);
+
+float value;
+int main() 
+{
+    while(1) 
+    {
+        value=pot.read();
+        value=value*3.33;
+        pc.printf("Pot value = %f \n \r",value); //To print value of potentiometer into the terminal
+        wait(1.20);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Fri Jul 01 09:10:37 2016 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/6c34061e7c34
\ No newline at end of file