I’m using Particle Dev for my latest project and I started to add on a Photon Battery Shield. I added the MAX17043 libraries to my folder and pasted in the code from the example. It threw an error at lipo.begin() - “lipo was not declared in this scope”.
So I went back to basics. I created a new folder which has only four files: test.ino, SparkFunMAX17043.h, SparkFunMAX17043.cpp and MAX17043_Definitions.
test.ino is a cut and paste of the MAX17043_SIMPLE.ino from Particle Build (which works fine). The include statement was changed from
#include "SparkFunMAX17043/SparkFunMAX17043.h"
to
#include "SparkFunMAX17043.h"
Other than that, all the files are identical. It runs on Particle Build but not on Particle Dev.
I presume “lipo” is an instance of the class defined in SparkFunMAX17043.h. I can’t actually find where it is defined and there is no mention of “lipo” in any of the included files so I’m not surprised that it throws an error. But I don’t know why it runs on Particle Build or how to get it to run on Dev. Does Build have access to some other info or file?
Obviously I am not understanding something pretty basic. (Sorry).