Fábio Souza
/
KL46Z_EX4
Example 3 Hands on KL46
Fork of CPBR_KL46Z_EX4 by
Diff: main.cpp
- Revision:
- 1:0717f1ea2352
- Parent:
- 0:cc1610c8817f
--- 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