j5.boards.sr.v4 package

Module contents

Boards in the v4 series of Student Robotics boards.

class j5.boards.sr.v4.MotorBoard(serial: str, backend: j5.backends.backend.Backend, *, safe_state: Union[float, j5.components.motor.MotorSpecialState] = <MotorSpecialState.BRAKE: 1>)[source]

Bases: j5.boards.board.Board

Student Robotics v4 Motor Board.

firmware_version

Get the firmware version of the board.

Returns:Firmware version of the board.
make_safe() → None[source]

Make this board safe.

motors

Get the motors on this board.

Returns:List of motors attached to the board.
name = 'Student Robotics v4 Motor Board'
serial_number

Get the serial number of the board.

Returns:Serial number of the board.
static supported_components() → Set[Type[j5.components.component.Component]][source]

List the types of components supported by this board.

Returns:Set of components supported by the board.
class j5.boards.sr.v4.PowerBoard(serial: str, backend: j5.backends.backend.Backend)[source]

Bases: j5.boards.board.Board

Student Robotics v4 Power Board.

battery_sensor

Get the battery sensor.

Returns:Battery sensor attached to the board.
firmware_version

Get the firmware version of the board.

Returns:Firmware version of the board.
make_safe() → None[source]

Make this board safe.

name = 'Student Robotics v4 Power Board'
outputs

Get the power outputs.

Returns:Group of power outputs attached to the board.
piezo

Get the piezo sounder.

Returns:Piezo object attached to the board.
serial_number

Get the serial number of the board.

Returns:Serial number of the board.
start_button

Get the start button.

Returns:Start button attached to the board.
static supported_components() → Set[Type[j5.components.component.Component]][source]

List the types of components supported by this board.

Returns:Set of components supported by the board.
wait_for_start_flash() → None[source]

Wait for the start button to be pressed and flash.

The LED will remain on once the start button has been pressed.

class j5.boards.sr.v4.PowerOutputGroup(outputs: Mapping[T, j5.components.power_output.PowerOutput])[source]

Bases: object

A group of PowerOutputs.

power_off() → None[source]

Disable all outputs in the group.

power_on() → None[source]

Enable all outputs in the group.

class j5.boards.sr.v4.PowerOutputPosition[source]

Bases: enum.Enum

A mapping of name to number of the PowerBoard outputs.

The numbers here are the same as used in wire communication with the PowerBoard.

H0 = 0
H1 = 1
L0 = 2
L1 = 3
L2 = 4
L3 = 5
class j5.boards.sr.v4.Ruggeduino(serial: str, backend: j5.backends.backend.Backend)[source]

Bases: j5.boards.arduino.uno.ArduinoUno

Student Robotics Ruggeduino board.

name = 'Ruggeduino'
static supported_components() → Set[Type[j5.components.component.Component]][source]

List the types of components supported by this board.

Returns:Set of components supported by the board.
class j5.boards.sr.v4.ServoBoard(serial: str, backend: j5.backends.backend.Backend)[source]

Bases: j5.boards.board.Board

Student Robotics v4 Servo Board.

firmware_version

Get the firmware version of the board.

Returns:Firmware version of the board.
make_safe() → None[source]

Make this board safe.

It is safest to leave the servos where they are, so do nothing.

name = 'Student Robotics v4 Servo Board'
serial_number

Get the serial number of the board.

Returns:Serial number of the board.
servos

Get the servos on this board.

Returns:List of servos on the board.
static supported_components() → Set[Type[j5.components.component.Component]][source]

List the types of components supported by this board.

Returns:Set of components supported by the board.