Simple byte and string based inter-device communication via BLE.
- Author(s): Nicholas H.Tollervey for Adafruit Industries
Software and Dependencies:
- Adafruit CircuitPython firmware for the supported boards: https://github.com/adafruit/circuitpython/releases
Amount of time to advertise a message (in seconds).
Maximum length of a message (in bytes).
Represents a connection through which one can send or receive strings and bytes. The radio can be tuned to a specific channel upon initialisation or via the
Set configuration values for the radio.
Parameters: channel (int) – The channel (0-255) the radio is listening / broadcasting on.
Returns a message received on the channel on which the radio is listening.
Returns: A string representation of the received message, or else None.
Returns a tuple containing three values representing a message received on the channel on which the radio is listening. If no message was received then
The three values in the tuple represent:
- the bytes received.
- the RSSI (signal strength: 0 = max, -255 = min).
- a microsecond timestamp: the value returned by time.monotonic() when the message was received.
Parameters: timeout (float) – The length of time (in seconds) the radio listens for a broadcast Returns: A tuple representation of the received message, or else None.
Send a message string on the channel to which the radio is broadcasting.
Parameters: message (str) – The message string to broadcast.