Difference between revisions of "Component: Bluetooth (HC05 / HC06) (Wireless)"
From Flowcode Help
Jump to navigationJump to searchLine 82: | Line 82: | ||
Outgoing data is assigned and sent using a keypad component. | Outgoing data is assigned and sent using a keypad component. | ||
{{Fcfile|HC05_Example.fcfx|HC05 Example}} | {{Fcfile|HC05_Example.fcfx|HC05 Example}} | ||
+ | |||
+ | |||
Line 87: | Line 89: | ||
==Macro reference== | ==Macro reference== | ||
+ | ===SetPairKey=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 105: | Line 108: | ||
+ | ===SendString=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 123: | Line 127: | ||
+ | ===SendCommand=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 141: | Line 146: | ||
+ | ===SetBaud=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 159: | Line 165: | ||
+ | ===SendNumber=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 177: | Line 184: | ||
+ | ===SendChar=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 195: | Line 203: | ||
+ | ===SetName=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 213: | Line 222: | ||
+ | ===ReceiveString=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 236: | Line 246: | ||
+ | ===Initialise=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 249: | Line 260: | ||
+ | ===ReceiveChar=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- |
Revision as of 11:48, 3 February 2023
Author | Matrix Ltd |
Version | 2.1 |
Category | Wireless |
Contents
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
SetPairKey
SendString
![]() |
SendString |
Sends out a string of bytes from the UART interface. | |
![]() |
Data |
![]() |
Return |
SendCommand
![]() |
SendCommand |
Sends a command string to the HC05/HC06 module. | |
![]() |
Command |
![]() |
Return |
SetBaud
SendNumber
![]() |
SendNumber |
Sends out a number as an ASCII String from the UART interface. | |
[[File:]] - | Number |
![]() |
Return |
SendChar
![]() |
SendChar |
Sends out a single packet from the UART interface. | |
![]() |
Char |
![]() |
Return |
SetName
ReceiveString
![]() |
ReceiveString |
Attempts to receive a string of bytes from the UART interface. | |
![]() |
Timeout |
![]() |
NumBytes |
![]() |
Return |
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 |