Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed
Revision 1:315a39beca2d, committed 2015-10-31
- Comitter:
- Peeraya
- Date:
- Sat Oct 31 05:53:52 2015 +0000
- Parent:
- 0:e0f62f153426
- Commit message:
- real complete;
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r e0f62f153426 -r 315a39beca2d main.cpp
--- a/main.cpp Sat Oct 31 05:21:28 2015 +0000
+++ b/main.cpp Sat Oct 31 05:53:52 2015 +0000
@@ -18,8 +18,7 @@
{
int ascidata1,realdata1,ascidata2,realdata2;
uint8_t data;
- int meas;
- float meas1;
+ float meas,meas1;
int state_show=0;
while(1)
@@ -76,13 +75,13 @@
if(realdata2==9){ss2d=1;ss2c=0;ss2b=0;ss2a=1;}
state_show = 0;
}
- }
-
- if(data=='2')
- {
+ if(data=='2')
+ {
meas = analog_value.read();
meas1 = meas*3.3;
- pc.printf("%f volt",meas1);
+ pc.printf("VR output : %.2f volt\n",meas1);
+ state_show = 0;
+ }
}
}