BTReadln


BTReadln channel, data$

This command reads character bytes from a specified Bluetooth serial channel until a newline character "\n" is encountered. Any data read is returned in the data$ parameter. The newline character is not included in the string returned. If no data is available to read an empty string will be returned. It is important to note that only the lower eight bits of each character is read. This is a good function for receiving regular string records. This command should be used to receive a string sent by a BTWriteln command.

After a BTReadln it is important to check if the read succeeded. All serial communication is subject to interruption at any time so check the BTGetError$(n) after each Bluetooth command you execute. BTGetError$(n) will return an empty string if the read succeeded.





Bluetooth On|Off


Bluetooth device pairing


BTClose


BTConnect


BTDiscoverable


BTGetAddress$()


BTGetError$()


BTGetName$()


BTGetPaired$()


BTGetSize()


BTGetState()


BTListen


BTRead$()


BTRead


BTReadUTF


BTWrite


BTWriteln


BTWriteUTF







Become a Patron