Go Down

Topic: "fatal error: Arduino.h: No such file or directory" Error (Read 23933 times) previous topic - next topic

ArnieBot

Hi Everyone :)

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:

Code: [Select]

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 :'(

Any help would be much appreciated!

Thank you,

ArnieBot

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.

groundFungus

Quote
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.

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.
Thank you for your response :)

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

Thank you for you suggestion :D

ArnieBot

ArnieBot

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 :)

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 :D

ArnieBot

Nick_Pyner

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
Code: [Select]
#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

PaulS

Quote
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.
The art of getting good answers lies in asking good questions.

Nick_Pyner

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

ArnieBot

I am using Arduino's 'Blink' example:
Code: [Select]

/*
  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
}

Nick_Pyner

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

The line   
Code: [Select]
#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.

ArnieBot

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

The line   
Code: [Select]
#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 :)

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

Thank you,

ArnieBot

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 :'(

ArnieBot

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........

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........
Thank you for your help :)


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

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...


Go Up