I am getting the error :
exit status 1
Error compiling for board Arduino Uno.
And this is my code for a robot project:
#include <Wire.h>
#include <EVShield.h>
#include <EVs_NXTTouch.h>
EVShield evshield(0x34,0x36);
EVs_NXTTouch touch1;
bool touchvalue;
/*Go forward at 50% speed.
Wait for the touch sensor to detect a wall in front.
Stop the robot and wait 2 seconds.
Back up 25 cm and then wait 2 seconds.
Make a 90 degree turn randomly left or right. (See the "Making a Random Choice" document below for info on how to make a random choice.)
Go forward briefly at 25% speed to allow the swivel wheel to straighten out.
Repeat. (by putting this code inside void loop(), it will automatically repeat).
*/
void setup() {
// put your setup code here, to run once:
//set up Ev Shield
evshield.init(SH_HardwareI2C);
//identify touch sensor
touch1.init(&evshield,SH_BBS1);
}
void loop() {
// put your main code here, to run repeatedly:
evshield.bank_a.motorRunUnlimited(SH_Motor_Both,SH_Direction_Reverse,50);
touchvalue = touch1.isPressed();
//if touch wall
if (touchvalue == 1) {
evshield.bank_a.motorRunDegrees(SH_Motor_Both,SH_Direction_Forward,50,90,SH_Completion_Wait_For,SH_Next_Action_Brake);
delay(2000);
}
while (!touchvalue) {
touchvalue = touch1.isPressed();
}
evshield.bank_a.motorStop(SH_Motor_Both,SH_Next_Action_Brake);
delay(2000);
evshield.bank_a.motorRunSeconds(SH_Motor_Both,SH_Direction_Forward,50,1500,SH_Completion_Wait_For,SH_Next_Action_Brake);
delay(2000);
int x = random(10) + 1;
if (x <= 5) {
evshield.bank_a.motorRunRotations(SH_Motor_1,SH_Direction_Reverse,50,90,SH_Completion_Wait_For,SH_Next_Action_Brake);
} else {
evshield.bank_a.motorRunRotations(SH_Motor_2,SH_Direction_Reverse,50,90,SH_Completion_Wait_For,SH_Next_Action_Brake);
}
evshield.bank_a.motorRunSeconds(SH_Motor_Both,SH_Direction_Forward,25,1000,SH_Completion_Wait_For,SH_Next_Action_Brake);
}