48 lines
874 B
C
48 lines
874 B
C
/*
|
|
* main.c
|
|
*
|
|
* Created on: 11/gen/2014
|
|
* Author: topicchi
|
|
*/
|
|
#include <avr/io.h>
|
|
#include <util/delay.h>
|
|
#include "main.h"
|
|
#include "digole.h"
|
|
|
|
/* Main - Programma principale*/
|
|
int main (void) {
|
|
char *str = "* Love Silvia *";
|
|
const unsigned char bmp[]={0x7E, 0x81, 0xA5, 0x81, 0xA5, 0x99, 0x81, 0x7E};
|
|
unsigned char toggle;
|
|
|
|
DDRC |= BIT(PC0);
|
|
toggle=1;
|
|
|
|
OLED_Init();
|
|
_delay_ms(3000); // wait for a Display INIT
|
|
|
|
OLED_ShowSplashScreen(0x00);
|
|
OLED_Cls();
|
|
|
|
OLED_SetFont(10);
|
|
OLED_Write(str);
|
|
OLED_ShowCursor(1);
|
|
OLED_WriteXY(0,5,str);
|
|
|
|
OLED_DrawRect(50,55,57,62,0);
|
|
OLED_DrawRect(65,55,72,62,1);
|
|
|
|
OLED_DrawBmp(35,30,8,8,bmp);
|
|
OLED_DrawCircle(5,59,4,0);
|
|
OLED_DrawCircle(15,59,4,1);
|
|
OLED_DrawLine(0,53,127,53);
|
|
|
|
while(1) {
|
|
PORTC ^= 0b00000001;
|
|
_delay_ms(500);
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
|