exit status 1

C:\Program Files (x86)\Arduino\libraries\RobotIRremote\src\IRremoteTools.cpp

Do you have an official Arduino robot? If not, why do you need to keep this file? Delete it, and problems with compiling the file will go away.

PaulS:
Do you have an official Arduino robot? If not, why do you need to keep this file? Delete it, and problems with compiling the file will go away.

The file included in the sketch is IRremote.h, so deleting the file IRremoteTools.cpp would cause a file not found error. Deleting the entire C:\Program Files (x86)\Arduino\libraries\RobotIRremote folder will do the trick, assuming the IRremote library has been installed but every time you update to a new version of the Arduino IDE you will need to delete the RobotIRremote library again so it's better to just properly install the IRremote library, which will give the correct IRremote.h file include priority over the one in the RobotIRremote folder. The Library Manager installation of the library will automatically do this by ensuring that the included file name matches the library folder name.

The file included in the sketch is IRremote.h, so deleting the file IRremoteTools.cpp would cause a file not found error.

Total non-sequitor.

The FILE being compiled, when the error occurs, is IRremoteTools.cpp. Deleting that file will prevent it from being compiled.

When the sketch is compiled, the presence or absence of some other cpp file is completely irrelevant.

The absence of IRremoteTools.cpp might cause a linker error, but that will certainly not involve the phrase "file not found".

PaulS:
Total non-sequitor.

The FILE being compiled, when the error occurs, is IRremoteTools.cpp. Deleting that file will prevent it from being compiled.

When the sketch is compiled, the presence or absence of some other cpp file is completely irrelevant.

The absence of IRremoteTools.cpp might cause a linker error, but that will certainly not involve the phrase "file not found".

I too have the same error, but with the message:

"C:\Users\Abhishek Gaywala\Documents\Arduino\libraries\SoftwareServo/SoftwareServo.h:4:22: fatal error: WProgram.h: No such file or directory

#include <WProgram.h>"

And as far as I can understand, (from this link: Redirecting) is that Wprogram is the core library.

I'm using a code to run two servos with a joystick, using a pair of NRF24L01 radio, using the RF24 library. this library calls for the use of SoftwareServo library (Downloaded from: Arduino Playground - HomePage), because the regular servo library causes timer conflicts.

How do I replace/repair the Wprogram library? I can't even delete that library, right?

Abhishek_G:
I too have the same error, but with the message:

"C:\Users\Abhishek Gaywala\Documents\Arduino\libraries\SoftwareServo/SoftwareServo.h:4:22: fatal error: WProgram.h: No such file or directory

#include <WProgram.h>"

And as far as I can understand, (from this link: Redirecting) is that Wprogram is the core library.

I'm using a code to run two servos with a joystick, using a pair of NRF24L01 radio, using the RF24 library. this library calls for the use of SoftwareServo library (Downloaded from: Arduino Playground - HomePage), because the regular servo library causes timer conflicts.

How do I replace/repair the Wprogram library? I can't even delete that library, right?

Okay, so I'm answering my own question.

I did a little bit of digging, and came to know that Wprogram.h is an outdated file. The newer versions of the IDE support the Arduino.h file.
So all I had to do was to replace the "#include Wprogram.h" with "#include Arduino.h" in the SoftwareServo header files, and then I was good to go.

Glad to have found this thread.

Had the same problem too. Need help with this coding. Currently using genuino 101 board.

/*
* The code is released under the GNU General Public License.
* Developed by www.codekraft.it 
*/

#include "CurieImu.h"

// IMU
float FS_SEL = 131;                                  // IMU gyro values to degrees/sec
unsigned long last_read_time;
float angle_x, angle_y, angle_z;                     // These are the result angles
float last_x_angle, last_y_angle, last_z_angle;      // These are the filtered angles
float lGXA, lGYA, lGZA;                              // Store the gyro angles to compare drift

// FUNCTIONS
//Math
//Convert radians to degrees
double rtod(double fradians) {return(fradians * 180.0 / PI);}

void set_last_read_angle_data(unsigned long time, float x, float y, float z, float x_gyro, float y_gyro, float z_gyro) {
  last_read_time = time;
  last_x_angle = x; last_y_angle = y; last_z_angle = z;
  lGXA = x_gyro; lGYA = y_gyro; lGZA = z_gyro;
}

void setup() {
  
  Serial.begin(9600);
  while (!Serial);

  // init CurieImu
  CurieImu.initialize();
  // use the code below to calibrate accel/gyro offset values
  Serial.println("Internal sensor offsets BEFORE calibration...");
  Serial.print(CurieImu.getXAccelOffset()); 
  Serial.print("\t"); // -76
  Serial.print(CurieImu.getYAccelOffset()); 
  Serial.print("\t"); // -235
  Serial.print(CurieImu.getZAccelOffset()); 
  Serial.print("\t"); // 168
  Serial.print(CurieImu.getXGyroOffset()); 
  Serial.print("\t"); // 0
  Serial.print(CurieImu.getYGyroOffset()); 
  Serial.print("\t"); // 0
  Serial.println(CurieImu.getZGyroOffset());
  Serial.println("About to calibrate. Make sure your board is stable and upright");
  delay(1000);
  // The board must be resting in a horizontal position for 
  // the following calibration procedure to work correctly!
  Serial.print("Starting Gyroscope calibration...");
  CurieImu.autoCalibrateGyroOffset();
  Serial.println(" Done");
  Serial.print("Starting Acceleration calibration...");
  CurieImu.autoCalibrateXAccelOffset(0);
  CurieImu.autoCalibrateYAccelOffset(0);
  CurieImu.autoCalibrateZAccelOffset(1);
  Serial.println(" Done");
  Serial.println("Enabling Gyroscope/Acceleration offset compensation");
  CurieImu.setGyroOffsetEnabled(true);
  CurieImu.setAccelOffsetEnabled(true);

  set_last_read_angle_data(millis(), 0, 0, 0, 0, 0, 0);
}
 
void loop() {
  unsigned long t_now = millis();
  int ax = CurieImu.getAccelerationX();
  int ay = CurieImu.getAccelerationY();
  int az = CurieImu.getAccelerationZ();
  int gx = CurieImu.getRotationX();
  int gy = CurieImu.getRotationY();
  int gz = CurieImu.getRotationZ();


  // Convert gyro values to degrees/sec
  float gyro_x = gx/FS_SEL;
  float gyro_y = gy/FS_SEL;
  float gyro_z = gz/FS_SEL;

   // Compute the accel angles
  float accelX = rtod(atan(ay / sqrt( pow(ax, 2) + pow(az, 2))));
  float accelY = rtod(-1 * atan(ax/sqrt(pow(ay,2) + pow(az,2))));
  
  // Compute the (filtered) gyro angles
  float dt =(t_now - last_read_time)/1000.0;
  float gyroX = gyro_x*dt + last_x_angle;
  float gyroY = gyro_y*dt + last_y_angle;
  float gyroZ = gyro_z*dt + last_z_angle;  

  // Compute the drifting gyro angles
  float unfiltered_gyro_angle_x = gyro_x*dt + lGXA;
  float unfiltered_gyro_angle_y = gyro_y*dt + lGYA;
  float unfiltered_gyro_angle_z = gyro_z*dt + lGZA;
  
  // Apply the complementary filter to figure out the change in angle 
  // Alpha depends on the sampling rate...
  float alpha = 0.96;
  angle_x = alpha*gyroX + (1.0 - alpha)*accelX;
  angle_y = alpha*gyroY + (1.0 - alpha)*accelY;
  angle_z = gyroZ;  //Accelerometer doesn't give z-angle

  // Update the saved data with the latest values
  set_last_read_angle_data(t_now, angle_x, angle_y, angle_z, unfiltered_gyro_angle_x, unfiltered_gyro_angle_y, unfiltered_gyro_angle_z);

  Serial.print("Y:" );
  Serial.print(angle_y);
  Serial.print("  \t Z:" );
  Serial.print(angle_z);
  Serial.print("  \t X:" );
  Serial.println(angle_x); 

}

Mdzain:
Had the same problem too. Need help with this coding. Currently using genuino 101 board.

"exit status 1" is the most generic possible error message. It is absolutely not helpful to group problems by this error message. You need to scroll up the black console window at the bottom of the Arduino IDE window and read the FULL compiler output, not just the last line. If you don't learn that then you will never have a chance of any success with Arduino.

