Go Down

Topic: wireless communication (Read 440 times) previous topic - next topic

GaseousAnomaly

I need suggestions on what type of wireless device to purchase to so that I can communicate to a PC or Android device.  I am new to programming my Arduino Uno.  So far I have made a project that controls a vehicle that finds light and avoids obstacles.  I have programmed the GUINO Dashboard to read and write values to my project.  I would like to try to read/write the values now wirelessly.  I suspect Bluetooth is the way to go, but I am not sure.

pylon

If you don't specify more requirements, I would also say bluetooth is the way to go. It's relatively easy to set up, quite cheap, doesn't use much power and easy to get devices. The drawbacks are the limited range and perhaps the ignorance of Apple to support the serial bluetooth profile on their iPhone.

CAP_Cadet

Hi,

You could look into XBee or ZigBee, they just use a USB interface. Bluetooth is also a good option. Potentially, you "maybe" can use WiFi with iPhone. I'm in a bit of a hurry, so a more detailed post later.

Joseph
________________
Joseph Anand-Maker
joseph@anandfamily.org

farmersride

Any update on this project?  I am trying to setup Guino over a bluetooth serial port as well and have run into difficulties.  I have setup bluetooth serial using seedstudio bluetooth shield.  I have the shield setup running at 115200 baud (as required by my project) and have connected successfully to the PC serial monitor (in test code).  I configured the bluetooth shield to communicate over the hardware serial ports because they can more easily handle the 115200 baud rate and the Guino code relies on EasyTransfer protocol which uses the hardware serial ports.  In the Guino library I changed some of the contents of gbegin(...) command to so that it configures a bluetooth connection before continuing with setting up the Guino dashboard.  I can connect to the serial port using serial monitor and I get some garbled data which I assume is either dashboard configuration data or an  EasyTransfer packet.  However if I try to connect with the Guino application it does not connect to the serial port at all.  The bluetooth module does output some status information onto the serial bus which might be screwing with the binary data transmission of the EasyTransfer protocol, however the fact that the Guino application does not connect to the serial port at all is leading me to believe that the fix to this problem most likely resides in a code change to the Guino application.  I am stuck.

Code for gbegin below...

void gBegin(int _eepromKey)
{

  // Sets all pointers to a temporary value just to make sure no random memory pointers.
  for(int i = 0; i < guino_maxGUIItems; i++)
  {
    guino_item_values = &gTmpInt;
  }
  eepromKey = _eepromKey;
 
  gInit(); // this one needs to run twice only way to work without serial connection.
  internalInit = false;
  //Serial.begin(38400);  //use this if you want to switch baud from default to 115200
  //Serial.print("\r\n+STBD=115200\r\n"); //use this if you want to switch baud from default to 115200
  //Serial.flush(); //use this if you want to switch baud from default to 115200
  Serial.begin(115200);  //new baud rate is remembered after power off so do not forget what you set this too
  Serial.print("\r\n+STWMOD=0\r\n"); //set the bluetooth work in slave mode
  Serial.print("\r\n+STNA=SeeedBTSlave\r\n"); //set the bluetooth name as "SeeedBTSlave"
  Serial.print("\r\n+STOAUT=1\r\n"); // Permit Paired device to connect me
  Serial.print("\r\n+STAUTO=0\r\n"); // Auto-connection should be forbidden here
  delay(2000); // This delay is required.
  Serial.print("\r\n+INQ=1\r\n"); //make the slave bluetooth inquirable
  //Serial.println("The slave bluetooth is inquirable!");
  delay(2000); // This delay is required.
  Serial.flush();
  int val = 0;
  while(val < 500){ //This monitors the bluetooth connection and prevents further program execution until the shield is connected
    val = analogRead(A1); //This monitors the bluetooth connection and prevents further program execution until the shield is connected
    delay(1000); //This monitors the bluetooth connection and prevents further program execution until the shield is connected
  }
  ET.begin(details(guino_data), &Serial);
  gSendCommand(guino_executed, 0, 0);
  gSendCommand(guino_executed, 0, 0);
  gSendCommand(guino_executed, 0, 0);
  gSendCommand(guino_iamhere, 0, 0);

}

Go Up