Difference between revisions of "Component: Bluetooth (BL0170) (E-blocks 2)"
From Flowcode Help
Jump to navigationJump to search| Line 49: | Line 49: | ||
''<span style="color:red;">No additional examples</span>'' | ''<span style="color:red;">No additional examples</span>'' | ||
| + | |||
| + | |||
| Line 55: | Line 57: | ||
==Macro reference== | ==Macro reference== | ||
| + | ===ReceiveByte=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| Line 73: | Line 76: | ||
| + | ===SendString=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| Line 96: | Line 100: | ||
| + | ===LeaveCommandMode=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| Line 109: | Line 114: | ||
| + | ===ConnectToMAC=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| Line 127: | Line 133: | ||
| + | ===SendCommand=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| Line 155: | Line 162: | ||
| + | ===ReceiveCount=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| Line 168: | Line 176: | ||
| + | ===ReadString=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| Line 186: | Line 195: | ||
| + | ===SendByte=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| Line 204: | Line 214: | ||
| + | ===EnterCommandMode=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| Line 217: | Line 228: | ||
| + | ===WaitForStringValue=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| Line 240: | Line 252: | ||
| + | ===GetMACAddress=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
| Line 253: | Line 266: | ||
| + | ===Initialise=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Revision as of 11:49, 3 February 2023
| Author | Matrix Ltd. |
| Version | 1.3 |
| Category | E-blocks 2 |
Contents
Bluetooth component
Low level routines for controlling a Microchip RN4677 Bluetooth Module. Also available in the form of the BL0170 Bluetooth E-block. Uses an interrupt to receive characters from the UART and improve reliability, Must be used with a hardware UART channel.
Component Source Code
Please click here to download the component source project: FC_Comp_Source_EBlocks2_Bluetooth_RN4677_BL0170.fcfx
Please click here to view the component source code (Beta): FC_Comp_Source_EBlocks2_Bluetooth_RN4677_BL0170.fcfx
Detailed description
No detailed description exists yet for this component
Examples
No additional examples
Macro reference
ReceiveByte
SendString
| SendString | |
| Sends a string to the Bluetooth module. | |
| Command | |
| SendCR | |
| Return | |
LeaveCommandMode
| LeaveCommandMode | |
| Leaves command mode allowing data to be passed back and forth, | |
| Return | |
ConnectToMAC
| ConnectToMAC | |
| Connects to a specific Bluetooth MAC address. Waits up to 5 seconds for connection to be established. Returns 1 if connection was successful. | |
| MACAddress | |
| Return | |
SendCommand
ReceiveCount
| ReceiveCount | |
| Returns the number of bytes currently sat waiting in the receive buffer. | |
| Return | |
ReadString
| ReadString | |
| Copies the incoming data from the data string array to a local string variable. | |
| NumBytes | |
| Maximum number of bytes to try and read | |
| Return | |
SendByte
| SendByte | |
| Sends a single data byte out to the Bluetooth module. | |
| Data | |
| Return | |
EnterCommandMode
| EnterCommandMode | |
| Enters command mode allowing commands to be sent using the SendCommand macro. Returns: 0 = No Reply / 1 = Command Mode OK | |
| Return | |
WaitForStringValue
GetMACAddress
| GetMACAddress | |
| Gets the local Bluetooth device MAC address. | |
| Return | |
Initialise
| Initialise | |
| Sets up the Bluetooth module including: - Enabling the UART - Configuring the module (Name / Key / etc) Returns 1 for OK and 0 for no reply. | |
| Return | |