20#define SWEEP_DEFAULT_DELAY 1000
21#define SWEEP_DEFAULT_AVG_NUM 25
22#define SWEEP_DEFAULT_SAMPLES 28
23#define SWEEP_DEFAULT_MIN 0
24#define SWEEP_DEFAULT_MAX 4095
25#define SWEEP_MAX_SAMPLES 256
26#define DEFAULT_ADC_CHANNEL 0;
Header file for the Max1148 library for Dartmouth's 317 Lab. Manages ADC communication through SPI.
#define SWEEP_MAX_SAMPLES
Manages interfacing with Max1148 ADC.
Manages simultaneous sweep for two Pip sensors. A bit hacky, but allows easily managing simultaneous ...
Manages the Pip sensor sweep and associated data.
Max1148 & adc
The ADC object for the Pip to use. Assuming each pip will use a different ADC channel.
uint16_t sweep_min
The minimum and maximum values for the sweep.
int delay_us
The delay between steps in the sweep. Measured in microseconds.
uint8_t dac_pin
The pin for the DAC output.
uint16_t avg_num
The number of samples to average when querying the ADC.
uint16_t num_samples
The number of samples to take during the sweep. AKA the number of steps in the sweep.
uint16_t data[SWEEP_MAX_SAMPLES]
The data array for the sweep.
void clear_data(uint16_t data[], uint16_t size)
Clears the data array.