pyupm_tm1637 module

class pyupm_tm1637.TM1637(*args)[source]

Bases: object

API for the TM1637 7-Segment Display.

ID: tm1637

Name: 7-segment Display

Other Names: Grove 4-Digit Display

Category: display

Manufacturer: seeed

Link:http://wiki.seeed.cc/Grove-4-Digit_Display/

Connection: gpio TM1637 is a display controller for LED-based 7-segment displays. It can be used to address and write data to multiple display digits. This driver is based on the Grove version of the TM1637 display that uses 4 digits, thus making it ideal for clock displays, timers, counters, or even score displays in a two-player arcade game.

C++ includes: tm1637.hpp

NO = 0
YES = 1
setBrightness(value)[source]

void setBrightness(int value)

Controls the brightness of the display

value: Brightness, from 0 (darkest) to 7 (brightest)

setColon(value)[source]

void setColon(bool value)

Toggles the colon between digits on the display

value: True to turn the colon on, false to turn it off

write(d, digit1=0, digit2=0, digit3=0, digit4=0)[source]

mraa_result_t write(std::string digits)

Writes all the digits or letters to the display as a string

digits: String of symbols to display

0 if successful, error code otherwise

writeArray(digits)[source]

mraa_result_t write(std::string digits)

Writes all the digits or letters to the display as a string

digits: String of symbols to display

0 if successful, error code otherwise

writeAt(index, symbol)[source]

mraa_result_t writeAt(int index, char symbol)

Writes a symbol (digit or letter) to the display in a specified index

index: 0-based index of the digit to change from the left

symbol: Digit or letter to display

0 if successful, error code otherwise

writeString(digits)[source]

mraa_result_t write(std::string digits)

Writes all the digits or letters to the display as a string

digits: String of symbols to display

0 if successful, error code otherwise

class pyupm_tm1637.uint8Array(nelements)[source]

Bases: object

cast()[source]
static frompointer()