"fatal error: Arduino.h: No such file or directory" Error

Hi Everyone :slight_smile:

I am very new to using Arduino and am trying to use the 'Blink' example on my board, however when I press verify it produces the following error:

Arduino: 1.6.9 (Windows 10), Board: "Arduino Duemilanove or Diecimila, ATmega328"

sketch\Blink.ino.cpp:1:21: fatal error: Arduino.h: No such file or directory

 #include <Arduino.h>

                     ^

compilation terminated.

exit status 1
Error compiling for board Arduino Duemilanove or Diecimila.

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

Like I said before, I am really new to Arduino, but I have tried looking at other forum entries and across the Internet and nothing has solved my problem :cry:

Any help would be much appreciated!

Thank you,

ArnieBot

Hi, I am totally new to all this myself, so I could be wrong, but at least hopefully it pushes your question back up the pile.

I know within the Arduino package there is information regarding adding new libraries, however I would have thought your library was included. I know when I tried blink it was there and worked.

I would try deleting the Arduino software and try again to see if it's there.

Hope it works or one of the many knowledgeable people out there can help.

Error compiling for board Arduino Duemilanove or Diecimila.

Is your board a Duemilanove or Diecimila? If not, in the Tools menu, Board, select the board that you have and try it.

ZOR2:
Hi, I am totally new to all this myself, so I could be wrong, but at least hopefully it pushes your question back up the pile.

I know within the Arduino package there is information regarding adding new libraries, however I would have thought your library was included. I know when I tried blink it was there and worked.

I would try deleting the Arduino software and try again to see if it's there.

Hope it works or one of the many knowledgeable people out there can help.

Thank you for your response :slight_smile:

I have tried uninstalling and reinstalling the Arduino software, unfortunately the error is still there :cry:

Thank you for you suggestion :smiley:

ArnieBot

groundfungus:
Is your board a Duemilanove or Diecimila? If not, in the Tools menu, Board, select the board that you have and try it.

Thank you for your response :slight_smile:

I currently have a Seeeduino V3.0 (Atmega 328P) - an Arduino compatible board.

Upon researching the board here it suggests to use 'Arduino Duemilanove w/Atmega328'

Thank you :smiley:

ArnieBot

ZOR2:
I would try deleting the Arduino software and try again to see if it's there.

I don't think that will help. I believe the llibrary hasn't been there for years and you are using out of date software. You may be doing something very unusual, but I have been using Arduino for several years and I have never seen the library, or any programme that calls for it.

If you delete the line

 #include <Arduino.h>

the programme might work. I believe the in formation in Arduino.h is hidden away somewhere within more up-to-date IDEs

I have been using Arduino for several years and I have never seen the library, or any programme that calls for it.

If you enable verbose mode when compiling, and look at the .cpp file that the IDE creates from your .ino file, you will see that you ARE using that header file in EVERY sketch. Take your blinders off once in a while.

Now show me the programme that calls for it..........

I am using Arduino's 'Blink' example:

/*
  Blink
  Turns on an LED on for one second, then off for one second, repeatedly.

  Most Arduinos have an on-board LED you can control. On the Uno and
  Leonardo, it is attached to digital pin 13. If you're unsure what
  pin the on-board LED is connected to on your Arduino model, check
  the documentation at http://www.arduino.cc

  This example code is in the public domain.

  modified 8 May 2014
  by Scott Fitzgerald
 */


// the setup function runs once when you press reset or power the board
void setup() {
  // initialize digital pin 13 as an output.
  pinMode(13, OUTPUT);
}

