
Purpose
Κ
Write characters to Bluetooth module.
Syntax
Κ
N1%=BT_WRITE(A$,N2%)
Example
Κ
BT_START
…
BT_OPEN
IF GET_BT_ERROR=1 THEN
CLS
PRINT " BlueTooth test"
WHILE 1
A$=INKEY$
IF A$<>"" THEN
IF(ASC(A$)=27) THEN EXIT
N1%=0
N1%=BT_WRITE(A$,1)
IF N1%=1 THEN PRINT A$;
END IF
STR1$=BT_READ$(1)
IF LEN(STR1$)<>0 THEN PRINT STR1$;
WEND
BT_CLOSE
ELSE
PRINT "Link error!!!"
WHILE INKEY$=""
WEND
END IF
…
BT_STOP
…
Description
Κ
If Bluetooth is connected, this command can write characters to
other Bluetooth device.
N1%
is an integer variable.It
will tell you how many characters send to
other Bluetooth device.
A$
is a string variable indicating the data is to be sent.
N2%
is an integer variable indicating number of bytes to be writen
to other Bluetooth device.
You can use the “GET_BT_ERROR” command to get the error
T P C 7 0 3 0
Programming Manual Ver. 1.00
95/131