Output elapsed time to lcd

This commit is contained in:
mandlm 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,7 +9,7 @@ extern "C" void __cxa_pure_virtual(void)
int main()
{
MyLcd lcd;
delay_ms(40);
delay_us(40e3);
lcd.initDisplay();
uint16_t counter = 0;
@ -19,9 +17,17 @@ int main()
while (true)
{
lcd.clear();
lcd.output(counter++);
lcd.output('s');
delay_ms(1000);
lcd.output(counter / 60);
lcd.output("m " );
lcd.output(counter % 60);
lcd.output("s");
++counter;
for (uint8_t i = 0; i < 20; ++i)
{
delay_us(50e3);
}
}
}