Someone I know keeps getting this error message when he tries to upload onto his Arduino "Arduino error: we keep getting a exit status 1 error". What needs to be done to resolve this?
Arduino error: we keep getting a exit status 1 error
That's a new one on me.
Are you sure that's what it says?
(deleted)
TheMemberFormerlyKnownAsAWOL:
That's a new one on me.Are you sure that's what it says?
Not really, that's what he fowarded to me, I think it's a status error 1 though.
Just checked some other posts on here and I think it's something as small as leaving out void setup/void loop
He can only manage to get this message right now because he is not with the machine the problem is on right now.
arduino exit status 1 error compiling for board arduino/genuino uno
If that isn't enough of the error message I will need to get it tomorrow.
In the image in reply #3 is a button "copy error t". Let the user click that after the error and paste it in an email to you.
Next you can copy it from the email and paste it here.
It's a compile error, so code also needs to be provided.
Could you take a few moments to Learn How To Use The Forum.
Other general help and troubleshooting advice can be found here.
It will help you get the best out of the forum in the future.
Please also forward those links to your friend.
Bob.
Hi Bob, I will do so later, but I'm at work and there is a deadline I have to meet in hour so I don't have time to read through it now, here is the whole error message:
Arduino: 1.8.12 (Windows 10), Board: "Arduino Uno"
CodeSpace_Template:7:10: fatal error: LiquidCrystal_I2C.h: No such file or directory
#include <LiquidCrystal_I2C.h>
^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
exit status 1
LiquidCrystal_I2C.h: No such file or directory
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
He did, here's the code though, maybe you have another suggestion.
//CodeSpace Test Script Template
//Tests motors, PING and LCD
//DO NOT EDIT
//includes and declarations
//include libraries
#include <Servo.h>
#include <IRremote.h>
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE);
//IR initiate
const int RECV_PIN = 7; IRrecv irrecv(RECV_PIN); decode_results results;
//Declare servos
Servo rightWheel;
Servo leftWheel;
Servo pingMotor;
//declare PING input/output
const int trigPin = 5;
const int echoPin = 6;
//set servo position
int lookForward = 100;
int lookRight = 43;
int lookLeft = 123;
//define variable dduration
long duration;
long distance;
//End of template
//function to move robot forward
void forward(){
leftWheel.writeMicroseconds(2000);
rightWheel.writeMicroseconds(1000);
lcd.setCursor(0,1); lcd.clear(); lcd.print("moving forward");
delay(1000);
}
//function to move robot backwards
void backwards(){
leftWheel.writeMicroseconds(1000);
rightWheel.writeMicroseconds(2000);
lcd.setCursor(0,1); lcd.clear(); lcd.print("moving backwards");
delay(1000);
}
//function to turn robot left
void turnLeft() {
leftWheel.writeMicroseconds(1000);
rightWheel.writeMicroseconds(1000);
lcd.setCursor(0,1); lcd.clear(); lcd.print("turning left");
delay(400);
}
//function to turn robot right
void turnRight(){
leftWheel.writeMicroseconds(2000);
rightWheel.writeMicroseconds(2000);
lcd.setCursor(0,1); lcd.clear(); lcd.print("turning right");
delay(400);
}
//function to get distance from objects
void getDistance(){
//clears the trigpin
digitalWrite(trigPin, LOW);
delayMicroseconds(2);
//sets the trigpin on High state for 10 microseconds
digitalWrite(trigPin, HIGH);
delayMicroseconds(10);
digitalWrite(trigPin, LOW);
//reads the echopin, returns the sound wave travel time in microseconds
duration = pulseIn(echoPin, HIGH);
distance = (0.034duration)/2;
lcd.setCursor(0,1); lcd.clear(); lcd.print(distance);
}
//function to stop robot
void stopRobot() {
leftWheel.writeMicroseconds(1500);
rightWheel.writeMicroseconds(1500);
lcd.setCursor(0,1); lcd.clear(); lcd.print("stopping");
delay(1000);
}
//function to test pingMotor moves left and right
void pingMovement() {
pingMotor.write(43);
delay(500);
pingMotor.write(100);
delay(500);
pingMotor.write(145);
delay(500);
pingMotor.write(100);
}
void setup()
//put code below to run once
{
//Assign servo digital pins
rightWheel.attach(2);
leftWheel.attach(3);
pingMotor.attach(4);
lcd.begin(16, 2); lcd.setCursor(0, 0); lcd.print("CodeSpace"); //LCD set cursor: (x,y)
lcd.setCursor(0, 1); lcd.print("Robotics");
delay(1000);
lcd.begin(16, 2); lcd.setCursor(0, 0); lcd.print("Testing");
lcd.setCursor(0, 1); lcd.print("Robot");
//IR receive
irrecv.enableIRIn(); //start receiver
//PING Pulse set
pinMode(trigPin, OUTPUT); // Sets the trigPin as an Output
pinMode(echoPin, INPUT); // Sets the echoPin as an Input
duration = pulseIn(echoPin, HIGH);
distance = (0.034duration)/2;
//end of template setup
//code to run once: all movement tests
leftWheel.writeMicroseconds(1000);
lcd.setCursor(0,0); lcd.clear(); lcd.print("left wheel");
delay(1000);
leftWheel.writeMicroseconds(2000);
delay(1000);
leftWheel.writeMicroseconds(1500);
rightWheel.writeMicroseconds(1000);
lcd.setCursor(0,0); lcd.clear(); lcd.print("right wheel");
delay(1000);
rightWheel.writeMicroseconds(2000);
delay(1000);
//test 1: forward
lcd.setCursor(0,0); lcd.clear(); lcd.print("Test 1");
lcd.setCursor(0,1);lcd.print("Move forward");
delay(1000);
forward();
//test 2: backwards
lcd.setCursor(0,0); lcd.clear(); lcd.print("Test 2");
lcd.setCursor(0,1); lcd.print("Move backward");
delay(1000);
backwards();
//test 3: trun left
lcd.setCursor(0,0); lcd.clear(); lcd.print("Test 3");
lcd.setCursor(0,1); lcd.print("Turn left");
delay(1000);
turnLeft();
leftWheel.writeMicroseconds(1500);
rightWheel.writeMicroseconds(1500);
delay(400);
//test 4: turn right
lcd.setCursor(0,0); lcd.clear(); lcd.print("Test 4");
lcd.setCursor(0,1); lcd.print("Turn right");
delay(1000);
turnRight();
//test 5: stop Robot
lcd.setCursor(0,0); lcd.clear(); lcd.print("Test 5");
lcd.setCursor(0,1); lcd.print("Stop");
delay(1000);
stopRobot();
//test 6: PING motor
lcd.setCursor(0,0); lcd.clear(); lcd.print("Test 6");
lcd.setCursor(0,1);lcd.print("Move PING motor");
delay(500);
pingMovement();
//test 7: PING sensor
lcd.setCursor(0,0); lcd.clear(); lcd.print("Test 7");
lcd.setCursor(0,1);lcd.print("PING sensor");
delay(500);
pingMotor.write(100);
}
void loop()
{
//test for ping sensor
digitalWrite(trigPin, LOW);
delayMicroseconds(2);
digitalWrite(trigPin, HIGH);
delayMicroseconds(10);
digitalWrite(trigPin, LOW);
duration = pulseIn(echoPin, HIGH);
distance = (0.034*duration)/2;
lcd.setCursor(0,0); lcd.clear(); lcd.print("Distance");
lcd.setCursor(0,1); lcd.print(distance);
delay(500);
if(distance > 50)
{
leftWheel.writeMicroseconds(2000);
rightWheel.writeMicroseconds(1000);
delay(1000);
}
else {
leftWheel.writeMicroseconds(1500);
rightWheel.writeMicroseconds(1500);
delay(1000);
leftWheel.writeMicroseconds(2000);
rightWheel.writeMicroseconds(2000);
delay(400);
}
}
Maybe they attempted to install the library, but if it was correctly installed they wouldn't get that error. Please provide a detailed description of how they installed the library, including where they got it from.
(deleted)
Okay new problem
Arduino: 1.8.10 (Windows 10), Board: "Arduino/Genuino Uno"
codespace_testScript:24:53: error: 'POSITIVE' was not declared in this scope
LiquidCrystal_I2C lcd(0x27, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE);
^~~~~~~~
Multiple libraries were found for "LiquidCrystal_I2C.h"
Used: C:\Users\rmura\OneDrive\Documents\Arduino\libraries\LiquidCrystal_I2C
Multiple libraries were found for "Wire.h"
Used: C:\Program
Multiple libraries were found for "Servo.h"
Used: C:\Program
Multiple libraries were found for "IRremote.h"
Used: C:\Program
exit status 1
'POSITIVE' was not declared in this scope
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
please help
You have been asked to supply information and given links to help you.
I would suggest you slow down and go through the replies and give the information requested before people loose interest.
Bob.
Reply #14
Wrong library used. Install one library only and only base the code on the examples that come with it.