OnBoardIO

class romi.OnBoardIO(dio1: romi._romi.OnBoardIO.ChannelMode, dio2: romi._romi.OnBoardIO.ChannelMode)

Bases: pybind11_object

This class represents the onboard IO of the Romi reference robot. This includes the pushbuttons and LEDs.

DIO 0 - Button A (input only) DIO 1 - Button B (input) or Green LED (output) DIO 2 - Button C (input) or Red LED (output) DIO 3 - Yellow LED (output only)

class ChannelMode(value: SupportsInt | SupportsIndex)

Bases: pybind11_object

Mode for Romi onboard IO

Members:

INPUT : Input

OUTPUT : Output

INPUT = <ChannelMode.INPUT: 0>
OUTPUT = <ChannelMode.OUTPUT: 1>
OnBoardIO.ChannelMode.name -> str
property value
MESSAGE_INTERVAL = 1.0
static allocate_pwm(channel: SupportsInt | SupportsIndex) None

Allocates a PWM output.

get_button_a_pressed() bool

Gets if the A button is pressed.

get_button_b_pressed() bool

Gets if the B button is pressed.

get_button_c_pressed() bool

Gets if the C button is pressed.

set_green_led(value: bool) None

Sets the green LED.

set_red_led(value: bool) None

Sets the red LED.

set_yellow_led(value: bool) None

Sets the yellow LED.