I’m a quick learner if only time had not been spiking+3x’s… Sarge, get Private Willy to plug this please…


//  Auto Generated Code for Arduino IDE
//  Created using keuwlsofts Bluetooth Electronics App
//  http://www.keuwl.com

//  Steps:
//  1) Upload code and power your Arduino project
//  2) Run Bluetooth Electronics App and connect to your device
//  3) Press the reset button on your Arduino

//  This auto generated code template is only a suggestion to get you started.
//  It is incomplete and will need modification specific to your project.



int update_interval=100; // time interval in ms for updating panel indicators
unsigned long last_time=0; // time of last update
char data_in; // data received from serial link
String terminal_str=””; // String for Terminal Send Boxes

void setup() {

  Serial.begin(9600); //Change baud rate as required!

///////////// Build panel in app

Serial.println(“*.kwl”);
Serial.println(“clear_panel()”);
Serial.println(“set_grid_size(14,7)”);
Serial.println(“add_text(0,0,xlarge,L,Configure HC-06 Demo,180,230,110,)”);
Serial.println(“add_text(1,1,large,L,Find Baud Rate,200,200,200,)”);
Serial.println(“add_text(1,2,large,L,1200,200,200,200,)”);
Serial.println(“add_text(1,3,large,L,2400,200,200,200,)”);
Serial.println(“add_text(1,5,large,L,9600,200,200,200,)”);
Serial.println(“add_text(4,2,large,L,19200,200,200,200,)”);
Serial.println(“add_text(4,3,large,L,38400,200,200,200,)”);
Serial.println(“add_text(4,5,large,L,115200,200,200,200,)”);
Serial.println(“add_text(7,5,large,R,PIN:,200,200,200,)”);
Serial.println(“add_text(7,4,large,R,Name:,200,200,200,)”);
Serial.println(“add_text(1,4,large,L,4800,200,200,200,)”);
Serial.println(“add_text(4,4,large,L,57600,200,200,200,)”);
Serial.println(“add_button(0,4,24,3,)”);
Serial.println(“add_button(0,5,24,4,)”);
Serial.println(“add_button(3,2,24,5,)”);
Serial.println(“add_button(3,5,24,8,)”);
Serial.println(“add_button(0,3,24,2,)”);
Serial.println(“add_button(0,2,24,1,)”);
Serial.println(“add_button(0,1,17,F,)”);
Serial.println(“add_button(3,4,24,7,)”);
Serial.println(“add_button(3,3,24,6,)”);
Serial.println(“add_send_box(8,0,3,AT+VERSION,C,)”);
Serial.println(“add_monitor(6,1,5,,1)”);
Serial.println(“add_send_box(8,5,3,1234,P,)”);
Serial.println(“add_send_box(8,4,3,HC-06,N,)”);
Serial.println(“set_panel_notes(Configure HC-06 baud rate etc,Use one HC-06 to receive commands from android deivce,Uses software serial arduino connection to program the ,other HC-06 with the Bluetooth AT commands)”);
Serial.println(“run()”);
Serial.println(“*”);

}

void loop() {

  /////////////   Receive and Process Data

  if (Serial.available()){
    data_in=Serial.read();  //Get next character

    if(data_in==’3′){ //Button Pressed
      //<— Insert button pressed code here
    }

    if(data_in==’4′){ //Button Pressed
      //<— Insert button pressed code here
    }

    if(data_in==’5′){ //Button Pressed
      //<— Insert button pressed code here
    }

    if(data_in==’8′){ //Button Pressed
      //<— Insert button pressed code here
    }

    if(data_in==’2′){ //Button Pressed
      //<— Insert button pressed code here
    }

    if(data_in==’1′){ //Button Pressed
      //<— Insert button pressed code here
    }

    if(data_in==’F’){ //Button Pressed
      //<— Insert button pressed code here
    }

    if(data_in==’7′){ //Button Pressed
      //<— Insert button pressed code here
    }

    if(data_in==’6′){ //Button Pressed
      //<— Insert button pressed code here
    }

    // Receive Data from Terminal Send Box
    if(data_in==’C’){ //  Start Text
     terminal_str=””;
     while (data_in!=13&&data_in!=10){ // Loop until new line character reached
       if (Serial.available()){
         data_in=Serial.read();
         terminal_str+=data_in;
       }
     }
    }

    // Receive Data from Terminal Send Box
    if(data_in==’P’){ //  Start Text
     terminal_str=””;
     while (data_in!=13&&data_in!=10){ // Loop until new line character reached
       if (Serial.available()){
         data_in=Serial.read();
         terminal_str+=data_in;
       }
     }
    }

    // Receive Data from Terminal Send Box
    if(data_in==’N’){ //  Start Text
     terminal_str=””;
     while (data_in!=13&&data_in!=10){ // Loop until new line character reached
       if (Serial.available()){
         data_in=Serial.read();
         terminal_str+=data_in;
       }
     }
    }

  }

  /////////////  Send Data to Android device

  unsigned long t=millis();
  if ((t-last_time)>update_interval){
    last_time=t;

  }

}