When you encounter an error and want help from the forum you need to provide us the full error output. You will see a button on the right side of the orange bar "Copy error messages". Click that button then paste the error in a forum post using code tags.

In this case I can see the problem from looking at your code. The geniuses at Intel decided to rename the CurieImu library to CurieIMU. So you only need to change the line:

#include "CurieImu.h"

to:

#include "CurieIMU.h"

Forgot to add, you need to do a search and replace to change all other instances of CurieImu with CurieIMU. Updated code:

/*
* The code is released under the GNU General Public License.
* Developed by www.codekraft.it
*/

#include "CurieIMU.h"

// IMU
float FS_SEL = 131;                                  // IMU gyro values to degrees/sec
unsigned long last_read_time;
float angle_x, angle_y, angle_z;                     // These are the result angles
float last_x_angle, last_y_angle, last_z_angle;      // These are the filtered angles
float lGXA, lGYA, lGZA;                              // Store the gyro angles to compare drift

// FUNCTIONS
//Math
//Convert radians to degrees
double rtod(double fradians) {return(fradians * 180.0 / PI);}

void set_last_read_angle_data(unsigned long time, float x, float y, float z, float x_gyro, float y_gyro, float z_gyro) {
  last_read_time = time;
  last_x_angle = x; last_y_angle = y; last_z_angle = z;
  lGXA = x_gyro; lGYA = y_gyro; lGZA = z_gyro;
}

void setup() {
 
  Serial.begin(9600);
  while (!Serial);

  // init CurieIMU
  CurieIMU.initialize();
  // use the code below to calibrate accel/gyro offset values
  Serial.println("Internal sensor offsets BEFORE calibration...");
  Serial.print(CurieIMU.getXAccelOffset());
  Serial.print("\t"); // -76
  Serial.print(CurieIMU.getYAccelOffset());
  Serial.print("\t"); // -235
  Serial.print(CurieIMU.getZAccelOffset());
  Serial.print("\t"); // 168
  Serial.print(CurieIMU.getXGyroOffset());
  Serial.print("\t"); // 0
  Serial.print(CurieIMU.getYGyroOffset());
  Serial.print("\t"); // 0
  Serial.println(CurieIMU.getZGyroOffset());
  Serial.println("About to calibrate. Make sure your board is stable and upright");
  delay(1000);
  // The board must be resting in a horizontal position for
  // the following calibration procedure to work correctly!
  Serial.print("Starting Gyroscope calibration...");
  CurieIMU.autoCalibrateGyroOffset();
  Serial.println(" Done");
  Serial.print("Starting Acceleration calibration...");
  CurieIMU.autoCalibrateXAccelOffset(0);
  CurieIMU.autoCalibrateYAccelOffset(0);
  CurieIMU.autoCalibrateZAccelOffset(1);
  Serial.println(" Done");
  Serial.println("Enabling Gyroscope/Acceleration offset compensation");
  CurieIMU.setGyroOffsetEnabled(true);
  CurieIMU.setAccelOffsetEnabled(true);

  set_last_read_angle_data(millis(), 0, 0, 0, 0, 0, 0);
}
 
void loop() {
  unsigned long t_now = millis();
  int ax = CurieIMU.getAccelerationX();
  int ay = CurieIMU.getAccelerationY();
  int az = CurieIMU.getAccelerationZ();
  int gx = CurieIMU.getRotationX();
  int gy = CurieIMU.getRotationY();
  int gz = CurieIMU.getRotationZ();


  // Convert gyro values to degrees/sec
  float gyro_x = gx/FS_SEL;
  float gyro_y = gy/FS_SEL;
  float gyro_z = gz/FS_SEL;

   // Compute the accel angles
  float accelX = rtod(atan(ay / sqrt( pow(ax, 2) + pow(az, 2))));
  float accelY = rtod(-1 * atan(ax/sqrt(pow(ay,2) + pow(az,2))));
 
  // Compute the (filtered) gyro angles
  float dt =(t_now - last_read_time)/1000.0;
  float gyroX = gyro_x*dt + last_x_angle;
  float gyroY = gyro_y*dt + last_y_angle;
  float gyroZ = gyro_z*dt + last_z_angle; 

  // Compute the drifting gyro angles
  float unfiltered_gyro_angle_x = gyro_x*dt + lGXA;
  float unfiltered_gyro_angle_y = gyro_y*dt + lGYA;
  float unfiltered_gyro_angle_z = gyro_z*dt + lGZA;
 
  // Apply the complementary filter to figure out the change in angle
  // Alpha depends on the sampling rate...
  float alpha = 0.96;
  angle_x = alpha*gyroX + (1.0 - alpha)*accelX;
  angle_y = alpha*gyroY + (1.0 - alpha)*accelY;
  angle_z = gyroZ;  //Accelerometer doesn't give z-angle

  // Update the saved data with the latest values
  set_last_read_angle_data(t_now, angle_x, angle_y, angle_z, unfiltered_gyro_angle_x, unfiltered_gyro_angle_y, unfiltered_gyro_angle_z);

  Serial.print("Y:" );
  Serial.print(angle_y);
  Serial.print("  \t Z:" );
  Serial.print(angle_z);
  Serial.print("  \t X:" );
  Serial.println(angle_x);

}

