Pages: [1]   Go Down
Author Topic: SH1X DIGITAL temperatyure & humidity sensor Arduino 1.0 error  (Read 1396 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 1
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I´ ve this sensor working in the arduino previous revision, but in the last one 1.0 i get some errors, that are above mi knowledge to fix it.


In file included from ReadSHT1xValues.cpp:11:
E:\arduino-1.0\libraries\SHT1x/SHT1x.h:15:22: error: WProgram.h: No such file or directory
In file included from ReadSHT1xValues.cpp:16:
E:\arduino-1.0\hardware\arduino\cores\arduino/Arduino.h:110: error: expected ',' or '...' before numeric constant
E:\arduino-1.0\hardware\arduino\cores\arduino/Arduino.h:111: error: expected ',' or '...' before numeric constant
Logged

0
Offline Offline
Shannon Member
****
Karma: 206
Posts: 12070
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You have to replace the #include of WProgram.h with one of Arduino.h...  For some (to me unfathomable) reason the change to Arduino 1.0 forced this incompatible change on library authors.

Perhaps the best fix is to add a WProgram.h that includes Arduino.h into the SHT1x library directory (though it might be a bit more complex than that).
Logged

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

Indonesia
Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

This problem is also happen to me. How to fix this?
I'm not really understand with MarkT's answer, i have changed "WProgram.h" to "Arduino.h" but it still doesn't work
Please help me because I'm just newbie
Thank you so much

Btw, i get the example program from here:
http://www.dfrobot.com/image/data/DFR0066/SHT1x_Arduino.zip
Logged

- Riza Paramayudha -

Global Moderator
Netherlands
Offline Offline
Shannon Member
*****
Karma: 216
Posts: 13664
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You can also download version 0.23 (or 0.22) and compile the code, then it should simply work.

Or are there reasons to not use 0.23 (0.22)
Logged

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

USA
Offline Offline
God Member
*****
Karma: 14
Posts: 644
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

This problem is also happen to me. How to fix this?
I'm not really understand with MarkT's answer, i have changed "WProgram.h" to "Arduino.h" but it still doesn't work
Please help me because I'm just newbie
Thank you so much

Btw, i get the example program from here:
http://www.dfrobot.com/image/data/DFR0066/SHT1x_Arduino.zip

In what file did you change the "WProgram.h" to "Arduino.h"?  If it was your sketch file and you are using a library that's not enough.  You have to go into the library folder (in this case it should be something like ".../libraries/SHT1X/") and open the ".cpp" and ".h" files (any basic word processor will be able to open them, they are just plain text files) and make sure to change any reference to "WProgram.h" to "Arduino.h" in those files as well.  The good news is you only have to do this once per specific library and that's generally all there is to get most pre-1.0 libraries to work without a problem.
Logged

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

Please help me because I'm just newbie
Thank you so much


nice to meet you guys here to share the beautiful life with so many people.
Rc Helicopter|
Mini Rc Helicopter Reviews|
Rc Hobby Stores
Logged

Pages: [1]   Go Up
Jump to: