예제 #1
0
// Write characters
void display_text(char text[], int row)
{
	int size = arraySize(text);
	if(size > 16)
	{
		for(int index = 1; index < 3; index++)
		{
			lcd_setLine(index);
			for (int i = 0; i < 16; i++)
			{
				lcd_writeChar((unsigned char)text[i]);
			}
		}
	}
	else
	{
		lcd_setLine(row);
		for (int i = 0; i < 16; i++) {
			lcd_writeChar(text[i]);
		}
	}




}
예제 #2
0
void display_text(char *str)
{
	lcd_command(0x80);
	for (int i=0; i< strlen(str); i++)
	{
		lcd_writeChar( str[i] );
	}
}
예제 #3
0
 void lcd_writeLine( char text[], int line)
 {
	 // eerst de eerste 8 karakters = regel 1
	 // eerste pos regel 1
	 if(line == 2)
	 {
		 lcd_command(0xC0);
			for (int i=0; i < strlen(text); i++) {
			 lcd_writeChar( text[i] );
			}
	 }
	 else
	 {
	 	 lcd_command(0x80);
	 	 for (int i=0; i < strlen(text); i++) {
		 	 lcd_writeChar( text[i] );
	 	 }
	 }
 }
예제 #4
0
void display_text(char *str)
{
	//Display an array of chars on the LCD
	
	//lcd_command(0x80);  <-- would clear the screen before writing again
	for (int i=0; i< strlen(str); i++)
	{
		lcd_writeChar( str[i] );
	}
	
}