Go Down

Topic: SH1X DIGITAL temperatyure & humidity sensor Arduino 1.0 error (Read 1 time) previous topic - next topic

andreszz

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

MarkT

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).
[ I won't respond to messages, use the forum please ]

greendoop

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
- Riza Paramayudha -

robtillaart

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)
Rob Tillaart

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

Far-seeker


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.

katie-darby

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

Go Up