#NEWLINE# def setText( text ) : #NEWLINE# #INDENT# textCommand ( 1 ) #NEWLINE# time . sleep ( 0.05 ) #NEWLINE# textCommand ( ( 8 | 4 ) ) #NEWLINE# textCommand ( 40 ) #NEWLINE# time . sleep ( 0.05 ) #NEWLINE# count = 0 #NEWLINE# row = 0 #NEWLINE# for c in text : #NEWLINE# #INDENT# if ( ( c == '\n' ) or ( count == 16 ) ) : #NEWLINE# #INDENT# count = 0 #NEWLINE# row += 1 #NEWLINE# if ( row == 2 ) : #NEWLINE# #INDENT# break #NEWLINE# #UNINDENT# textCommand ( 192 ) #NEWLINE# if ( c == '\n' ) : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# #UNINDENT# count += 1 #NEWLINE# bus . write_byte_data ( DISPLAY_TEXT_ADDR , 64 , ord ( c ) )