Problem with example MAX17043_SIMPLE

Dear Forum,

I am having a problem with the library of Sparkfun SparkFunMAX17043/SparkFunMAX17043.h . It seems that when I download the example MAX17043_SIMPLE from the particle cloud to my photon , the photon when then reboots stays in steady white led and doesn’t do anything . It is like craching the software of photon.

Do you have suggestions?

Has anyone else the same problem and how did you solve it?

I am using the 0.4.7 firmware .

P.S
It used to work before 1 month . Maybe something is changed from the particle side?

This is an I2C device, so do you have the required pull-up resistors in place?

Hi Scruffr.

I am using also the sparkfun board the power shield, I think they have it included.

The other strange is that when I upload some other program that does not have these specific library everything is OK. Also I have tries to do a dfu flash but I can not see the device through the USB .

Is it possible our photos to be broken? All 4 of then are doing the same thing when I upload the sparkfub program .

I have also tried and made a firmware flash, usb & tinker new flashing but nothing!

Also now I see a strange behavior, it runs for one sec and then crashes .

Have you put your device into DFU Mode (yellow blinking)?
What OS are you using?
Have you got DFU drivers installed (esp. for Windows)?

Which sample are you using?

Hi !

Yes I have put my device in DFU mode(yellow blinking)
I am using the 0.4.7 and I have installed the DFU drivers in my windows. Al these are done OK.

I am using the example of sparkfun MAX17043. Do you think maybe something is happening with the memory?

Because the only program I have downloaded and works OK is the sample WEB-CONNECTED LED

would you able to try for yourself this example and tell me if you see anything strange?

I can also send you the code which i use in my example.

It’s a bit difficult to properly test the code without hardware.

what do you mean ? without the power shield?

Yup, whatever hardware you use, since the external hardware will influence the behaviour of the code.
Without hardware I (or anybody else) would only be able to guess what could cause the code to freak out.

Hi thanks your advice !

It was a hardware issue in my board .

Thanks again !

@johnyrobot5, good to hear you found the reason for your problems, but could you elaborate what the actual issue was?
Maybe this could help others with similar problems too.

Yes of course , I have found out that when you use a library for an I2C device , if for some reason this device is not connected or there is no hardware to a related software then the photon crashes. I do not know why is this happening ,but it does.

Yup, that is an open issue, which should be dealt with in the next release.
https://github.com/spark/firmware/issues/713

This was also the reason for my initial question in post #2

Hi
I have the same problem with Sparkfun Battery Shield, I am using the 0.4.7 firmware and Photon is Stuck !!!
What's the solution ?

Hi!

You must check if the your software is using hardware that is not connected to the Photon. If you use any kind of libraries in your software that refer to a hardware , you hardware may be well connected and exists, or else you will get errors .

Regards
John