/*
 * v_1_1.c
 *
 * Created: 4.3.2015 11:03:34
 *  Author: Matej
 */ 


#define F_CPU 8000000UL
#include <avr/io.h>
#include <stdlib.h>
#include <util/delay.h>
#include <avr/interrupt.h>
#include <string.h>
#include "matrix.h"
#include "global.h"

unsigned int gX;
unsigned int gY;
unsigned char gColour; //0xFF => vypisujeme žltou, 0x00 =>vypisujeme čiernou
struct command gCmd;
unsigned char gOriginal[3][140];
unsigned char gReciveBuffer[8];
unsigned char gTransmitBuffer[8];

int main(void)
{
	initPort();
	initGlobal();
	clearAll();
	clearArray(gOriginal);
	
	setSensorData();
	writePicture();
			
	PORTC |= LED2;
	
	while(1)
    {
       PORTC |= LED1;
	}
}