<commit_before><commit_msg>pushing basic events for charge level and voltage to particle cloud<commit_after>// This #include statement was automatically added by the Particle IDE.
#include "SparkFunMAX17043/SparkFunMAX17043.h"

int led2 = D7;

double lipoVoltage = 0.0;
double lipoSoc = 0.0;

void setup() {
    lipo.begin();
    lipo.quickStart();

    pinMode(led2, OUTPUT);
}

void loop() {
    // turning the LED on and off every 5 seconds.
    // Not necessary but helpful when sat next to the device
    digitalWrite(led2, HIGH);
    lipoVoltage = lipo.getVoltage();
    lipoSoc = lipo.getSOC();

    Particle.publish("lipo-voltage", String(lipoVoltage), 60, PRIVATE);
    Particle.publish("lipo-soc", String(lipoSoc), 60, PRIVATE);

    delay(5000);
    digitalWrite(led2, LOW);
    delay(5000);
}
{'fraction_non_alphanumeric': 0.11940298507462686, 'fraction_numerical': 0.03980099502487562, 'mean_word_length': 3.820359281437126, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7369344', 'n_tokens_mistral': 304, 'n_tokens_neox': 270, 'n_words': 77}