Skip to content

Search the documentation

Kit
Firmware

Led

Mini

One of the robot’s lights (led1 or led2); brightness is in percent, 0 to 100.

The Led class is reached through these attributes of robot.

Can be None.

Can be None.

All the attributes of robot are in its table. Read Attributes that can be None to see when a part is None.

Turns the light on at full brightness.

on()

Used in examples: Drive the Mini, Mini eyes

Turns the light off.

off()

Used in examples: Drive the Mini, Jukebox

Turns the light off if it is on, and on if it is off.

toggle()

Used in examples: Jukebox

Turns the light on for True (or 1) and off for False (or 0).

set(on)

Sets how bright the light is, from 0 (off) to 100 percent.

set_brightness(percent)