showText(self,
text,
pos=0,
dp=[ 0, 0, 0, 0] )
| source code
|
Displays 4 characters of the given text. The text is considered to be
prefixed and postfixed by spaces and the 4 character window is selected
by the text pointer pos that determines the character displayed at the
leftmost digit, e.g. (_: empty): showText("AbCdEF") -> AbCd
showText("AbCdEF", 1) -> bCdE showText("AbCdEF",
-1) ->_AbC showText("AbCdEF", 4) -> EF__ To display a
character and its decimal point, use the dp parameter [most right
dp,...,most left dp] and set the decimal point values to 1. Because the
4tronix display is multiplexed (one digit shown after the other, a
display thread is started now to display all 4 digits in a rapid
succession (if it is not yet started).
- Parameters:
text - the text to display (list, tuple, string or integer)
pos - the start value of the text pointer (character index positioned a
leftmost digit)
dp - a list with four 1 or 0, if the decimal point is shown or not
- Returns:
- True, if successful; False, if the display is not available, text
or dp has illegal type or one of the characters can't be
displayed
|