This file is part of eRCaGuy_hello_world: https://github.com/ElectricRCAircraftGuy/eRCaGuy_hello_world
- Add "fill_array_with_analogRead.ino" demo. See my code here: https://stackoverflow.com/a/28888135/4561887
coulomb_counter_with_cooperative_multitasking_macro
- this is an excellent example of a coulomb counter (energy usage or generation measurer; AKA: battery "fuel" gauge measurement system, or battery "State of Charge" (SoC) estimator) to obtain energy in Joules (J), Watt-Hours (Whr), or Kilowatt-Hours (KWhr).- I have posted this code online here: Arduino Stack Exchange: Calculating Amp/Hrs of a solar panel.
- It uses my sophisticated
CREATE_TASK_TIMER()
cooperative multi-tasking macro. - I first wrote about this technique starting in 2018 here: Stack Overflow: How to do high-resolution, timestamp-based, non-blocking, single-threaded cooperative multi-tasking
- https://docs.arduino.cc/built-in-examples/analog/Smoothing - this is a brilliant and extremely efficient basic moving average algorithm for basic data smoothing and digital signal processing (DSP). If you aren't doing your moving averages in professional code like this, you should be. It's the most-efficient technique for a moving average that I've ever seen, and a template and model for all.