j5.boards.sr.v4 package

Submodules

j5.boards.sr.v4.power_board module

Classes for the SR v4 Power Board.

class j5.boards.sr.v4.power_board.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.

firmware_version

Get the firmware version of the board.

make_safe() → None[source]

Make this board safe.

name = 'Student Robotics v4 Power Board'
outputs

Get the power outputs.

piezo

Get the piezo sounder.

serial

Get the serial number.

start_button

Get the start button.

static supported_components() → Set[Type[Component]][source]

List the types of components supported by this 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.power_board.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

Module contents

Boards in the v4 series of Student Robotics boards.

class j5.boards.sr.v4.MotorBoard(serial: str, backend: j5.backends.backend.Backend)[source]

Bases: j5.boards.board.Board

Student Robotics v4 Motor Board.

firmware_version

Get the firmware version of the board.

make_safe() → None[source]

Make this board safe.

motors

Get the motors on this board.

name = 'Student Robotics v4 Motor Board'
serial

Get the serial number.

static supported_components() → Set[Type[Component]][source]

List the types of components supported by this 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.

firmware_version

Get the firmware version of the board.

make_safe() → None[source]

Make this board safe.

name = 'Student Robotics v4 Power Board'
outputs

Get the power outputs.

piezo

Get the piezo sounder.

serial

Get the serial number.

start_button

Get the start button.

static supported_components() → Set[Type[Component]][source]

List the types of components supported by this 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.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.

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

Get the serial number.

servos

Get the servos on this board.

static supported_components() → Set[Type[Component]][source]

List the types of components supported by this board.