jacdac.bit_radio

Submodules

Package Contents

Classes

BitRadioClient

Support for sending and receiving packets using the [Bit Radio protocol](https://github.com/microsoft/pxt-common-packages/blob/master/libs/radio/docs/reference/radio.md), typically used between micro:bit devices.

class jacdac.bit_radio.BitRadioClient(bus: jacdac.bus.Bus, role: str)

Bases: jacdac.bus.Client

Support for sending and receiving packets using the [Bit Radio protocol](https://github.com/microsoft/pxt-common-packages/blob/master/libs/radio/docs/reference/radio.md), typically used between micro:bit devices. Implements a client for the bit:radio service.

property enabled Optional[bool]

Turns on/off the radio antenna.,

property group Optional[int]

Group used to filter packets,

property transmission_power Optional[int]

Antenna power to increase or decrease range.,

property frequency_band Optional[int]

Change the transmission and reception band of the radio to the given channel.,

send_string(message: str) None

Sends a string payload as a radio message, maximum 18 characters.

send_number(value: float) None

Sends a double precision number payload as a radio message

send_value(value: float, name: str) None

Sends a double precision number and a name payload as a radio message

send_buffer(data: bytes) None

Sends a payload of bytes as a radio message