32#define SPI_SPEED 2000000
33#define SPI_MODE SPI_MODE0
95 this->channel =
static_cast<uint8_t
>(
channel);
Channel
Control bytes for the Max1148 ADC. Only modifiable parameter is the channel. We use single ended,...
Manages interfacing with Max1148 ADC.
Max1148(Channel channel)
ADC constructor. Sets cs_pin as per ADC_CS_PIN macro. Chooses channel from Channel enum.
void csh()
Sets the chip select pin to high.
void csl()
Sets the chip select pin to low.
uint16_t adc_read()
Reads a single ADC value from the Max1148 ADC. Used in adc_read_avg.
uint8_t channel
Channel for the ADC. Selected in the constructor.
int cs_pin
Chip select pin for the ADC.
uint16_t adc_read_avg(int avg_number)
Reads an average ADC value from the Max1148 ADC. Uses Arduino's SPI library. We don't use this anymor...
Manages the Pip sensor sweep and associated data.