Visweswara R
/
Arch_Analog_POT
Seeedstudio Arch Examples : Analog - Potentiometer example
Revision 1:f81ab0473843, committed 2013-10-07
- Comitter:
- viswesr
- Date:
- Mon Oct 07 12:30:57 2013 +0000
- Parent:
- 0:b1a8b240b3a2
- Commit message:
- Minor changes
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r b1a8b240b3a2 -r f81ab0473843 main.cpp --- a/main.cpp Mon Oct 07 05:36:52 2013 +0000 +++ b/main.cpp Mon Oct 07 12:30:57 2013 +0000 @@ -5,13 +5,13 @@ int main() { - float ain; + float ain; /* Variable to store the analog input*/ while(1) { ain = pot.read(); /* Read analog value (output will be any value between 0 and 1 */ - led = 1; /* Switch ON LED */ - wait(ain); /* Wait for ain Seconds (maximum delay is 1 seconds)*/ - led = 0; /* Switch Off LED */ - wait(ain); /* Wait for ain Seconds (maximum delay is 1 seconds)*/ + led = 1; /* Switch ON LED */ + wait(ain); /* Wait for 'ain' Seconds (maximum delay is 1 seconds)*/ + led = 0; /* Switch Off LED */ + wait(ain); /* Wait for 'ain' Seconds (maximum delay is 1 seconds)*/ } }