HTU21DF Humidity & Temp Sensor with Arduino Due

Post here about your Arduino projects, get help - for Adafruit customers!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
a_greg
 
Posts: 67
Joined: Fri Aug 02, 2013 2:48 pm

HTU21DF Humidity & Temp Sensor with Arduino Due

Post by a_greg »

When compiling the library example for the HTU21DF Humidity and Temperature sensor using the Arduino Due:
https://www.adafruit.com/products/1899

I get the following error:

Documents\Arduino\libraries\Adafruit_HTU21DF\Adafruit_HTU21DF.cpp:18: fatal error: util/delay.h: No such file or directory
compilation terminated.

Is there a fix or a workaround for this error?
I have a number of sensors I'd like to use together, however, this is the only one that doesn't work with the Due.

User avatar
adafruit_support_mike
 
Posts: 67454
Joined: Thu Feb 11, 2010 2:51 pm

Re: HTU21DF Humidity & Temp Sensor with Arduino Due

Post by adafruit_support_mike »

The code for that module was only designed for the AVR platform (Uno, Mega, Leonardo), and the Due is an ARM platform.

The file util/delay.h is part of the AVR library, so you'll need to remove that line and replace any code that needs it with delay functions appropriate to the Due.

User avatar
a_greg
 
Posts: 67
Joined: Fri Aug 02, 2013 2:48 pm

Re: HTU21DF Humidity & Temp Sensor with Arduino Due

Post by a_greg »

Thanks Mike,

Got it working!

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino”