adafruit_bluefruitspi¶
Helper class to work with the Adafruit Bluefruit LE SPI friend breakout.
- Author(s): Kevin Townsend
Implementation Notes¶
Hardware:
“* Adafruit Bluefruit LE SPI Friend”
Software and Dependencies:
- Adafruit CircuitPython firmware for the supported boards: https://github.com/adafruit/circuitpython/releases
- Adafruit’s Bus Device library: https://github.com/adafruit/Adafruit_CircuitPython_BusDevice
-
class
adafruit_bluefruitspi.BluefruitSPI(spi, cs, irq, reset, debug=False)¶ Helper for the Bluefruit LE SPI Friend
-
command(string)¶ Send a command and check response code
-
command_check_OK(command, delay=0.0)¶ Send a fully formed bytestring AT command, and check whether we got an ‘OK’ back. Returns payload bytes if there is any
-
connected¶ Whether the Bluefruit module is connected to the central
-
init()¶ Sends the SDEP initialize command, which causes the board to reset. This command should complete in under 1s.
-
read_packet()¶ Will read a Bluefruit Connect packet and return it in a parsed format. Currently supports Button and Color packets only
-
uart_rx()¶ Reads byte data from the BLE UART FIFO.
-
uart_tx(data)¶ Sends the specific bytestring out over BLE UART. :param data: The bytestring to send.
-