HCR - Mobile Robot Platform with Sensors and Microcontroller ROB0021

Hello,
I purchased the ROB0021 HCR - Mobile Robot Platform with Sensors and Microcontroller from RobotShop a few months back and am looking at the DFR0182 to add remote control.
A few questions:
1. I already have the TEL0026 and control with Android, but very difficult for accuracy - only 4-way forward/reverse, left/right.
2. With DFR0182 and TEL0023 Bluetooth 2.0 Bee Module For Arduino, the GamePad controller should provide detailed axial contol? More that 4 directions?
3. Would I also need the DFR0050 Xbee USB adapter (FTDI ready) for programming or can I accomplish via the GamePad?
4. I am also try to merge the 5 Sharp GP2Y0A21 IR Distance Sensor code and 3 Bumper Sensor code however as the Romeo \Uno board only accepts one Serial com and seems I need Serial, Serial1, etc. not available with Romeo. I did try #include <SoftwareSerial.h> library with no success. Do you think this is the recommendation?
5. Encoders - Again, need dedicated Serial com.??
So summary - This kit includes 3 bumper sensors, 5 distance sensors, 2 motor encoders and now I have added the BT communication. I need assistance in how to make all communicate effectively with the code. I understand the individual sample code available, but this is only fine for individual component function and not combining all sensors together. Can you please help? I have had this kit 4 months and struggling a big. I would like to get obstacle avoidance working with better remote control ability. I'm thinking this should be possible. If it comes down to purchase of ultrasonic sensor, I would now chose the DFR0315 RPLIDAR A1M8 - 360 Degree Laser Scanner Development Kit. Maybe this is the path forward.Will Romeo support.I see I can get Arduino library. I think struggling with putting all code together right now, maybe you can assist as there does not seem to be much information or others with this platform. Thanks in advance.
This Code Allows BT/USB-IDE Control of HCR w/WASD
//Standard PWM DC control
int E1 = 5; //M1 Speed Control
int E2 = 6; //M2 Speed Control
int M1 = 4; //M1 Direction Control
int M2 = 7; //M2 Direction Control
void stop(void) //Stop
{
digitalWrite(E1, LOW);
digitalWrite(E2, LOW);
}
void advance(char a, char b) //Move forward
{
analogWrite (E1, a); //PWM Speed Control
digitalWrite(M1, HIGH);
analogWrite (E2, b);
digitalWrite(M2, HIGH);
}
void back_off (char a, char b) //Move backward
{
analogWrite (E1, a);
digitalWrite(M1, LOW);
analogWrite (E2, b);
digitalWrite(M2, LOW);
}
void turn_L (char a, char b) //Turn Left
{
analogWrite (E1, a);
digitalWrite(M1, LOW);
analogWrite (E2, b);
digitalWrite(M2, HIGH);
}
void turn_R (char a, char b) //Turn Right
{
analogWrite (E1, a);
digitalWrite(M1, HIGH);
analogWrite (E2, b);
digitalWrite(M2, LOW);
}
void setup(void)
{
int i;
for (i = 4; i <= 7; i++)
pinMode(i, OUTPUT);
Serial.begin(115200); //Set Baud Rate IDE Monitor;Tested and Works for BT
Serial.println("Run WASD");
}
void loop(void)
{
if (Serial.available()) {
char val = Serial.read();
if (val != -1)
{
switch (val)
{
case 'w'://Move Forward
advance (75, 75); //Forward Max Speed
break;
case 's'://Move Backward
back_off (85, 85); //Back Max Speed
break;
case 'a'://Turn Left //Turn Left
turn_L (100, 100);
break;
case 'd'://Turn Right //Turn Right
turn_R (100, 100);
break;
case 'z':
Serial.println("Hello");
break;
case 'x': //STOP
stop();
break;
}
}
else stop();
}
}
The Code Verifies 5 Distance Sensors Change via Serial Monitor But NO WASD Control
//Standard PWM DC control
int E1 = 5; //M1 Speed Control
int E2 = 6; //M2 Speed Control
int M1 = 4; //M1 Direction Control
int M2 = 7; //M2 Direction Control
void stop(void) //Stop
{
digitalWrite(E1, LOW);
digitalWrite(E2, LOW);
}
void advance(char a, char b) //Move forward
{
analogWrite (E1, a); //PWM Speed Control
digitalWrite(M1, HIGH);
analogWrite (E2, b);
digitalWrite(M2, HIGH);
}
void back_off (char a, char b) //Move backward
{
analogWrite (E1, a);
digitalWrite(M1, LOW);
analogWrite (E2, b);
digitalWrite(M2, LOW);
}
void turn_L (char a, char b) //Turn Left
{
analogWrite (E1, a);
digitalWrite(M1, LOW);
analogWrite (E2, b);
digitalWrite(M2, HIGH);
}
void turn_R (char a, char b) //Turn Right
{
analogWrite (E1, a);
digitalWrite(M1, HIGH);
analogWrite (E2, b);
digitalWrite(M2, LOW);
}
void setup(void)
{
int A0; //Using Analog pin zero CONNECT Distance Sensor BLUE wire-5 sensors are wired parallel
Serial.begin (115200); //COM for DISTANCE SENSORS
pinMode (A0, INPUT);
int i; //COM for USB/IDE
for (i = 4; i <= 7; i++)
pinMode(i, OUTPUT);
Serial.begin(115200); //Set Baud Rate IDE Monitor
Serial.println("Run WASD");
}
void loop(void)
{
uint16_t value = analogRead (A0); //DISTANCE SENSOR CODE BEGIN
uint16_t range = get_gp2d12 (value);
Serial.println (value);
Serial.print (range);
Serial.println (" mm");
Serial.println ();
delay (500);
}
uint16_t get_gp2d12 (uint16_t value) {
if (value < 10) value = 10;
return ((67870.0 / (value - 3.0)) - 40.0); //DISTANCE SENSOR CODE END
if (Serial.available()){ //If Serial or BT use WASD to move HCR Robot
char val = Serial.read();
if (val != -1)
{
switch (val)
{
case 'w'://Move Forward
advance (255, 255); //Forward Max Speed
break;
case 's'://Move Backward
back_off (255, 255); //Back Max Speed
break;
case 'a'://Turn Left //Turn Left
turn_L (100, 100);
break;
case 'd'://Turn Right //Turn Right
turn_R (100, 100);
break;
case 'z':
Serial.println("Hello");
break;
case 'x': //STOP
stop();
break;
}
}
else stop();
}
}