     else
       Serial.println("RedFly ready.");
 
-    if(!redFlyCommandRequired("AT+RSI_BAND=0")) continue;
-    if(!redFlyCommandRequired("AT+RSI_INIT")) continue;
-    if(!redFlyCommandRequired("AT+RSI_NETWORK=IBSS,0,0")) continue;
-    if(!redFlyCommandRequired("AT+RSI_AUTHMODE=4")) continue;
-    if(!redFlyCommandRequired("AT+RSI_SCAN=0")) continue;
-    delay(1000);
-    if(!redFlyCommandRequired("AT+RSI_JOIN=VisSynthBox II,0,0")) continue;
-    delay(1000);
-    if(!redFlyCommandRequired("AT+RSI_IPCONF=0,168.254.20.10,255.255.0.0,168.254.10.10")) continue;
-    delay(100);
-    if(!redFlyCommandRequired("AT+RSI_LUDP=8083")) continue;
-    if(!redFlyCommandRequired("AT+RSI_UDP=168.254.10.10,8083,9083")) continue;
+    if(!redFlyCommand("AT+RSI_BAND=0")) continue;
+    if(!redFlyCommand("AT+RSI_INIT")) continue;
+    if(!redFlyCommand("AT+RSI_NETWORK=IBSS,0,0")) continue;
+    if(!redFlyCommand("AT+RSI_AUTHMODE=4")) continue;
+    if(!redFlyCommand("AT+RSI_SCAN=0")) continue;
+    if(!redFlyCommand("AT+RSI_JOIN=VisSynthBox II,0,0")) continue;
+    if(!redFlyCommand("AT+RSI_IPCONF=0,168.254.20.10,255.255.0.0,168.254.10.10")) continue;
+    if(!redFlyCommand("AT+RSI_LUDP=8083")) continue;
+    if(!redFlyCommand("AT+RSI_UDP=168.254.10.10,8083,9083")) continue;
 
     success=true;
   }

  int i=0;
  for (; i<size && Serial1.available(); i++) {
    response[i]=Serial1.read();
    if(!Serial1.available()) delay(3);
  }
  response[i]=0;
  digitalWrite(BLUE_LED,LOW);  
  redFlyFlush();

  if(response[0]=='O') return true;  // OK
  else                 return false;   // ERROR or something
}

bool redFlyCommandRequired(const char* cmd)
{
  char response[64];
  
  if(!redFlyCommand(cmd,response,64))
  {
    Serial.print("RedFly Error at: ");
    Serial.println(cmd);
    Serial.println(response);
    
    return false;
  }
  return true;
}

bool redFlySend(const char* cmd)
{
  char response[2];  
  redFlyCommand(cmd,response,2);
}



// initialize the library with the numbers of the interface pins



  Serial.begin(9600);

  lcd.home();
  lcd.println("INIT");
