Component: MIAC Bluetooth (MIAC: Addon Modules)

From Flowcode Help
Jump to navigationJump to search


Author Matrix TSL
Version 1.0 (Release)
Category MIAC: Addon Modules


Image MIAC Bluetooth component

Bluetooth Addon for MIAC System

Examples

No additional examples


Downloadable macro reference

BluetoothCount

Returns the number of bytes waiting to be read from the receive buffer

Parameters

This macro has no parameters


Return value

BYTE


BluetoothSendString

send string to Bluetooth module

Parameters

<- STRING Str
This parameter may be returned back to the caller


Return value

This call does not return a value


BluetoothChangeBaud

Changes the Bluetooth communication baud rate:

1 = 1200, 2 = 2400, 3 = 4800, 4 = 9600, 5 =19200, 6 =38400, 7 = 57600, 8 = 115200

(Applies to HC-06 module only)

Parameters

BYTE Baud
New baud rate. 1=1200, 4=9600, 6=38400, 8=115200


Return value

This call does not return a value


BluetoothSetPin

Changes the pincode to a new value.

The passcode is four digits, e.g. 1234

(Applies to HC-06 module only)

Parameters

<- STRING Pincode
New four digit pincode
This parameter may be returned back to the caller


Return value

BYTE


LED_Control

Sets the indicator LED On (State=1) or Off (State=0)

Parameters

BYTE State


Return value

This call does not return a value


BluetoothSetName

Changes the module Name to a new value.

(Applies to HC-06 module only)

Parameters

<- STRING Name
New four digit passcode
This parameter may be returned back to the caller


Return value

BYTE


DigitalOutput

Set a Terminal Output to High (Value=1) or Low (Value=0)

Parameters

BYTE Terminal
BYTE Value


Return value

BYTE


BluetoothRead

Read one character from the Bluetooth module receive buffer.

Returns 0 if nothing in the receive buffer

Parameters

This macro has no parameters


Return value

BYTE


BluetoothInitialize

Initializes the Bluetooth module (enables buffered receive mode)

Parameters

This macro has no parameters


Return value

This call does not return a value


AnalogInput

Read the ADC value of a Terminal

Returns 12 bit ADC reading

Parameters

BYTE Terminal
Terminal number to be read


Return value

UINT


BluetoothSend

Sends a character to the Bluetooth module

Parameters

BYTE Character
Character (Byte) to send


Return value

This call does not return a value


Initialize

Forces a software reset on the module and enables buffered receive.

Parameters

This macro has no parameters


Return value

This call does not return a value


DigitalInput

Read the value of a terminal

Parameters

BYTE Terminal


Return value

BYTE


Simulation macro reference

This component does not contain any simulation macros


Property reference

Module Type

This property is of type Fixed list of ints and can be referenced with the variable name MODULE_TYPE.

No additional information


Module Address

This property is of type Fixed list of ints and can be referenced with the variable name ORDINAL.

No additional information


Baud Rate

This property is of type Unsigned integer and can be referenced with the variable name BAUD1.

No additional information