python - clearing a serial display when newline characters are ignored -


i looking way clear serial display , write @ beginning using python , pyserial. problem is, diplay ignores line feeds , carriage returns. 2-line display 16 characters in each line. text appended @ end, , once, first line full, jumps second line this:

+------------------+ |                  | | loremipsumdolors | | itamet__________ | |                  | +------------------+ 

(note, replaced spaces underscores make understanding easier)
when display full characters, emptied , rest of text written this:

+------------------+ |                  | | dolorsitamet____ | | ________________ | |                  | +------------------+ 

my code:

import serial  ser = serial.serial("/dev/ttys1") ser.write("some text\r\n") 

is there way empty , write beginning, similiar carriage return?

that depends on display's capabilities, there no common standard. datasheet of display should include list of control codes understood. might try ff \f clear, might limited ansi escape sequence. have y here. there hope: quite unlikely not possible.

for testing, can leave python interpreter in interactive (cli) mode after program run (python -i <program_file>). way can play connection interactively.


Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -