Difference between revisions of "Component: Bluetooth (BL0170) (E-blocks 2)"
From Flowcode Help
Jump to navigationJump to search| Line 20: | Line 20: | ||
| ==Detailed description== | ==Detailed description== | ||
| + | |||
| + | |||
| ''No detailed description exists yet for this component'' | ''No detailed description exists yet for this component'' | ||
| ==Examples== | ==Examples== | ||
| + | |||
| + | |||
| Line 29: | Line 33: | ||
| − | == | + | ==Macro reference== | 
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
Revision as of 14:10, 20 January 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 for the component source code: FC_Comp_Source_EBlocks2_Bluetooth_RN4677_BL0170.fcfx
Detailed description
No detailed description exists yet for this component
Examples
No additional examples
Macro reference
|   | SendString | 
| Sends a string to the Bluetooth module. | |
|  - STRING | Command | 
|  - BYTE | SendCR | 
|  - VOID | Return | 
|   | LeaveCommandMode | 
| Leaves command mode allowing data to be passed back and forth, | |
|  - VOID | Return | 
|   | ConnectToMAC | 
| Connects to a specific Bluetooth MAC address. Waits up to 5 seconds for connection to be established. Returns 1 if connection was successful. | |
|  - STRING | MACAddress | 
|  - BOOL | Return | 
|   | ReceiveCount | 
| Returns the number of bytes currently sat waiting in the receive buffer. | |
|  - UINT | Return | 
|   | ReadString | 
| Copies the incoming data from the data string array to a local string variable. | |
|  - BYTE | NumBytes | 
| Maximum number of bytes to try and read | |
|  - STRING | Return | 
|   | SendByte | 
| Sends a single data byte out to the Bluetooth module. | |
|  - BYTE | Data | 
|  - VOID | Return | 
|   | EnterCommandMode | 
| Enters command mode allowing commands to be sent using the SendCommand macro. Returns: 0 = No Reply / 1 = Command Mode OK | |
|  - BOOL | Return | 
|   | GetMACAddress | 
| Gets the local Bluetooth device MAC address. | |
|  - STRING | Return | 
|   | 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. | |
|  - BYTE | Return | 








