ultrasonic HC SR-04 sensor to detect objects -Compile Error

Dear Friends,
I am Rithik from Chennai, INDIA, doing 5th standard. I am very much interested in Robotics.
I am planning to build obstacle avoiding robot that uses an ultrasonic HC SR-04 sensor to detect objects.

While compiling i got following error. Please any one help me out.
I dont know what to do

Arduino: 1.6.12 (Windows 7), Board: "Arduino/Genuino Uno"

C:\Program Files (x86)\Arduino\libraries\Robot_Motor\src\ArduinoRobotMotorBoard.cpp: In member function 'void RobotMotorBoard::begin()':

C:\Program Files (x86)\Arduino\libraries\Robot_Motor\src\ArduinoRobotMotorBoard.cpp:14:2: error: 'Serial1' was not declared in this scope

Serial1.begin(9600);

^

C:\Program Files (x86)\Arduino\libraries\Robot_Motor\src\ArduinoRobotMotorBoard.cpp:19:21: error: 'MUXA' was not declared in this scope

uint8_t MuxPins={MUXA,MUXB,MUXC};

^

C:\Program Files (x86)\Arduino\libraries\Robot_Motor\src\ArduinoRobotMotorBoard.cpp:19:26: error: 'MUXB' was not declared in this scope

uint8_t MuxPins={MUXA,MUXB,MUXC};

^

C:\Program Files (x86)\Arduino\libraries\Robot_Motor\src\ArduinoRobotMotorBoard.cpp:19:31: error: 'MUXC' was not declared in this scope

uint8_t MuxPins={MUXA,MUXB,MUXC};

^

C:\Program Files (x86)\Arduino\libraries\Robot_Motor\src\ArduinoRobotMotorBoard.cpp:20:26: error: 'MUX_IN' was not declared in this scope

this->IRs.begin(MuxPins,MUX_IN,3);

^

C:\Program Files (x86)\Arduino\libraries\Robot_Motor\src\ArduinoRobotMotorBoard.cpp:21:10: error: 'MUXI' was not declared in this scope

pinMode(MUXI,INPUT);

^

C:\Program Files (x86)\Arduino\libraries\Robot_Motor\src\ArduinoRobotMotorBoard.cpp: In member function 'uint8_t RobotMotorBoard::parseCodename(uint8_t)':

C:\Program Files (x86)\Arduino\libraries\Robot_Motor\src\ArduinoRobotMotorBoard.cpp:118:11: error: 'TK1' was not declared in this scope

return TK1;

^

C:\Program Files (x86)\Arduino\libraries\Robot_Motor\src\ArduinoRobotMotorBoard.cpp:120:11: error: 'TK2' was not declared in this scope

return TK2;

^

C:\Program Files (x86)\Arduino\libraries\Robot_Motor\src\ArduinoRobotMotorBoard.cpp:122:11: error: 'TK3' was not declared in this scope

return TK3;

^

C:\Program Files (x86)\Arduino\libraries\Robot_Motor\src\ArduinoRobotMotorBoard.cpp:124:11: error: 'TK4' was not declared in this scope

return TK4;

^

C:\Program Files (x86)\Arduino\libraries\Robot_Motor\src\ArduinoRobotMotorBoard.cpp: In member function 'uint8_t RobotMotorBoard::codenameToAPin(uint8_t)':

C:\Program Files (x86)\Arduino\libraries\Robot_Motor\src\ArduinoRobotMotorBoard.cpp:136:11: error: 'A11' was not declared in this scope

return A11;

^

C:\Program Files (x86)\Arduino\libraries\Robot_Motor\src\ArduinoRobotMotorBoard.cpp: In member function 'void RobotMotorBoard::motorsWrite(int, int)':

C:\Program Files (x86)\Arduino\libraries\Robot_Motor\src\ArduinoRobotMotorBoard.cpp:174:15: error: 'IN_A1' was not declared in this scope

analogWrite(IN_A1,speedR);

^

C:\Program Files (x86)\Arduino\libraries\Robot_Motor\src\ArduinoRobotMotorBoard.cpp:175:15: error: 'IN_A2' was not declared in this scope

