It seems I have a problem with the HTU21D when trying to read the values with the particle example. It can not communicate with the HTU, this is the code
Yes, I2C needs pull-up resistors, but no, you don’t need to add them because the SparkFun HTU21D includes them on the breakout board. Maybe post a picture of your wiring?
I have not used the library. You could try the Sparkfun sample code for Arduino. Just comment out the #include Wire.h and it compiles on the Particle. I did not test the operation, but it compiles.
This doesn't prove a lot since the Arduinos tend to have I2C pull-ups on-board, but Particles haven't.
So if it were about missing pull-ups that test would not make you any wiser.
But there are some threads already about HTU21 and some of them are marked as solved, so you might find something there (even in the ones about Adafruit boards) Search results for 'htu21 solved' - Particle
The thing is that I have tried in the past this sensor with photon and everything worked fine before some months with the same wiring in the same photon with the same firmware.
Okay? Why should then all out of a sudden the library (which is part of the firmware once it's flashed to the device) have got something wrong with it?
Unless you had used the old version 0.0.1 back then (which would then not be the same firmware).
But this can easily be tested, if you just use that then (hit the info icon (i) next to the library name and select 0.0.1 and try it out).
BTW: This may have been an interesting information for the initial post.
I do know that, hence my comment in a previous post
The big red blob in the schematics marked SJ1 (and framed green on the image I posted) are two cut-open jumpers that are by default closed. And since we don't know what you did or didn't do to your device I just intended to make sure that the resistors (clearly present on the board) are actually active which they wouldn't be if the jumper was open(ed).
BTW: Why are you not trying to use the unchanged sample code, which seems to have a while() in setup for some reason I'd guess?
Just give the scanner a try.
The original SparkFun library has a comment next to the #define which states // unshifted address, so if we need the shifted one here, you’d find out with the scanner.