Ejemplo n.º 1
0
void print_sistime()
{
	char temp_answer [100];
	char temp_str [20];
	
	temp_answer[0]='\0';
	//Date format day:month:year
	strcat(temp_answer,"Sistem time: ");
	itoa(sistime.year,temp_str,10);
	strcat(temp_answer,temp_str);
	strcat(temp_answer,"/");
	itoa(sistime.month,temp_str,10);
	strcat(temp_answer,temp_str);
	strcat(temp_answer,"/");
	itoa(sistime.year,temp_str,10);
	strcat(temp_answer,temp_str);
	
	strcat(temp_answer,"#");
	itoa(sistime.hour,temp_str,10);
	strcat(temp_answer,temp_str);
	strcat(temp_answer,":");
	itoa(sistime.min,temp_str,10);
	strcat(temp_answer,temp_str);
	strcat(temp_answer,":");
	itoa(sistime.sec,temp_str,10);
	strcat(temp_answer,temp_str);
	
	strcat(temp_answer,"\r\n");
	
	USARTF0_send_string((char*)temp_answer);
}
Ejemplo n.º 2
0
void USARTF0_send_string_P(PGM_P progmem_string_pointer)
{
	char temp_string[100] = {'\0'};
	
	strcpy_P(temp_string, progmem_string_pointer);
	
	USARTF0_send_string(temp_string);
}
Ejemplo n.º 3
0
void USARTF0_print_float(float a)
{
	char temp_answer [20];
	char temp_str[20];
	
	temp_answer[0]='\0';
	dtostrf(a, 8, 4, temp_str);
	strcat(temp_answer,temp_str);
	strcat(temp_answer,"\n");

	USARTF0_send_string((char*)temp_answer);
}
Ejemplo n.º 4
0
void USARTF0_print_int(unsigned int a)
{
	char temp_answer [20];
	char temp_str[20];
	
	temp_answer[0]='\0';
	itoa(a, temp_str,10);
	strcat(temp_answer,temp_str);
	strcat(temp_answer,"\n");

	USARTF0_send_string((char*)temp_answer);
}
Ejemplo n.º 5
0
void USARTF0_send_one_character(char a)
{
	char temp_answer [4];
	char temp_str[4];
	
	temp_answer[0]='\0';
	itoa(a, temp_str,10);
	strcat(temp_answer,temp_str);
	strcat(temp_answer,"\r\n");

	USARTF0_send_string((char*)temp_answer);
}
Ejemplo n.º 6
0
void USARTF0_send_new_line()
{
	USARTF0_send_string("\n\r");
}