Go Down

Topic: Problem , "fatal error: avr/io.h: No such file or directory" (Read 97 times) previous topic - next topic

assy

Hi,

i am working with the Arduino Due, using Arduino 1.6.0 and i got this message while compiling

Someone know this problem?
what i need to do?

Thank you, Assy

AWOL

The Due doesn't use the AVR processor.

Quote
and i got this message while compiling
Compiling what?
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

assy

this my code:


Code: [Select]
// avr-libc library includes


#include <avr/io.h>
#include <avr/interrupt.h>

#define LEDPIN 2
 
void setup()
{
    pinMode(LEDPIN, OUTPUT);
 
    // initialize Timer1
    cli();             // disable global interrupts
    TCCR1A = 0;        // set entire TCCR1A register to 0
    TCCR1B = 0;
 
    // enable Timer1 overflow interrupt:
    TIMSK1 = (1 << TOIE1);
    // Set CS10 bit so timer runs at clock speed:
    TCCR1B |= (1 << CS10);
    // enable global interrupts:
    sei();
}


ISR(TIMER1_OVF_vect)
{
    digitalWrite(LEDPIN, !digitalRead(LEDPIN));
}

void loop() {
}


this is the Error message :
fatal error: avr/io.h: No such file or directory
compilation terminated.
Error compiling


Moderator edit: And there's your code with CODE TAGS.

AWOL

Code: [Select]
#include <avr/io.h>
#include <avr/interrupt.h>

Have you ever seen those directives in any other Due sketch?
Have you ever wondered why?
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

assy

You right , can't do it with the Due board
i changed it to Arduino Mega and everything OK.

Thank you :)

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy