diff --git a/demo1.py b/demo1.py new file mode 100755 index 0000000..2821998 --- /dev/null +++ b/demo1.py @@ -0,0 +1,29 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +import pertelian, time + +display = pertelian.Display("/dev/ttyUSB1") + +display.clear() + +display.lcdprintln("BOXTEC PERTELIAN LIB boxtec pertelian lib") +display.lcdprintln("BOXTEC PERTELIAN LIB") +display.lcdprintln("BOXTEC PERTELIAN LIB") +display.lcdprintln("BOXTEC PERTELIAN LIB") +display.lcdscroll() + +time.sleep(3) + +display.clear() +test_string = "Welcome to my X2040" +for i in range(0,len(test_string)): + display.lcdcursor_set(2,i) + display.lcdprint(test_string[i]) + time.sleep(0.1) + +for i in range(0,5): + display.backlight(True) + time.sleep(0.3) + display.backlight(False) + time.sleep(0.25) \ No newline at end of file diff --git a/pertelian.py b/pertelian.py index 0903be1..679e07b 100755 --- a/pertelian.py +++ b/pertelian.py @@ -37,7 +37,7 @@ __author__ = "boxtec (src@boxtec.ch)" __appname__ = "pertelian.py" __version__ = "1.00" -__date__ = "2019-04-07" +__date__ = "2019-04-17" __license__ = "BSD" """ @@ -69,11 +69,6 @@ class Display(): self.backlight(True) self.enable() - self.lcdprintln("BOXTEC PERTELIAN LIB boxtec pertelian lib") - self.lcdprintln("BOXTEC PERTELIAN LIB") - self.lcdprintln("BOXTEC PERTELIAN LIB") - self.lcdprintln("BOXTEC PERTELIAN LIB") - self.lcdscroll() def __del__(self): self._sp.close() diff --git a/pertelian.pyc b/pertelian.pyc new file mode 100644 index 0000000..8e0f476 Binary files /dev/null and b/pertelian.pyc differ