Volt Docs

Reference

HC05

Driver for HC-05 Bluetooth module using UART with extended AT command support..

Connects over
UART (serial)
Datasheet
electronicoscaldas.com

Use it

main.volt
hardware {
    device hc05: HC05
}

every 1s {
    let value: bool = hc05.available()
    log("hc05", "available={value}")
}

The HC05 talks over a UART. On its own the declaration gets a free serial port; to choose the pins, declare uart modem(tx: 17, rx: 16, baud: 9600) and write device hc05: HC05 on modem.

Methods

  • hc05.send_at_command(command: string)

    Sends an AT command to the HC-05 module.

  • hc05.send_data(data: int)

    Sends data over Bluetooth.

  • hc05.set_baud_rate(baud_rate: int)

    Sets the baud rate of the HC-05 module.

  • hc05.set_name(name: string)

    Set the module's Bluetooth name (AT mode).

  • hc05.set_password(password: string)

    Sets the password of the HC-05 module.

  • hc05.send(text: string)

    Send text over Bluetooth.

  • hc05.send_line(text: string)

    Send text followed by CR LF.

  • hc05.available() -> bool

    True when received bytes are waiting.

  • hc05.read_line() -> string

    Next complete received line without CR/LF, or "" if none yet (never blocks).