Go Down

Topic: exit status 1 (Read 143758 times) previous topic - next topic

PaulS

If understanding this message:
Quote
C:\Users\lilfe\Documents\Arduino\sketch_jun08a\sketch_jun08a.ino:2:27: fatal error: RotaryEncoder.h: No such file or directory
is too difficult for you, you are not ready to own an Arduino.
The art of getting good answers lies in asking good questions.

cowh3ad

i have the same problem with this code

// Create an instance of the DRV8833:
DRV8833 driver = DRV8833();

// Pin numbers. Replace with your own!
// For this example sketch, these pin numbers MUST be PWM.
// Attach the Arduino's pin numbers below to the
// Ain1, Ain2, Bin1, and Bin2 DRV8833 pins.
const int inputA1 = 9, inputA2 = 6;

// The speed of the motors:
const int motorSpeedHigh = 255;
const int motorSpeedLow = 64;
int myDelay = 4000;

void setup() {
// put your setup code here, to run once:

// Start the serial port:
Serial.begin(9600);

// Wait for the serial port to connect. Needed for Leonardo.
while (!Serial);

// Attach the motors to the input pins:
driver.attachMotorA(inputA1, inputA2);
Serial.println("Ready!");
}

void loop() {
Serial.println("Forward:");
driver.motorAForward(motorSpeedHigh);
delay(myDelay);
driver.motorAStop();

driver.motorAForward(motorSpeedLow);
delay(myDelay);
driver.motorAStop();

Serial.println("Reverse:");
driver.motorAReverse(motorSpeedHigh);
delay(myDelay);
driver.motorAStop();

driver.motorAReverse(motorSpeedLow);
delay(myDelay);
driver.motorAStop();
}

PaulS

Quote
i have the same problem with this code
I downloaded the library, and fixed the stupid mistakes in it.

In the header file:
Code: [Select]
private:
// Fields for the class:
int a1, a2, b1, b2;
boolean motorAAttached;
boolean motorBAttached;

Member variables can NOT be initialized in the header file.

In the source file:
Code: [Select]
DRV8833::DRV8833()
{
// Does nothing.
// Use attachMotorA() and attachMotorB().
motorAAttached = false;
motorBAttached = false;
}

They should be initialized when the constructor is called.

In your sketch,
Code: [Select]
DRV8833 driver = DRV8833();
is nonsense. One NEVER invokes the constructor directly. It is invoked ONLY by new or indirectly, by creating an instance.

Code: [Select]
DRV8833 driver;

But, of course, the compiler has no idea what a DRV8833 is, if you don't include the appropriate header file.
Code: [Select]
#include <DRV8833.h>

After that, I get:

Quote
Binary sketch size: 3,136 bytes (of a 30,720 byte maximum)
The art of getting good answers lies in asking good questions.

saisuresh

hi sir,
      i tried to up load the program temperature and humidity sensor.but error came like bellow
     
     compilation terminated.

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

please tell me the solution.

PaulS

Quote
please tell me the solution.
Fix the errors that cause the program to fail to compile or link.

If you need help doing that, examine your post carefully. See if YOU can find any code. See if you can find which version of the IDE you are using. See if you can find which board you are using. I certainly can't find ANY useful information in your post.
The art of getting good answers lies in asking good questions.

helowel

i also have this prob. I'm 900% sure that my code is correct, i just change a laptop and this appear, it works perfectly fine with my old dell, but not now....


its just a code that light the LED ring.

can anyone help?????

#include <Adafruit_NeoPixel.h>

Adafruit_NeoPixel strip = Adafruit_NeoPixel(12, 0, NEO_GRB + NEO_KHZ800);

//Do not change
#define BLACK strip.Color(0, 0, 0)
#define WHITE strip.Color(127, 127, 127)
#define RED strip.Color(255, 0, 0)
#define GREEN strip.Color(0, 255, 0)
#define BLUE strip.Color(0, 0, 255)
#define YELLOW strip.Color(255, 255, 0)
#define PURPLE strip.Color(127, 0, 127)

#define SPEED 100


void setup() {
  pinMode(2, INPUT_PULLUP);
  strip.begin();
  strip.show();
}

void loop() {
  colorWipe(BLACK, SPEED);
  while(digitalRead(2) == HIGH);
  while(digitalRead(2) == LOW);
  delay(100);
  colorWipe(RED, SPEED);
  while(digitalRead(2) == HIGH);
  while(digitalRead(2) == LOW);
  delay(100);
  colorWipe(GREEN, SPEED);
  while(digitalRead(2) == HIGH);
  while(digitalRead(2) == LOW);
  delay(100);
  colorWipe(BLUE, SPEED);
  while(digitalRead(2) == HIGH);
  while(digitalRead(2) == LOW);
  delay(100);
  colorWipe(YELLOW, SPEED);
  while(digitalRead(2) == HIGH);
  while(digitalRead(2) == LOW);
  delay(100);
  colorWipe(PURPLE, SPEED);
  while(digitalRead(2) == HIGH);
  while(digitalRead(2) == LOW);
  delay(100);
  colorWipe(BLACK, SPEED);
  spin(GREEN, SPEED/2);
  colorWipe(BLACK, 0);
  while(digitalRead(2) == HIGH);
  while(digitalRead(2) == LOW);
  delay(100);
  rainbowSpin(5);
}

