Table of Contents

Function Definition: setbrightness(brightness = 20)

Parameters

NameTypeDescriptionExpected ValuesDefault Value
brightnessintThe brightness value.0 to 10020

Description

The function sets the brightness of the RGB LED display matrix.

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