Output elapsed time to lcd
This commit is contained in:
parent
b5a3d68008
commit
903d8f020a
1 changed files with 13 additions and 7 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue