.Value( )

back to AnalogInputPin

Description

This function provides read access to the value of the associated AnalogInputPin object. Remember that analog inputs provide values in the range of 0-3.3 corresponding to the current voltage present on the analog pin.

Parameters

None.

Returns

This function returns the value of the associated AnalogInputPin as a float.

Examples

#include <FEHIO.h>

int main(void)
{
    //declares an analog input pin on P0_3
    AnalogInputPin CdS_cell(FEHIO::P0_3);

    //read the value of the CdS_cell and store in x
    float x = CdS_cell.Value();
}