Output elapsed time to lcd

This commit is contained in:
Michael Mandl 2017-03-02 08:19:00 +01:00
parent b5a3d68008
commit 903d8f020a

View file

@ -1,8 +1,6 @@
#include "Hardware.h"
#include "MyLcd.h"
#include <avr/io.h>
extern "C" void __cxa_pure_virtual(void)
{
@ -11,17 +9,25 @@ extern "C" void __cxa_pure_virtual(void)
int main()
{
MyLcd lcd;
delay_ms(40);
delay_us(40e3);
lcd.initDisplay();
uint16_t counter = 0;
while (true)
{
lcd.clear();
lcd.output(counter++);
lcd.output('s');
lcd.clear();
lcd.output(counter / 60);
lcd.output("m " );
lcd.output(counter % 60);
lcd.output("s");
delay_ms(1000);
++counter;
for (uint8_t i = 0; i < 20; ++i)
{
delay_us(50e3);
}
}
}