Component: Bluetooth (HC05 / HC06) (Wireless): Difference between revisions
Appearance
m Text replacement - "class="wikitable" style="width:60%; background-color:#FFFFFF;"" to "class="mtx-class-macrotable wikitable"" |
m Text replacement - "width="10%" align="center" style="background-color:#D8C9D8;" align="center"" to "width="10%" align="center" class="mtx-class-macrohead"" |
||
| Line 98: | Line 98: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Initialise''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Initialise''' | ||
|- | |- | ||
| Line 112: | Line 112: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReceiveChar''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReceiveChar''' | ||
|- | |- | ||
| Line 131: | Line 131: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReceiveString''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReceiveString''' | ||
|- | |- | ||
| Line 155: | Line 155: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SendChar''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SendChar''' | ||
|- | |- | ||
| Line 174: | Line 174: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SendCommand''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SendCommand''' | ||
|- | |- | ||
| Line 193: | Line 193: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SendNumber''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SendNumber''' | ||
|- | |- | ||
| Line 212: | Line 212: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SendString''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SendString''' | ||
|- | |- | ||
| Line 231: | Line 231: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetBaud''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetBaud''' | ||
|- | |- | ||
| Line 250: | Line 250: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetName''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetName''' | ||
|- | |- | ||
| Line 269: | Line 269: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetPairKey''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetPairKey''' | ||
|- | |- | ||
Revision as of 14:17, 13 July 2026
| Author | Matrix Ltd |
| Version | 2.1 |
| Category | Wireless |
Bluetooth (HC05 / HC06) component
Low level routines for controlling or interacting with a HC05 or HC06 Bluetooth module. Contains functions to allow the baud rate, bluetooth name and bluetooth key to be defined.
Component Source Code
Please click here to download the component source project: FC_Comp_Source_BTHC05.fcfx
Please click here to view the component source code (Beta): FC_Comp_Source_BTHC05.fcfx
Detailed description
No detailed description exists yet for this component
Examples
Example Program that configures a HC05 / HC06 Bluetooth module and then allows a data connection to be established and utilised.
Incoming data will be displayed on an LCD.
Outgoing data is assigned and sent using a keypad component.
HC05 Example
Macro reference
Initialise
| Initialise | |
| Sets up the RS232 peripheral, must be called at the start of your program or at least before you start calling any other RS232 macros. | |
| Return | |
ReceiveChar
| ReceiveChar | |
| Attempts to receive a single packet from the UART interface. | |
| Timeout | |
| Time to wait for valid data before returning, 0=Dont wait, 255=Wait forever. | |
| Return | |
ReceiveString
| ReceiveString | |
| Attempts to receive a string of bytes from the UART interface. | |
| Timeout | |
| NumBytes | |
| Return | |
SendChar
| SendChar | |
| Sends out a single packet from the UART interface. | |
| Char | |
| Return | |
SendCommand
| SendCommand | |
| Sends a command string to the HC05/HC06 module. | |
| Command | |
| Return | |
SendNumber
| SendNumber | |
| Sends out a number as an ASCII String from the UART interface. | |
| [[File:]] - | Number |
| Return | |
SendString
| SendString | |
| Sends out a string of bytes from the UART interface. | |
| Data | |
| Return | |
SetBaud
SetName
SetPairKey