// Auto Generated Code for Arduino IDE
// Created using keuwlsofts Bluetooth Electronics App
// http://www.keuwl.com

// Steps:
// 1) Upload code and power your Arduino project
// 2) Run Bluetooth Electronics App and connect to your device
// 3) Press the reset button on your Arduino

// This auto generated code template is only a suggestion to get you started.
// It is incomplete and will need modification specific to your project.

int update_interval=100; // time interval in ms for updating panel indicators
unsigned long last_time=0; // time of last update
char data_in; // data received from serial link
String terminal_str=””; // String for Terminal Send Boxes

void setup() {

Serial.begin(9600); //Change baud rate as required!

///////////// Build panel in app

Serial.println(“*.kwl”);
Serial.println(“clear_panel()”);
Serial.println(“set_grid_size(14,7)”);
Serial.println(“add_text(0,0,xlarge,L,Configure HC-06 Demo,180,230,110,)”);
Serial.println(“add_text(1,1,large,L,Find Baud Rate,200,200,200,)”);
Serial.println(“add_text(1,2,large,L,1200,200,200,200,)”);
Serial.println(“add_text(1,3,large,L,2400,200,200,200,)”);
Serial.println(“add_text(1,5,large,L,9600,200,200,200,)”);
Serial.println(“add_text(4,2,large,L,19200,200,200,200,)”);
Serial.println(“add_text(4,3,large,L,38400,200,200,200,)”);
Serial.println(“add_text(4,5,large,L,115200,200,200,200,)”);
Serial.println(“add_text(7,5,large,R,PIN:,200,200,200,)”);
Serial.println(“add_text(7,4,large,R,Name:,200,200,200,)”);
Serial.println(“add_text(1,4,large,L,4800,200,200,200,)”);
Serial.println(“add_text(4,4,large,L,57600,200,200,200,)”);
Serial.println(“add_button(0,4,24,3,)”);
Serial.println(“add_button(0,5,24,4,)”);
Serial.println(“add_button(3,2,24,5,)”);
Serial.println(“add_button(3,5,24,8,)”);
Serial.println(“add_button(0,3,24,2,)”);
Serial.println(“add_button(0,2,24,1,)”);
Serial.println(“add_button(0,1,17,F,)”);
Serial.println(“add_button(3,4,24,7,)”);
Serial.println(“add_button(3,3,24,6,)”);
Serial.println(“add_send_box(8,0,3,AT+VERSION,C,)”);
Serial.println(“add_monitor(6,1,5,,1)”);
Serial.println(“add_send_box(8,5,3,1234,P,)”);
Serial.println(“add_send_box(8,4,3,HC-06,N,)”);
Serial.println(“set_panel_notes(Configure HC-06 baud rate etc,Use one HC-06 to receive commands from android deivce,Uses software serial arduino connection to program the ,other HC-06 with the Bluetooth AT commands)”);
Serial.println(“run()”);
Serial.println(“*”);

}

void loop() {

///////////// Receive and Process Data

if (Serial.available()){
data_in=Serial.read(); //Get next character

if(data_in==’3′){ //Button Pressed
//<— Insert button pressed code here
}

if(data_in==’4′){ //Button Pressed
//<— Insert button pressed code here
}

if(data_in==’5′){ //Button Pressed
//<— Insert button pressed code here
}

if(data_in==’8′){ //Button Pressed
//<— Insert button pressed code here
}

if(data_in==’2′){ //Button Pressed
//<— Insert button pressed code here
}

if(data_in==’1′){ //Button Pressed
//<— Insert button pressed code here
}

if(data_in==’F’){ //Button Pressed
//<— Insert button pressed code here
}

if(data_in==’7′){ //Button Pressed
//<— Insert button pressed code here
}

if(data_in==’6′){ //Button Pressed
//<— Insert button pressed code here
}

// Receive Data from Terminal Send Box
if(data_in==’C’){ // Start Text
terminal_str=””;
while (data_in!=13&&data_in!=10){ // Loop until new line character reached
if (Serial.available()){
data_in=Serial.read();
terminal_str+=data_in;
}
}
}

// Receive Data from Terminal Send Box
if(data_in==’P’){ // Start Text
terminal_str=””;
while (data_in!=13&&data_in!=10){ // Loop until new line character reached
if (Serial.available()){
data_in=Serial.read();
terminal_str+=data_in;
}
}
}

// Receive Data from Terminal Send Box
if(data_in==’N’){ // Start Text
terminal_str=””;
while (data_in!=13&&data_in!=10){ // Loop until new line character reached
if (Serial.available()){
data_in=Serial.read();
terminal_str+=data_in;
}
}
}

}

///////////// Send Data to Android device

unsigned long t=millis();
if ((t-last_time)>update_interval){
last_time=t;

}

}