hi,i am trying to use arrays to read text from a file on another location before sending it out byte by byte but i not very familiar with using arrays for my coding.Kindly take a look at my source code,thanks.
void loop()
{
char Msg[]={"Hello"};
char *start;
int i=0;
// Creating a connection to a device
if(!BT.createConnection("0017E5F1CD3B","02"))//It creates a connection to the desired device which is operating on the service channel '02'
{
USB.println("");
USB.print("--- CONNECTION -- MTU: ");
USB.print(BT.connection_mtu[0],BYTE);//Stores the maximum amount of data that can be sent
USB.print(BT.connection_mtu[1],BYTE);
USB.println(BT.connection_mtu[2],BYTE);
}
else USB.println("Connection failed");
start=Msg;
// Sending the data to the opened connection
if(USB.println("Data sent OK");
else USB.println("Error while sending data");
// Removing the connection previously opened
if(!BT.removeConnection()) USB.println("Connection removed");
else USB.println("Error while removing connection");
// Removing a trusted device
if(!BT.removeTrustedDevice("0017E5F1CD3B")) USB.println("Trusted Device removed");//0017E5F1CD3B==MAC address of PDA
else USB.println("Error while removing trusted device");
// Powering Down BT
BT.OFF();
}