EDF - OnePIC MCU  v1.1.0
source/16bit/OnePIC_16bit_pot.c File Reference

configures the potentiometer and takes a reading More...

#include "OnePIC_pot.h"
#include "TimeDelay.h"
#include "bsp.h"
#include "OnePIC_int.h"
Include dependency graph for OnePIC_16bit_pot.c:

Go to the source code of this file.

Defines

#define FILTER_MEDIAN_LENGTH   3
#define FILTER_MIDDLE_VALUE   (FILTER_MEDIAN_LENGTH-1)/2

Functions

void EDF_potInit (void)
 Initilizes the POT to take a reading.
uint16_t filterMedian (uint16_t d)
 experiencing some dropped readings, so the median filter takes three samples and passes the median of the three
uint16_t EDF_potRead (void)
 takes the reading

Detailed Description

configures the potentiometer and takes a reading

Definition in file OnePIC_16bit_pot.c.