This module provides functions to calculate values from resistor divider networks.
To use the resistor divider network functions, use this:
#include <resistor-network.h>
This function calculates the resistance of the lower resistor of a resistor divider network, given the maximum A/D counts v_ad_max, the measured A/D counts v_ad_counts for the divider network, and the known resistance r_upper in ohms of the upper resistor. It uses the equation
to arrive at the result.
This function calculates the voltage feeding into a resistor network given the measured A/D counts v_ad_counts, and the the known resistances in ohms of the upper resistor r_upper and the lower resistor r_lower. It uses the equation
to arrive at the result.