// the loop function runs over and over again forever
void loop() {
  digitalWrite(13, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(1000);              // wait for a second
  digitalWrite(13, LOW);    // turn the LED off by making the voltage LOW
  delay(1000);              // wait for a second
}

OK, I can't quibble about the date, then. And it's the same as I have.

The line

 #include <Arduino.h>

Is not included in the code, and I therefore believe you have an installation problem as previously suggested above. I can't say what it is, as my version compiles and uploads OK. I might also add that I am using verbose mode for both compiling and uploading but I don't think you need bother about such trivia as I can't see any reference to Arduino.h anywhere anyway.

Nick_Pyner:
OK, I can't quibble about the date, then. And it's the same as I have.

The line

 #include <Arduino.h>

Is not included in the code, and I therefore believe you have an installation problem as previously suggested above. I can't say what it is, as my version compiles OK

Thank you for your response :slight_smile:

I will uninstall and reinstall the program again and see if it helps,

Thank you,

ArnieBot

I have just finished reinstalling Arduino. Unfortunately, the error still occurs when I click 'Verify' on the Blink example program.

I have also tried some of the other examples and the error occurs with them as well :cry:

ArnieBot

I'm afraid I am at a loss. I am using 1.6.8 under Windows 7 on this desktop and my other versions are older. Perhaps I could take a wild guess that you are suffering some obscure Windows 10 security problem, but I haven't heard of anybody having that. Meanwhile my Mega is blinking away........

Nick_Pyner:
I'm afraid I am at a loss. I am using 1.6.8 under Windows 7 on this desktop and my other versions are older. Perhaps I could take a wild guess that you are suffering some obscure Windows 10 security problem, but I haven't heard of anybody having that. Meanwhile my Mega is blinking away........

Thank you for your help :slight_smile:

I have just had a look and it seems I am running 1.6.9 would that make any difference?

The strange thing is, is that I managed to get Blink compiling before (many weeks ago) but since then I have been getting this error message.

I thought that it could be something to do with the file Arduino.h missing, but I have located it here: C:\Program Files\Arduino\hardware\arduino\avr\cores\Arduino

Thank you again,

ArnieBot

I am a bit more inclined to blame your operating system because I believe nasty things can happen with W10 and I can't see how V1.6.9 can be the problem. If it was, there would surely lots of people complaining by now. And besides, you have found the file anyway. I have never seen this before, and with good reason, but I have the same thing in the same place. It is 8kb.

I believe that in the distant past, this library and several others had to be called in programme, hence my original comment, but it is now automatically incorporated in the compiler or whatever.

Here is a shot in the dark.......

The only differences between your Arduino.h and mine are:

  1. yours is located under Program Files and mine is on the E:/ drive
  2. Yours can't be found and mine can.

The reason why my Arduino stuff isn't under programme files is simply because I never put programme files in Program Files. I'm not suggesting you create a partition, but you might try installing Arduino in C:\Arduino instead of \Program Files. I don't know if this is common practice amongst Arduino users, but it actually a requirement with the CAD i use!

You haven't said which OS you use, and yes, it is a shot in the dark...

Nick_Pyner:
I am a bit more inclined to blame your operating system because I believe nasty things can happen with W10 and I can't see how V1.6.9 can be the problem. If it was, there would surely lots of people complaining by now. And besides, you have found the file anyway. I have never seen this before, and with good reason, but I have the same thing in the same place. It is 8kb.

I believe that in the distant past, this library and several others had to be called in programme, hence my original comment, but it is now automatically incorporated in the compiler or whatever.

Here is a shot in the dark.......

The only differences between your Arduino.h and mine are:

  1. yours is located under Program Files and mine is on the E:/ drive
  2. Yours can't be found and mine can.

The reason why my Arduino stuff isn't under programme files is simply because I never put programme files in Program Files. I'm not suggesting you create a partition, but you might try installing Arduino in C:\Arduino instead of \Program Files. I don't know if this is common practice amongst Arduino users, but it actually a requirement with the CAD i use!

You haven't said which OS you use, and yes, it is a shot in the dark...

Thank you very much for all of your support :slight_smile:

I am currently using Windows 10.

I have just tried installing Arduino where you suggested, unfortunately the error still occurs :cry:

Additionally, I have tried installing an older version (1.6.7) but that still produces the same error :frowning:

Thank you,

ArnieBot

When I used the Arduino installer to install Arduino on my Windows 10 machine, it installed in "C:\Program Files (x86)\Arduino".
"Arduino.h" is located in "C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino".
(Mine's a 64-bit PC.)

So assuming your's is a 32-bit machine, your installation is in the correct place, "C:\Program Files\Arduino".
And also since "Arduino.h" is in the right place on your machine, "C:\Program Files\Arduino\hardware\arduino\avr\cores\Arduino", it should be found when you compile a sketch.

Before you re-installed the IDE, when uninstalling did you also delete the "Arduino15" folder from "C:\Users*Your username here*\AppData\Roaming" ?
This has been known to create problems when re-installing the IDE. You could try uninstalling again, delete that folder if it's left behind, then re-installing in the default location.

N.B. You might have been better off posting this thread in the "Installation & Troubleshooting" section, to increase your chances of the right people seeing it. Perhaps you could click on "Report to moderator" and ask to have it moved. (Then you might be lucky and @pert might help out. He's "the man" for these problems.)

Edit: ""C:\Users*Your username here*\AppData" might not be visible, since "AppData" is a hidden file. To view it, when you open "C:\Users*Your username here*", click on "View" at the top of the window, then check the box marked "Hidden Items".
Edit2: Oh, and uncheck that box again when you're done, or 'hidden' files will be visible all over the place, including the desktop. :frowning:

Good luck. :slight_smile:

OldSteve:
When I used the Arduino installer to install Arduino on my Windows 10 machine, it installed in "C:\Program Files (x86)\Arduino".
"Arduino.h" is located in "C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino".
(Mine's a 64-bit PC.)

So assuming your's is a 32-bit machine, your installation is in the correct place, "C:\Program Files\Arduino".
And also since "Arduino.h" is in the right place on your machine, "C:\Program Files\Arduino\hardware\arduino\avr\cores\Arduino", it should be found when you compile a sketch.

Before you re-installed the IDE, when uninstalling did you also delete the "Arduino15" folder from "C:\Users*Your username here*\AppData\Roaming" ?
This has been known to create problems when re-installing the IDE. You could try uninstalling again, delete that folder if it's left behind, then re-installing in the default location.

N.B. You might have been better off posting this thread in the "Installation & Troubleshooting" section, to increase your chances of the right people seeing it. Perhaps you could click on "Report to moderator" and ask to have it moved. (Then you might be lucky and @pert might help out. He's "the man" for these problems.)

Edit: ""C:\Users*Your username here*\AppData" might not be visible, since "AppData" is a hidden file. To view it, when you open "C:\Users*Your username here*", click on "View" at the top of the window, then check the box marked "Hidden Items".
Edit2: Oh, and uncheck that box again when you're done, or 'hidden' files will be visible all over the place, including the desktop. :frowning:

Good luck. :slight_smile:

Thank you for your suggestions :smiley:

I have just looked in the AppData folder and could not find a folder called 'Arduino15' or any folder relating to Arduino :cry:

After re-installing Arduino the error still occurs :frowning:

I will take your suggestion and report to moderator and ask for it to be moved to the "Installation & Troubleshooting" section.

Thank you very much for your advice :smiley:

ArnieBot

ArnieBot:
Thank you for your suggestions :smiley:

I have just looked in the AppData folder and could not find a folder called 'Arduino15' or any folder relating to Arduino :cry:

Not in "...\AppData\Roaming"?
Anyway, that was just a long-shot, but I thought I should mention it. That folder definitely exists on the earlier versions of the IDE, at least. I'm using V1.6.5 and "Arduino15" exists on my machine. Maybe V1.6.9 puts it somewhere else, or doesn't use it any more.

OldSteve:
Not in "...\AppData\Roaming"?
Anyway, that was just a long-shot, but I thought I should mention it. That folder definitely exists on the earlier versions of the IDE, at least. I'm using V1.6.5 and "Arduino15" exists on my machine.

Thank you for your response :slight_smile:

Unfortunately, it is not in "...\AppData\Roaming" either :cry:

I am currently running V1.6.9 if that helps?

Thanks,

ArnieBot