Help Modifiying Arduino Library for Photon

I picked up a few of these charging chips for a project that can charge LiFePo4 & Li-Ion batteries due to its adjustable charging voltage range.

It comes with a library that can be used to program the charging voltage and current and read error messages via i2c.

The library is throwing some issues that need to be addressed before compiling.

I wanted to ask for some advice before digging in and making changes trying to fix this myself.

The library on Github is here:

When I try to compile this in Particle Dev I get the following message:

@ScruffR What is the deal with the invalid conversion? How would you suggest to fix it?

Any help is greatly appreciated!

1 Like

Have you tried changing all occurences of

char toWrite0x0X[2]


const unsigned char toWrite0x0X[2]

in BQ24250.cpp?

Might be a good starting point.

Wire.write() sounds like it requires const unsigned char, not char


Yes, that fixed all 12 issues and it now compiles successfully!

Thanks for your help getting this fixed quickly!