Isme plot hotai LDR aur POT ka value, wrt time serial plotter ke graph me. Baud rate 9600 select karneka aur axes 2 select karna mat bhulna
Dependencies: mbed
Revision 1:3151bf0df238, committed 2016-07-01
- Comitter:
- akashlal
- Date:
- Fri Jul 01 09:22:06 2016 +0000
- Parent:
- 0:709cf4309909
- Commit message:
- na
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Fri Jul 01 09:21:15 2016 +0000 +++ b/main.cpp Fri Jul 01 09:22:06 2016 +0000 @@ -4,10 +4,10 @@ AnalogIn pot(PTB0); AnalogIn ldr(PTB1); //This progeram is to be submitted for report 02 -float potf; //Declaring float value for Potentiometer reading -int poti; //Declaring int value for Potentiometer reading -float ldrf; //Declaring float value for LDR reading -int ldri; //Declaring Integer value for LDR reading +float potf; +int poti; +float ldrf; +int ldri; int main() { @@ -17,7 +17,7 @@ ldri=ldrf*1000; potf=pot.read(); poti=potf*1000; - pc.printf("$%d %d;",poti,ldri); //Printing value of LDR and Pot Float value. + pc.printf("$%d %d;",poti,ldri); pc.printf("\n \r"); } }