Arduino library for Plantower PMS5003I and PMS7003I

does anyone by chance develop or know ready library for Plantower PMS5003I and PMS7003I dust/particle sensors (usual output is UART)

I find this one which for the serial option

Probably it can be easuly adapted to I2C option, probably not.

Thanks in advance for any ideas!

the UART code contains all the high level control for the device which would save you work
the convert to I2C would require the modification of the low level communications methods such as Pms5003::read(), Pms5003::waitForData(), etc
not impossible but a fair amount of work

Yes, this is what probably also learn me something about libraries and drivers.

probably the first thing is to run the I2C scanner to check basic communications work

thanks, good advice - now PMS5003I successfuly connected and found by i2c scanner - on the right address 0x12 (I did not really found this in to PMS5003I chinese datasheet, but it says so in PMS7003I datasheet)

setup is - Arduino Uno, LogShield (just what I have around with 3.3V) and voltage convertor with BSS138.

Only 5V, 3.3V, GND, SCL and SDA connected - no additional pull-up resistors or rest of the lines used from PMS5003I

Will look now on the serial library and how to make it possible work with I2C

hi Grubi,

I just received some plantower PM-sensors with i2c and can’t find any library for making them work (only for the UART-version). Thus I’m in the same position you were last year :slight_smile: . Did you have any success in finding or creating such a library or code? If so, would you agree to share it?