arduino mega ADK -> bluetooth mate gold


hi all,

i'm having trouble communication between mega adk , bluetooth mate. able connect mate computer cannot communication between mega , mate. code i'm using below, advice appreciated! thanks! also, if there other information need let me know.


#include <softwareserial.h>

//rx , tx pin assignments arduino mega adk
int bluetoothtx = 2; 
int bluetoothrx = 3;

softwareserial bluetooth(bluetoothtx, bluetoothrx);

void setup()
{
  //setup usb serial connection computer
  serial.begin(9600);

  //setup bluetooth serial connection android
  bluetooth.begin(115200);
  bluetooth.print("$$$");
  delay(100);
  bluetooth.println("u,9600,n");
  bluetooth.begin(9600);
}

void loop()
{
  //read bluetooth , write usb serial
  if(bluetooth.available())
  {
    serial.print((char)bluetooth.read());
  }

  if(serial.available())
  {
    bluetooth.print((char)serial.read());
  }
}


which ide using 1.0 or 0.23 or 0.22 ? 

the quality of software serial in pre1.0 version rather low. 1.0 version of sws better.



Arduino Forum > Using Arduino > Interfacing w/ Software on the Computer > arduino mega ADK -> bluetooth mate gold


arduino

Comments

Popular posts from this blog

Thread: PKI Client 5.00 install (for eToken Pro)

ATmega2560-Arduino Pin Mapping

Crossfader Arduino Tutorial