_api – user API¶
This module contains most of the API functions that you’re meant to call to operate the system as a user. The module itself is actually a backend to modules mindstorms – Mindstorms branding of the user API and spike – Spike Prime branding of the user API, which are nearly identical and seem to exist mainly in order to correctly brand the Hub in documentation (i.e. so that Mindstorms docs can tell you to import mindstorms, and Spike Prime docs can tell you to import spike).
One interesting note is that submodule large_technic_hub only seems to
appear in this module after you’ve imported either mindstorms – Mindstorms branding of the user API or spike – Spike Prime branding of the user API, so
it’s probably better to just use one of those unless you have very odd
requirements.
All of the classes within the submodules (except LargeTechnicHub) are aliased in the main namespace for convenience.
Submodules¶
_api.distancesensor– distance sensor functions API_api.forcesensor– force sensor functions API_api.colorsensor– color sensor functions API_api.motionsensor– motion sensor functions API_api.statuslight– status light functions API_api.motor– motor functions API_api.button– button functions API_api.motorpair– paired motor functions API_api.lightmatrix– 5x5 display functions API_api.util– utility functions for the API code_api.speaker– speaker functions API_api.app– application functions API_api.large_technic_hub– central hub API