Wrightjk284:
I have the same problem - I am trying to get the Trinket to work a servo and am not sure what part of the coder is wrong. Here is the code which I copied off the Adafruit Soft Servo Library- Arduino Code | Trinket (& Gemma) Servo Control | Adafruit Learning System.

Can anyone help?

/*******************************************************************
SoftServo sketch for Adafruit Trinket. Turn the potentiometer knob
to set the corresponding position on the servo
(0 = zero degrees, full = 180 degrees)

Required library is the Adafruit_SoftServo library
available at GitHub - adafruit/Adafruit_SoftServo: A lightweight software servo library, designed for Trinket/Gemma but good for other Arduino-compats
The standard Arduino IDE servo library will not work with 8 bit
AVR microcontrollers like Trinket and Gemma due to differences
in available timer hardware and programming. We simply refresh
by piggy-backing on the timer0 millis() counter

Required hardware includes an Adafruit Trinket microcontroller
a servo motor, and a potentiometer (nominally 1Kohm to 100Kohm

As written, this is specifically for the Trinket although it should
be Gemma or other boards (Arduino Uno, etc.) with proper pin mappings

Trinket: USB+ Gnd Pin #0 Pin #2 A1
Connection: Servo+ - Servo1 Potentiometer wiper

*******************************************************************/

#include <Adafruit_SoftServo.h> // SoftwareServo (works on non PWM pins)

#define SERVO1PIN 0 // Servo control line (orange) on Trinket Pin #0

#define POTPIN 1 // Potentiometer sweep (center) on Trinket Pin #2 (Analog 1)

Adafruit_SoftServo myServo1, myServo2; //create TWO servo objects

void setup() {
// Set up the interrupt that will refresh the servo for us automagically
OCR0A = 0xAF; // any number is OK
TIMSK0 |= _BV(OCIE0A); // Turn on the compare interrupt (below!)

myServo1.attach(SERVO1PIN); // Attach the servo to pin 0 on Trinket
myServo1.write(90); // Tell servo to go to position per quirk
delay(15); // Wait 15ms for the servo to reach the position
}

void loop() {
int potValue; // variable to read potentiometer
int servoPos; // variable to convert voltage on pot to servo position
potValue=analogRead(POTPIN); // Read voltage on potentiometer
servoPos = map(potValue, 0, 1023, 0, 179); // scale it to use it with the servo (value between 0 and 180)
myServo1.write(servoPos); // tell servo to go to position

delay(15); // waits 15ms for the servo to reach the position
}

// We'll take advantage of the built in millis() timer that goes off
// to keep track of time, and refresh the servo every 20 milliseconds
// The SIGNAL(TIMER0_COMPA_vect) function is the interrupt that will be
// Called by the microcontroller every 2 milliseconds
volatile uint8_t counter = 0;
SIGNAL(TIMER0_COMPA_vect) {
// this gets called every 2 milliseconds
counter += 2;
// every 20 milliseconds, refresh the servos!
if (counter >= 20) {
counter = 0;
myServo1.refresh();
}
}

hello,
here is the error that i am getting when i am trying to compile my code in arduino. can you please help me to get through it????

C:\Users\Ramya\Desktop\Arduino\hardware\tools\avr/bin/avr-ar: unable to rename 'core\core.a'; reason: Permission denied

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

can you please help me to get through it?

