compilation error (wiring.h)

How I solve this error?

fatal error: wiring.h: No such file or directory

#include <wiring.h>

^

What version of the IDE ?
What OS ?
What program ?

the compiler cannot find the header file
is wiring.h in the same directory as your .ino file?
if so try

#include "wiring.h"

use of “” tells the compiler to look for the file in the local directory first then the standard directory
<> looks in the standard directory
otherwise enter the full path to the header file, e.g.

#include "D:/temp3/VT100_test/VT100.h"

I’m assuming that you have some really old code.
wiring.h has not existing in Arduino since Arduino IDE 1.0 was released back in 2011.

Your main choices are

  • fix the code to use Arduino 1.x headers and API functions
  • install a pre 1.0 IDE like 0019 to 0023 (I would not recommend going this way)

Many things were changed in IDE 1.0 and many updates and modifications have be made over the years.
In 1.0 when wiring.h was removed, a new file Arduino.h was added that serves the same purpose.
Depending on the code, just changing wiring.h to Arduino.h may not solve everything.

— bill

horace:
the compiler cannot find the header file
is wiring.h in the same directory as your .ino file?
if so try

#include "wiring.h"

use of “” tells the compiler to look for the file in the local directory first then the standard directory
<> looks in the standard directory
otherwise enter the full path to the header file, e.g.

#include "D:/temp3/VT100_test/VT100.h"

Try it.But it is not working. :confused:

post your code (use code tags) with details of the error message you are getting

UKHeliBob:
What version of the IDE ?
What OS ?
What program ?

Ide - arduino-1.8.5
os - windows 10
To display texts in handmade 8X8 led metrix.

horace:
post your code (use code tags) with details of the error message you are getting

#include <FrequencyTimer2.h>
/* Download FrequencyTimer2.h from http://playground.arduino.cc/Code/FrequencyTimer2 */
int rows = {2, 3, 4, 5, 6, 7, 8, 9};//Anode Pins (+)
int cols = {10, 11, 12, 13, A0, A1, A2, A3};//Cathode Pins (-)

int cells[8][8] = {
{0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, 0, 0, 0, 0},
};

void setup() {
for (int i = 0; i < 8; i++) {
pinMode(rows*, OUTPUT);*

  • }*
  • for (int i = 0; i < 8; i++) {*
    _ pinMode(cols*, OUTPUT);_
    _
    }_
    _
    FrequencyTimer2::disable();_
    _
    // Set refresh rate (interrupt timeout period)_
    _
    FrequencyTimer2::setPeriod(2000);_
    _
    // Set interrupt routine to be called*_
    * FrequencyTimer2::setOnOverflow(display);*

}
void loop() {

* for (int y = 0; y < 8; y++) {*
* for (int x = 0; x < 8; x++) {*
* clear();*
* cells[x][y] = 1;*

* delay(50);*
* }*
* }*

}
void clear() {
* for (int x = 0; x < 8; x++) {*
* for (int y = 0; y < 8; y++) {*
* cells[x][y] = 0;*
* }*
* }*
}
int py = 0;
void display() {
* digitalWrite(cols[py], HIGH);*
* for (int px = 0; px < 8; px++) {*
* digitalWrite(rows[px], LOW);*
* }*
* py++;*
* if (py == 8) {*
* py = 0;*
* }*
* digitalWrite(cols[py], LOW);*
* for (int px = 0; px < 8; px++) {*
* if (cells[px][py] == 1) {*
* digitalWrite(rows[px], HIGH);*
* } else {*
* digitalWrite(rows[px], LOW);*
* }*
* }*
}
/*
*this is the erorr massage
Arduino: 1.8.5 (Windows 8.1), Board: “Arduino/Genuino Uno”
In file included from C:\Users\Palitha PC\Downloads\New folder\arduino\myhub_led_metrix_ex1\myhub_led_metrix_ex1.ino:8:0:
C:\Users\Palitha PC\Documents\Arduino\libraries\FrequencyTimer2/FrequencyTimer2.h:25:20: fatal error: wiring.h: No such file or directory
#include <wiring.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.
*/

try downloading version 2
Frequency timer version 2
it may fix the problem of the missing header file

Does your code really look like that ?

Answer : No

Did you read this before posting a programming question

horace:
try downloading version 2
Frequency timer version 2
it may fix the problem of the missing header file

Solved…
Thanks a lot. <3 :slight_smile: