This repository has been archived on 2024-12-15. You can view files and clone it, but cannot push or open issues or pull requests.
Distancer/Distancer.cpp

34 lines
395 B
C++
Raw Permalink Normal View History

2017-02-24 20:48:01 +00:00
#include "Hardware.h"
#include "MyLcd.h"
2017-02-19 14:04:43 +00:00
2017-02-24 20:48:01 +00:00
extern "C" void __cxa_pure_virtual(void)
2017-02-19 14:04:43 +00:00
{
2017-02-24 20:48:01 +00:00
2017-02-19 14:04:43 +00:00
}
2017-02-19 11:56:01 +00:00
int main()
{
2017-02-24 20:48:01 +00:00
MyLcd lcd;
2017-03-02 07:19:00 +00:00
delay_us(40e3);
2017-02-24 20:48:01 +00:00
lcd.initDisplay();
uint16_t counter = 0;
2017-02-19 14:04:43 +00:00
2017-02-19 11:56:01 +00:00
while (true)
{
2017-03-02 07:19:00 +00:00
lcd.clear();
lcd.output(counter / 60);
lcd.output("m " );
lcd.output(counter % 60);
lcd.output("s");
2017-03-02 07:19:00 +00:00
++counter;
for (uint8_t i = 0; i < 20; ++i)
{
delay_us(50e3);
}
2017-02-19 11:56:01 +00:00
}
}