backwards.
working
and
end
the
at
starting
by
problems
solving
start
not
does
One

Fix the first error listed FIRST. Mr Google positively does not bite.

#include <Adafruit_NeoPixel.h>
#include <avr/power.h>

#define PIN 6

/*
GLOWBOARD CODE

Achtung! Du musst die Anzahl der LEDs anpassen. Bei mir waren es 68. Ändere die Variable ledsGesamt.
*/

int ledsGesamt = 60;

// Parameter 1 = number of pixels in strip
// Parameter 2 = Arduino pin number (most are valid)
// Parameter 3 = pixel type flags, add together as needed:
// NEO_KHZ800 800 KHz bitstream (most NeoPixel products w/WS2812 LEDs)
// NEO_KHZ400 400 KHz (classic 'v1' (not v2) FLORA pixels, WS2811 drivers)
// NEO_GRB Pixels are wired for GRB bitstream (most NeoPixel products)
// NEO_RGB Pixels are wired for RGB bitstream (v1 FLORA pixels, not v2)
Adafruit_NeoPixel strip = Adafruit_NeoPixel(ledsGesamt, PIN, NEO_GRB + NEO_KHZ800);

// IMPORTANT: To reduce NeoPixel burnout risk, add 1000 uF capacitor across
// pixel power leads, add 300 - 500 Ohm resistor on first pixel's data input
// and minimize distance between Arduino and first pixel. Avoid connecting
// on a live circuit...if you must, connect GND first.

void setup() {
// This is for Trinket 5V 16MHz, you can remove these three lines if you are not using a Trinket
#if defined (AVR_ATtiny85)
if (F_CPU == 16000000) clock_prescale_set(clock_div_1);
#endif
// End of trinket special code

strip.begin();
strip.show(); // Initialize all pixels to 'off'
}

void loop() {
// Some example procedures showing how to display to the pixels:
colorWipe(strip.Color(255, 0, 0), 30); // Red
colorWipe(strip.Color(0, 255, 0), 30); // Green
colorWipe(strip.Color(0, 0, 255), 30); // Blue
// Send a theater pixel chase in...
theaterChase(strip.Color(127, 127, 127), 50); // White
/theaterChase(strip.Color(127, 0, 0), 50); // Red
theaterChase(strip.Color( 0, 0, 127), 50); // Blue
/

/* rainbow(10);*/
rainbowCycle(5);
theaterChaseRainbow(40);
}

// Fill the dots one after the other with a color
void colorWipe(uint32_t c, uint8_t wait) {
for(uint16_t i=0; i<strip.numPixels()/2; i++) {
strip.setPixelColor(i, c);
strip.setPixelColor(strip.numPixels()-i, c);
strip.show();
delay(wait);
}
}

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

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

// Slightly different, this makes the rainbow equally distributed throughout
void rainbowCycle(uint8_t wait) {
uint16_t i, j;

for(j=0; j<256*5; j++) { // 5 cycles of all colors on wheel
for(i=0; i< strip.numPixels()/2; i++) {
strip.setPixelColor(strip.numPixels()/2-i, Wheel(((i * 256 / strip.numPixels()) + j) & 255));
strip.setPixelColor(strip.numPixels()/2+i, Wheel(((i * 256 / strip.numPixels()) + j) & 255));
}
strip.show();
delay(wait);
}
}

//Theatre-style crawling lights.
void theaterChase(uint32_t c, uint8_t wait) {
for (int j=0; j<40; j++) { //do 10 cycles of chasing
for (int q=0; q < 3; q++) {
for (int i=0; i < strip.numPixels()/2; i=i+3) {
strip.setPixelColor(i+q, c); //turn every third pixel on
strip.setPixelColor(strip.numPixels()-(i+q), c); //turn every third pixel on
}
strip.show();

delay(wait);

for (int i=0; i < strip.numPixels()/2; i=i+3) {
strip.setPixelColor(i+q, 0); //turn every third pixel off
strip.setPixelColor(strip.numPixels()-(i+q), 0); //turn every third pixel off
}
}
}
}