void colorWipe(uint32_t c, uint8_t wait) {
  for(uint16_t i=0; i<strip.numPixels(); i++) {
    strip.setPixelColor(i, c);
    strip.show();
    delay(wait);
  }
}

void rainbowSpin(uint8_t wait) {
  uint16_t i, j;

  for(j=0; j<256*10; j++) {
    for(i=0; i< strip.numPixels(); i++) {
      strip.setPixelColor(i, Wheel(((i * 256 / strip.numPixels()) + j) & 255));
    }
    strip.show();
    delay(wait);
  }
 
}

void spin(uint32_t c, uint8_t wait) {
  for (int j=0; j < 10; j++) { 
    for(int i=0; i < strip.numPixels(); i++) {
      strip.setPixelColor(i, c);
      if(i < 12) strip.setPixelColor(i+1, c);
      else strip.setPixelColor(0, c);
      strip.show();
      delay(wait);
      strip.setPixelColor(i, 0);
      if(i < 12) strip.setPixelColor(i+1, 0);
      else strip.setPixelColor(0, 0);
    }
  }
}


uint32_t Wheel(byte WheelPos) {
  WheelPos = 255 - WheelPos;
  if(WheelPos < 85) {
    return strip.Color(255 - WheelPos * 3, 0, WheelPos * 3);
  }
  if(WheelPos < 170) {
    WheelPos -= 85;
    return strip.Color(0, WheelPos * 3, 255 - WheelPos * 3);
  }
  WheelPos -= 170;
  return strip.Color(WheelPos * 3, 255 - WheelPos * 3, 0);
}

PaulS

Quote
I'm 900% sure that my code is correct
That seems to leave some room for doubt. 8)

It is hardly useful for any of us to compile that code and tell you that it compiles just fine. What problems, EXACTLY, are YOU having?
The art of getting good answers lies in asking good questions.

ProCactus

#22
Sep 05, 2016, 09:01 am Last Edit: Sep 05, 2016, 10:45 am by ProCactus
G'Day People, Sorry to say this is my first post. I also getting similar issue and im still new to C and Arduinos. I get the console text .. .

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

I googled "exit status 1" this page was the 2nd result.
Im starting to think it has something to do with the library's. It seems anything to do with microphone frequency code gives me that error. Even the example "SimpleAudioFrequencyMeter" wont compile.

edit: I first thought it was the CPU type, I have UNO, DUE and ESP8266. All same result :(

PaulS

Quote
I get the console text .. .

exit status 1
Error compiling for board Arduino/Genuino Uno.
Is that the ONLY message? Typically, that appears after a bunch of other messages.
The art of getting good answers lies in asking good questions.

Nirmalkumar_P

I'm new to Arduino, my compiler is showing Exit Status 1 for this simple program, Could anyone help??


int ledPin = 13;

void setup()
{
  pinMode(ledPin, OUTPUT);
 
}

void loop()
{
digitalWrite(ledPin, HIGH);
delay(1000);
digitalWrite(ledPin, LOW);
delay(1000);
 
}

PaulS

Quote
I'm new to Arduino, my compiler is showing Exit Status 1 for this simple program
When you do what? For what board? With what version of the IDE?
The art of getting good answers lies in asking good questions.

turtleracing

any one know how to fix this i can attach the code as well if needed

turtleracing


void loop() {
 int tempreading1 = analogRead (Temp1);

  Serial.print ("Switch1Stats"); Serial.print ("   ");Serial.println (Switch1);
  Serial.println("");
    Serial.print ("Relay2Stats"); Serial.print ("   ");Serial.println (RELAY2STATS);
  Serial.println("");
    Serial.print ("TEMP1Reading"); Serial.print ("   ");Serial.println (tempreading1);
  Serial.println("");
  Serial.print ("Relay3Stats"); Serial.print ("   ");Serial.println (RELAY3STATS);
  Serial.println("");
 
 
 

  int reading = digitalRead(Switch1);
  if(reading !=lastButtonState){// reset the debouncing timer
    lastDebounceTime=millis();}
  if((millis()- lastDebounceTime)>debounceDelay){//whatever the reading is at, its been there longer for longer
    //than the debounce delay, so take it as actual current state:
    //if the button state has changed:
    if(reading != button1state){
      button1state= reading;
      //only toggle relay if the new button state is high
      if(button1state == HIGH){Relay2State=!Relay2State;
     digitalWrite (Relay2,Relay2State);
     lastButtonState = reading; }
     
     
     
 
     

CrossRoads

More }s at the end of the code to mate up the the {s.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

turtleracing


Go Up