analogWrite(IN_A2,0);

^

C:\Program Files (x86)\Arduino\libraries\Robot_Motor\src\ArduinoRobotMotorBoard.cpp:177:15: error: 'IN_A1' was not declared in this scope

analogWrite(IN_A1,0);

^

C:\Program Files (x86)\Arduino\libraries\Robot_Motor\src\ArduinoRobotMotorBoard.cpp:178:15: error: 'IN_A2' was not declared in this scope

analogWrite(IN_A2,-speedR);

^

C:\Program Files (x86)\Arduino\libraries\Robot_Motor\src\ArduinoRobotMotorBoard.cpp:182:15: error: 'IN_B1' was not declared in this scope

analogWrite(IN_B1,speedL);

^

C:\Program Files (x86)\Arduino\libraries\Robot_Motor\src\ArduinoRobotMotorBoard.cpp:183:15: error: 'IN_B2' was not declared in this scope

analogWrite(IN_B2,0);

^

C:\Program Files (x86)\Arduino\libraries\Robot_Motor\src\ArduinoRobotMotorBoard.cpp:185:15: error: 'IN_B1' was not declared in this scope

analogWrite(IN_B1,0);

^

C:\Program Files (x86)\Arduino\libraries\Robot_Motor\src\ArduinoRobotMotorBoard.cpp:186:15: error: 'IN_B2' was not declared in this scope

analogWrite(IN_B2,-speedL);

^

C:\Program Files (x86)\Arduino\libraries\Robot_Motor\src\ArduinoRobotMotorBoard.cpp: In member function 'virtual void RobotMotorBoard::motorsStop()':

C:\Program Files (x86)\Arduino\libraries\Robot_Motor\src\ArduinoRobotMotorBoard.cpp:194:14: error: 'IN_A1' was not declared in this scope

analogWrite(IN_A1,255);

^

C:\Program Files (x86)\Arduino\libraries\Robot_Motor\src\ArduinoRobotMotorBoard.cpp:195:14: error: 'IN_A2' was not declared in this scope

analogWrite(IN_A2,255);

^

C:\Program Files (x86)\Arduino\libraries\Robot_Motor\src\ArduinoRobotMotorBoard.cpp:197:14: error: 'IN_B1' was not declared in this scope

analogWrite(IN_B1,255);

^

C:\Program Files (x86)\Arduino\libraries\Robot_Motor\src\ArduinoRobotMotorBoard.cpp:198:14: error: 'IN_B2' was not declared in this scope

analogWrite(IN_B2,255);

^

C:\Program Files (x86)\Arduino\libraries\Robot_Motor\src\ArduinoRobotMotorBoard.cpp: In member function 'void RobotMotorBoard::_readTrim()':

C:\Program Files (x86)\Arduino\libraries\Robot_Motor\src\ArduinoRobotMotorBoard.cpp:253:23: error: 'TRIM' was not declared in this scope

int value=analogRead(TRIM);

^

C:\Program Files (x86)\Arduino\libraries\Robot_Motor\src\ArduinoRobotMotorBoard.cpp: In member function 'void RobotMotorBoard::_refreshMotorAdjustment()':

C:\Program Files (x86)\Arduino\libraries\Robot_Motor\src\ArduinoRobotMotorBoard.cpp:260:33: error: 'TRIM' was not declared in this scope

motorAdjustment=map(analogRead(TRIM),0,1023,-30,30)/100.0;

^

exit status 1
Error compiling for board Arduino/Genuino Uno.

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

C:\Program Files (x86)\Arduino\libraries\Robot_Motor\src\ArduinoRobotMotorBoard.cpp:14:2: error: 'Serial1' was not declared in this scope

Serial1.begin(9600);

A Uno has only one serial port , called "Serial*.

I suspect that this is the root of some of your other problems.

Usually we need to see your code to know why it has errors, but in this case you seem to be trying to compile something intended for the old ArduinoRobot. That is completely different from a Uno including the fact that it uses a different microprocessor. I wouldn't expect code for an ArduinoRobot ever to compile or work with a Uno.

BTW it has nothing to do with the ultrasonic sensor.

Steve