//Theatre-style crawling lights with rainbow effect
void theaterChaseRainbow(uint8_t wait) {
for (int j=0; j < 256; j++) { // cycle all 256 colors in the wheel
for (int q=0; q < 3; q++) {
for (int i=0; i < strip.numPixels()/2; i=i+3) {
strip.setPixelColor(i+q, Wheel( (i+j) % 255)); //turn every third pixel on
strip.setPixelColor(strip.numPixels()-(i+q), Wheel( (i+j) % 255)); //turn every third pixel on
}
strip.show();

delay(wait);

for (int i=0; i < strip.numPixels()/2; i=i+3) {
strip.setPixelColor(i+q, 0); //turn every third pixel off
strip.setPixelColor(strip.numPixels()-(i+q), 0); //turn every third pixel off
}
}
}
}

// Input a value 0 to 255 to get a color value.
// The colours are a transition r - g - b - back to r.
uint32_t Wheel(byte WheelPos) {
WheelPos = 255 - WheelPos;
if(WheelPos < 85) {
return strip.Color(255 - WheelPos * 3, 0, WheelPos * 3);
} else if(WheelPos < 170) {
WheelPos -= 85;
return strip.Color(0, WheelPos * 3, 255 - WheelPos * 3);
} else {
WheelPos -= 170;
return strip.Color(WheelPos * 3, 255 - WheelPos * 3, 0);
}
}

who is the error?

apeandrefan:
who is the error?

You are.

Please use code tags (</> button on the toolbar) when you post code or warning/error messages. The reason is that the forum software can interpret parts of your code as markup, leading to confusion, wasted time, and a reduced chance for you to get help with your problem. This will also make it easier to read your code and to copy it to the IDE or editor. Using code tags and other important information is explained in the How to use this forum post. Please read it.

Please always do a Tools > Auto Format on your code before posting it. This will make it easier for you to spot bugs and make it easier for us to read.

When your code requires a library that's not included with the Arduino IDE please always post a link(using the chain link icon on the toolbar to make it clickable) to where you downloaded that library from or if you installed it using Library Manger(Sketch > Include Library > Manage Libraries) then say so and state the full name of the library.

When you encounter an error you'll see a button on the right side of the orange bar "Copy error messages". Click that button. Paste the error in a message here using code tags.

And as always, "exit status 1" is the most generic possible error and there is absolutely no point in grouping a bunch of otherwise unrelated posts in one thread. I do appreciate that everyone here took the time to search for a related thread, rather than creating a duplicate one but using this one really doesn't make any sense. You need to look at the full error output but scrolling all the way up to the top of the black console window at the bottom of the Arduino IDE window. There is a lot more than the last couple lines that you happen to see at a glance. This should be obvious from the little scroll bar at the right side of the window, extremely basic computer knowledge that you should have if you're going to attempt to work with Arduino.

I too had the same problem. Its an urgent project so please help me fast.

this is my error message:

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

C:\Users\Vincent\Desktop\cnc plotter\arduino_code\arduino_code.ino:2:21: fatal error: AFMotor.h: No such file or directory

#include <AFMotor.h>

^

compilation terminated.

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.

arduino_code.ino (9.61 KB)

I too had the same problem. Its an urgent project, please help me fast.

This is my error message :

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

C:\Users\Vincent\Desktop\cnc plotter\arduino_code\arduino_code.ino:2:21: fatal error: AFMotor.h: No such file or directory

#include <AFMotor.h>

^

compilation terminated.

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.

Code is uploaded. Please download it:

arduino_code.ino (9.61 KB)

Please use code tags (</> button on the toolbar) when you post code or warning/error messages. The reason is that the forum software can interpret parts of your code as markup, leading to confusion, wasted time, and a reduced chance for you to get help with your problem. This will also make it easier to read your code and to copy it to the IDE or editor. Using code tags and other important information is explained in the How to use this forum post. Please read it.

yashin_alappatt:

C:\Users\Vincent\Desktop\cnc plotter\arduino_code\arduino_code.ino:2:21: fatal error: AFMotor.h: No such file or directory

#include <AFMotor.h>

^

You have to install the library:

#include <IRremote.h>
const int RECV_PIN=14;
IRrecv irrecv(RECV_PIN);
decode_results results;
#include<LiquidCrystal.h>
LiquidCrystal lcd(6,7,8,9,10,11);

