Steffen Rauleder
/
mbed-os-example-mbed5-blinky
lfb interrupt
Diff: 01Tasteninterrupt.cpp
- Revision:
- 0:f16b5c6f43ab
diff -r 000000000000 -r f16b5c6f43ab 01Tasteninterrupt.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/01Tasteninterrupt.cpp Wed Dec 15 10:15:08 2021 +0000 @@ -0,0 +1,35 @@ +#if 0 +/* mbed Microcontroller Library + * Copyright (c) 2019 ARM Limited + * SPDX-License-Identifier: Apache-2.0 + */ + +#include "mbed.h" +#include "platform/mbed_thread.h" +#include "LCD.h" + +// Blinking rate in milliseconds +#define BLINKING_RATE_MS 1000 + +DigitalOut statusled(PC_0); +lcd meinLCD; + + +int main() +{ + // Initialise the digital pin LED1 as an output + int zaehler=0; + DigitalOut led(LED1); + meinLCD.clear(); + meinLCD.cursorpos(0x40); + meinLCD.printf("Hallo Welt"); + + while (true) { + led = !led; + zaehler++; + meinLCD.cursorpos(0x00); + meinLCD.printf("Zaehler = %d ",zaehler); + thread_sleep_for(BLINKING_RATE_MS); + } +} +#endif