Table of Contents

Function Definition: showtext(character = "A", color = [0, 0 , 0])

Parameters

NameTypeDescriptionExpected ValuesDefault Value
charactercharacterThe character which needs to be displayed.Charater of A to Z, a to z or 0 - 9"A"
colorlistThe color list with following values R - 0-255, G - 0-255, and B - 0-255[R, G, B][0, 0 , 0]

Description

The function sets the RGB LED display matrix to display the specified character.

Example

The example displays how we can display a custom pattern on the matrix by making a script to display a Traffic Light in the Python Coding Environment.

Code

sprite = Sprite('Tobi')
quarky=Quarky()

import time

quarky.setbrightness(15)

while True:
	quarky.drawpattern("bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb")
	time.sleep(5)
	quarky.showtext("2", [255,233,0])
	time.sleep(1)
	quarky.showtext("1", [255,233,0])
	time.sleep(1)
	quarky.drawpattern("ccccccccccccccccccccccccccccccccccc")
	time.sleep(5)
	quarky.showtext("2", [255,233,0])
	time.sleep(1)
	quarky.showtext("1", [255,233,0])
	time.sleep(1)

Output

Read More
All articles loaded
No more articles to load