Serial output
#include <Arduino.h>
#include <WiFi.h>
#include "config.h"
void setup(){
pinMode(BUTTON_PIN, INPUT);
pinMode(ADC_ENABLE_PIN, OUTPUT);
pinMode(ADC_PIN, INPUT);
analogReadResolution(12);
digitalWrite(ADC_ENABLE_PIN, HIGH);
btStop();
WiFi.mode(WIFI_OFF);
FastLED.addLeds<APA102, APA102_SDI_PIN, APA102_CLK_PIN, BGR>(leds, NUM_LEDS).setCorrection(TypicalLEDStrip);
FastLED.setBrightness(160);
delay(50);
set_fastled(CRGB::Blue);
printf("Setup done!\r\n");
}
void loop() {
printf("Battery voltage: %i mV\r\n", int(get_battery_voltage()));
delay(500);
}Last updated