I have a Particle Photon which is being powered by the Particle Power Shield. I have a LiPo battery hanging off the Shield, and a small solar panel which will charge the LiPo during the day.
I appear to have an issue where, when the solar panel kicks in to charge the LiPo, the Photon stops publishing metrics to Ubidots. I can still publish to the Particle log online.
My code is below, it’s as simple as it gets:
// This #include statement was automatically added by the Particle IDE.
#include <Ubidots.h>
// This #include statement was automatically added by the Particle IDE.
#include <PowerShield.h>
//Include the token for auth to Ubidots.
#define TOKEN "1BEeWhBIZuRE5rbzsDpo0AC0lxhMky"
Ubidots ubidots(TOKEN);
PowerShield batteryMonitor;
void setup() {
batteryMonitor.begin();
batteryMonitor.quickStart();
}
void loop() {
float cellVoltage = batteryMonitor.getVCell();
float stateOfCharge = batteryMonitor.getSoC();
Particle.publish("voltage", String(cellVoltage));
Particle.publish("soc", String(stateOfCharge));
ubidots.add("voltage", cellVoltage);
ubidots.add("soc", stateOfCharge);
ubidots.sendAll();
delay(5000);
}
Any suggestions?