#define Fan 3
#define Light 4
#define TV 5
void setup()
{
Serial.begin(9600);
lcd.begin(16,2);
pinMode(Fan, OUTPUT);
pinMode(Light, OUTPUT);
pinMode(TV, OUTPUT);
void loop()
{
if (irrecv.decode(&results))
{
Serial.println(results.value,HEX);
delay(100);
lcd.setCursor(0,0);
lcd.print("Fan Light TV");
if(results.value==0x1FE00FF)
{
i++;
int x=i%2;
digitalWrite(Fan, x);
#include<LiquidCrystal.h>
#include <IRremote.h>
const int RECV_PIN=14;
IRrecv irrecv(RECV_PIN);
decode_results results;
#include<LiquidCrystal.h>
LiquidCrystal lcd(6,7,8,9,10,11);
#define Fan 3
#define Light 4
#define TV 5
int i=0,j=0,k=0,n=0;
void setup()
{
Serial.begin(9600);
lcd.begin(16,2);
pinMode(Fan, OUTPUT);
pinMode(Light, OUTPUT);
pinMode(TV, OUTPUT);
//digitalWrite(13,HIGH);
lcd.print("Remote Controlled");
lcd.setCursor(0,1);
lcd.print("Home Automation");
delay(2000);
lcd.clear();
lcd.print("Circuit Digest");
lcd.setCursor(0,1);
delay(1000);
lcd.print("System Ready...");
delay(1000);
irrecv.enableIRIn(); // Start the receiver
irrecv.blink13(true);
lcd.clear();
lcd.setCursor(0,0);
lcd.print("Fan Light TV ");
lcd.setCursor(0,1);
lcd.print("OFF OFF OFF");
}
void loop()
{
if (irrecv.decode(&results))
{
Serial.println(results.value,HEX);
delay(100);
lcd.setCursor(0,0);
lcd.print("Fan Light TV");
if(results.value==0x1FE00FF)
{
i++;
int x=i%2;
digitalWrite(Fan, x);
lcd.setCursor(0,1);
if(x)
lcd.print("ON ");
else
lcd.print("OFF ");
// delay(200);
}

else if(results.value==0x1FEF00F) // key 1
{
j++;
int x=j%2;
digitalWrite(Light, x);
lcd.setCursor(6,1);
if(x)
lcd.print("ON ");
else
lcd.print("OFF ");
// delay(200);
}

if(results.value==0x1FE9867)
{
k++;
int x=k%2;
digitalWrite(TV, x);
lcd.setCursor(13,1);
if(x)
lcd.print("ON ");
else
lcd.print("OFF");
// delay(200);
}

if(results.value==0x1FE48B7)
{
n++;
int x=n%2;
digitalWrite(TV, x);
digitalWrite(Fan,x);
digitalWrite(Light,x);
lcd.setCursor(0,1);
if(x)
lcd.print("ON ON ON ");
else
lcd.print("OFF OFF OFF");
//delay(200);
}
irrecv.resume(); // Receive the next value
//delay(100);
}
}

Sengar462001:
...

Please use code tags (</> button on the toolbar) when you post code or warning/error messages. The reason is that the forum software can interpret parts of your code as markup, leading to confusion, wasted time, and a reduced chance for you to get help with your problem. This will also make it easier to read your code and to copy it to the IDE or editor. Using code tags and other important information is explained in the How to use this forum post. Please read it.

Please always do a Tools > Auto Format on your code before posting it. This will make it easier for you to spot bugs and make it easier for us to read.

If you had done an Auto Format you would have been able to clearly see from the indentation that your cut and paste coding skills are severely lacking. You have duplicated the first 31 lines of code twice. Try this:

#include <IRremote.h>
const int RECV_PIN = 14;
IRrecv irrecv(RECV_PIN);
decode_results results;
#include<LiquidCrystal.h>
LiquidCrystal lcd(6, 7, 8, 9, 10, 11);
#define Fan 3
#define Light 4
#define TV 5
int i = 0, j = 0, k = 0, n = 0;
void setup()
{
  Serial.begin(9600);
  lcd.begin(16, 2);
  pinMode(Fan, OUTPUT);
  pinMode(Light, OUTPUT);
  pinMode(TV, OUTPUT);
  //digitalWrite(13,HIGH);
  lcd.print("Remote Controlled");
  lcd.setCursor(0, 1);
  lcd.print("Home Automation");
  delay(2000);
  lcd.clear();
  lcd.print("Circuit Digest");
  lcd.setCursor(0, 1);
  delay(1000);
  lcd.print("System Ready...");
  delay(1000);
  irrecv.enableIRIn(); // Start the receiver
  irrecv.blink13(true);
  lcd.clear();
  lcd.setCursor(0, 0);
  lcd.print("Fan   Light  TV ");
  lcd.setCursor(0, 1);
  lcd.print("OFF    OFF   OFF");
}
void loop()
{
  if (irrecv.decode(&results))
  {
    Serial.println(results.value, HEX);
    delay(100);
    lcd.setCursor(0, 0);
    lcd.print("Fan   Light  TV");
    if (results.value == 0x1FE00FF)
    {
      i++;
      int x = i % 2;
      digitalWrite(Fan, x);
      lcd.setCursor(0, 1);
      if (x)
        lcd.print("ON  ");
      else
        lcd.print("OFF ");
      // delay(200);
    }

    else if (results.value == 0x1FEF00F) //  key 1
    {
      j++;
      int x = j % 2;
      digitalWrite(Light, x);
      lcd.setCursor(6, 1);
      if (x)
        lcd.print("ON   ");
      else
        lcd.print("OFF  ");
      // delay(200);
    }

    if (results.value == 0x1FE9867)
    {
      k++;
      int x = k % 2;
      digitalWrite(TV, x);
      lcd.setCursor(13, 1);
      if (x)
        lcd.print("ON ");
      else
        lcd.print("OFF");
      // delay(200);
    }

    if (results.value == 0x1FE48B7)
    {
      n++;
      int x = n % 2;
      digitalWrite(TV, x);
      digitalWrite(Fan, x);
      digitalWrite(Light, x);
      lcd.setCursor(0, 1);
      if (x)
        lcd.print("ON     ON    ON ");
      else
        lcd.print("OFF    OFF   OFF");
      //delay(200);
    }
    irrecv.resume(); // Receive the next value
    //delay(100);
  }
}

If that doesn't work then your problem is the IRremote/RobotIRremote thing and you need to do this:
Sketch > Include library > Manage Libraries > search for IRremote > Install IRremote library.

exucese me , im jeremy

i want to ask this problem

the error is :

C:\Users\jerem\Desktop\ARDUINO\LCD_TEXT_JA\libraries\sketch_jun06a\sketch_jun06a.ino:5:28: fatal error: LiquidCrystal .h: No such file or directory

#include <LiquidCrystal .h>

^

compilation terminated.

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

THIS IS THE CODE
whats wrong with this code?

//------------------------------------
// JEREMYALFANANDA LED SKETCH
//------------------------------------

#include <LiquidCrystal .h>

const int PIN_RS = 12 ;

const int PIN_E = 11 ;

const int PIN_DB_4 = 7 ;

const int PIN_DB_5 = 6 ;

const int PIN_DB_6 = 5 ;

const int PIN_DB_7 = 4 ;

// OBJEK LCD
LiquidCrystal lcd(PIN_RS, PIN_E, PIN_DB_4,
PIN_DB_5, PIN_DB_6, PIN_DB_7) ;

void setup () {
//ukuran lcd
lcd.begin (16, 2) ;
}

void loop () {
lcd.clear () ;
lcd.print ("jeremyalfananda LCD ") ;
lcd.setCursor (0, 1) ;
lcd.print (" UJI COBA LCD ") ;

delay (5000) ;

lcd.clear () ;
lcd.print ("lcd text 2 ") ;
lcd.setCursor (0, 1) ;
lcd.print (" I GOT THIS YEAY ! ") ;

delay (5000) ;
}

HOW DO I SOLVE THIS PROBLEM? ANYONE CAN HELP ME? THANKS

jeremyalfananda:
HOW DO I SOLVE THIS PROBLEM? ANYONE CAN HELP ME? THANKS

Please use code tags (</> button on the toolbar) when you post code or warning/error messages. The reason is that the forum software can interpret parts of your code as markup, leading to confusion, wasted time, and a reduced chance for you to get help with your problem. This will also make it easier to read your code and to copy it to the IDE or editor. Using code tags and other important information is explained in the How to use this forum post. Please read it.

You have an incorrect space in the filename.
change:

#include <LiquidCrystal .h>

to:

#include <LiquidCrystal.h>