Skip to content

Search the documentation

Kit
Firmware

Gamepad

Smart Car

The Game Pad in the MoBot app on your phone, received over Bluetooth.

The Gamepad class is reached through this attribute of robot.

Always there.

All the attributes of robot are in its table.

How far the stick is pushed: -128 (left) to 127 (right), 0 in the middle.

x: int

Read only.

Used in examples: Name your robot, then drive it

How far the stick is pushed: -128 (down) to 127 (up), 0 in the middle.

y: int

Read only.

Used in examples: Name your robot, then drive it

True while that button is held: "a", "b", "x", "y", "up", "down", "left" or "right".

is_pressed(name) -> bool

Used in examples: Name your robot, then drive it

Every button at once, as a dict of name -> True while it is held.

buttons() -> Dict[str, bool]