Pages: [1]   Go Down
Author Topic: util/delay.h library reference is not working with DUE  (Read 1446 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,
I'm using a library from Adafruit for TCS34725 color sensor and the compiler fails when I try to compile for DUE, the error says:
Adafruit_TCS34725.cpp:19: fatal error: util/delay.h: No such file or directory
compilation terminated.
The version of the IDE is Arduino nightly, if I change the micro to MEGA the error is gone...

Thank you for your help.
Logged

Earth
Offline Offline
Sr. Member
****
Karma: 14
Posts: 330
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The error is correct. util/delay.h is part of the AVR library and the Due is not based on AVR but rather ARM. If the TCS34725 library depends on that AVR header then you will probably have to modify it. There are plenty of delay functions built-in for the Due so you can probably find a way to modify the library to not need any additional headers for delaying.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 2
Hey there, i am just an engineering student trying to figure out what to do with life.. i would like to learn more about hardware hacking and am a huge fan of arduino....I like to exercise and stay fit.. although im a huge food buff..
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The error is correct. util/delay.h is part of the AVR library and the Due is not based on AVR but rather ARM. If the TCS34725 library depends on that AVR header then you will probably have to modify it. There are plenty of delay functions built-in for the Due so you can probably find a way to modify the library to not need any additional headers for delaying.
where can i find these in built functions for the due?? i would like to modify a certain library..(adafruit fingerprint) for the due.. any help would be appreciated..
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 16
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Did anybody solve the problem ?
Logged

0
Offline Offline
Shannon Member
****
Karma: 207
Posts: 12205
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The error is correct. util/delay.h is part of the AVR library and the Due is not based on AVR but rather ARM. If the TCS34725 library depends on that AVR header then you will probably have to modify it. There are plenty of delay functions built-in for the Due so you can probably find a way to modify the library to not need any additional headers for delaying.
where can i find these in built functions for the due?? i would like to modify a certain library..(adafruit fingerprint) for the due.. any help would be appreciated..
In the sources?  Its open source, you have the sources, have a look/grep through them.
Logged

[ I won't respond to messages, use the forum please ]

Offline Offline
Full Member
***
Karma: 8
Posts: 176
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Just comment out the line "#include <util/delay.h>" in Adafruit_Fingerprint.cpp
Logged

Please don't PM me asking for help. Ask questions in the forum.

Offline Offline
Newbie
*
Karma: 0
Posts: 16
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Ok ,
i´ll try it.
I´ve the same problem with the Oled libary.

regards iron
Logged

Pages: [1]   Go Up
Jump to: