#include #include #include #include /**** Initialize the USART ****/ void USART_Init(){ // constants for different baud rates and behaviours UCSR0B = (1<= 0xC0 && head <= 0xCF){ // ignore = 1; } else if(head >= 0xB0 && head <= 0xBF){ middle = read_byte(); if(middle == 0x00 || middle == 0x20){ // ignore = 1; } else { end = read_byte(); ignore = 0; } } else if(head >= 0x80) { middle = read_byte(); end = read_byte(); ignore = 0; } } command[0] = head; command[1] = middle; command[2] = end; } void sendCmd(unsigned char * nextCmd){ unsigned int byteCtr = 0; while(byteCtr < 3){ send_byte(nextCmd[byteCtr++]); } } int main() { DDRB=0xFF; delay(1000); return 0; }