Fábio Souza
/
KL46Z_EX4
Example 3 Hands on KL46
Fork of CPBR_KL46Z_EX4 by
Revision 1:0717f1ea2352, committed 2017-05-19
- Comitter:
- FBSEletronica
- Date:
- Fri May 19 21:07:36 2017 +0000
- Parent:
- 0:cc1610c8817f
- Commit message:
- Example 4 Hands on KL46
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r cc1610c8817f -r 0717f1ea2352 main.cpp --- a/main.cpp Tue Jan 31 19:13:04 2017 +0000 +++ b/main.cpp Fri May 19 21:07:36 2017 +0000 @@ -7,16 +7,15 @@ int main() { - int value = 0; - - - slcd.clear(); + int value = 0; + + slcd.clear(); //clear LCD while (true) { led = !led; // toggle led - slcd.printf("%04d", value); // print the heading (NED compass) to the LCD - value++; - if(value>1000) value = 0; - wait(0.2f); + slcd.printf("%04d", value); // print value on LCD + value++; //Value = Value+1 + if(value>100) value = 0; //if value passed 1K -> reset counter + wait(0.2); //wait 200 ms } } \ No newline at end of file