Trees | Indices | Help |
---|
|
Abstraction of the 4 digit 7-segment display PyTell from Didel (http://www.didel.com) attached to the I2C port. If no display is found, all display methods return immediately. The static variable SharedConstants.PATTERN defines a dictionary that maps ASCII characters to display patterns and can be modified by the user program. Default: The 7 segments have the following binary weights 1 - 32 | |2 64 - 16 | |4 - 8 The decimal points has weight 128.
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|
|||
DEBUG = False
|
|||
VERSION = "1.01 - April 2016" Character to binary value mapping for 4 digit 7 segment display |
|||
PATTERN = {' ': 0, '!': 134, '"': 34, '#': 0, '$': 0, '%': 0,
|
|
Returns a string with all displayable characters taken from PATTERN dictionary.
|
Returns a string with hex digits from given number (>0, any size).
|
Returns a list of four byte values [byte#24-#31, byte#16-#23, byte#8-#15, byte#0-#7] of given integer.
|
Returns an integer from given hex string
|
Creates a display instance with display set to given i2c address (default: 0x20). Then the display is cleared.
|
Returns the Id number of the display (default: 0xA0).
|
Send the I2C address without a command and returns the byte received.
|
Sends a command and returns the block of data received.
|
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__
|
Scrolls the current text one step to the left by increasing the text pointer.
|
Scrolls the current text one step to the left by decreasing the text pointer.
|
Shows the scrollable text at the start position by setting the text pointer to its start value.
|
Shows a ticker text that scroll to the left until the last 4 characters are displayed. The method blocks until the ticker thread is successfully started and isTickerAlive() returns True.
|
Stops a running ticker. The method blocks until the ticker thread is finished and isTickerAlive() returns False. |
|
Shows a ticker text that scroll to the left until the last 4 characters are displayed. The method blocks until the ticker thread is successfully started and isTickerAlive() returns True.
|
Stops a running blinker. The method blocks until the blinker thread is finished and isBlinkerAlive() returns False. |
|
Displays current version. Format X (three horz bars) + n.nn |
Check if device is available.
|
|
PATTERN
|
Trees | Indices | Help |
---|
Generated by Epydoc 3.0.1 on Sun Apr 16 12:46:33 2017 | http://epydoc.sourceforge.net |