1#ifndef PIP_CONTROLLER_HPP
2#define PIP_CONTROLLER_HPP
35 delayMicroseconds(delay);
Header file for the Pip library for Dartmouth's 317 Lab.
Manages simultaneous sweep for two Pip sensors. A bit hacky, but allows easily managing simultaneous ...
PipController(Pip &pip1, Pip &pip2)
void sweep()
Sweeps both DACs simultaneously, reads both ADC channels. Note that ADC sampling alternates between e...
Manages the Pip sensor sweep and associated data.
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.