controllables.Vacuum

class controllables.Vacuum(port: Optional[int] = None)

Reference to a vacuum part.

If a Vacuum is assigned to port 0 in the properties tab of the microcontroller, then that vacuum can be access with Vacuum(0).

run(power: float = 1)

Runs the vacuum.

from controllables import Vacuum
import time

vacuum = Vacuum(0)

vacuum.run()

time.sleep(1)

vacuum.stop()
stop()

Stops running the vacuum.

Note

This doesn’t prevent transmitters or properties from running the vacuum.

from controllables import Vacuum
import time

vacuum = Vacuum(0)

vacuum.run()

time.sleep(1)

vacuum.stop()
property max_power: float

The max power property of the vacuum avaliable in the properties tab.

is_running() bool

Whether the vacuum is activated.

name() str

Returns the user editable name of the controllable as found in the properties tab of the game.

from ports import PortReference

print(PortReference(0).name())