2015-08-31 22:23:34 +03:00
|
|
|
#include <SPI.h>
|
2021-03-19 17:37:37 +01:00
|
|
|
#include <MAX7456.h>
|
2015-08-31 22:23:34 +03:00
|
|
|
|
2021-03-19 17:37:37 +01:00
|
|
|
MAX7456 osd;
|
2015-08-31 22:23:34 +03:00
|
|
|
unsigned long counter = 0;
|
2021-03-19 18:07:21 +01:00
|
|
|
byte tab[]={0xED,0xEE, 0xEF, 0xF3};
|
2015-08-31 22:23:34 +03:00
|
|
|
|
|
|
|
void setup()
|
|
|
|
{
|
|
|
|
SPI.begin();
|
|
|
|
|
2021-03-19 17:37:37 +01:00
|
|
|
osd.init(6);
|
2015-08-31 22:23:34 +03:00
|
|
|
osd.setDisplayOffsets(60,18);
|
2021-03-19 18:07:21 +01:00
|
|
|
osd.setBlinkParams(_8fields, _3BT_BT);
|
2015-08-31 22:23:34 +03:00
|
|
|
|
|
|
|
osd.activateOSD();
|
2021-03-19 18:07:21 +01:00
|
|
|
osd.printMAX7456Char(0x12,0,1);
|
2015-08-31 22:23:34 +03:00
|
|
|
osd.print("Hello world :)",1,3);
|
2021-03-19 18:07:21 +01:00
|
|
|
osd.print("Current time :",1,4);
|
2015-08-31 22:23:34 +03:00
|
|
|
|
2021-03-19 18:07:21 +01:00
|
|
|
osd.printMAX7456Char(0xFB,9,6,true);
|
2015-08-31 22:23:34 +03:00
|
|
|
osd.print("00'00\"",10,6);
|
2021-03-19 18:22:04 +01:00
|
|
|
osd.printMAX7456Chars(tab,sizeof(tab),12,1);
|
2015-08-31 22:23:34 +03:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void loop()
|
|
|
|
{
|
|
|
|
counter = millis()/1000;
|
|
|
|
|
|
|
|
osd.print(int(counter/60),10,6,2,0,false,true);
|
|
|
|
osd.print(int(counter%60),13,6,2,0,false,true);
|
|
|
|
|
|
|
|
delay(100);
|
|
|
|
}
|