Fábio Souza
/
KL46Z_EX4
Example 3 Hands on KL46
Fork of CPBR_KL46Z_EX4 by
Diff: main.cpp
- Revision:
- 0:cc1610c8817f
- Child:
- 1:0717f1ea2352
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Tue Jan 31 19:13:04 2017 +0000 @@ -0,0 +1,22 @@ +#include "mbed.h" +#include "SLCD.h" + +SLCD slcd; + +DigitalOut led(LED_RED); + +int main() +{ + int value = 0; + + + slcd.clear(); + + 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); + } +} \ No newline at end of file