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.
Fork of LV4Z2 by
Revision 1:696ca0cb2f15, committed 2014-03-24
- Comitter:
- tim008
- Date:
- Mon Mar 24 08:35:00 2014 +0000
- Parent:
- 0:e7b37797a254
- Commit message:
- LV4-PAI-G1-Tim008
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r e7b37797a254 -r 696ca0cb2f15 main.cpp --- a/main.cpp Mon Mar 24 08:28:23 2014 +0000 +++ b/main.cpp Mon Mar 24 08:35:00 2014 +0000 @@ -65,20 +65,17 @@ int main() { - float max_volt=1.9; - float min_volt=0.7; + float max_volt=1.7; + float min_volt=0.71; float ratio=0; float diff_volt=max_volt-min_volt; float ain=input*3.3; int i=0; while(1) { if(i%100==0) - ain=input*3.3; - + ain=input*3.3; if(ain>=min_volt && ain<=max_volt) ratio=1-(ain-min_volt)/diff_volt; - else - ratio=0; displayValue(ratio*100); i++; }