EvoLineLeader#

class EvoLineLeader#

Initialisation & Setup

inline EvoLineLeader::EvoLineLeader(I2CChannel channel, int address = 0x17)#

Constructor for the EvoLineLeader class.

Parameters:
  • channel – The I2C channel to use for communication.

  • address – The I2C address of the EvoLineLeader sensor (default is 0x17).

void EvoLineLeader::begin()#
void EvoLineLeader::setOversamplingRatio(byte ratio)#

Sets the oversampling ratio for ADC conversion.

0b = No averaging 1b = 2 samples 10b = 4 samples 11b = 8 samples 100b = 16 samples 101b = 32 samples 110b = 64 samples 111b = 128 samples

Parameters:

ratio – The oversampling ratio (0-7).

byte EvoLineLeader::getOversamplingRatio()#

Gets the current oversampling ratio for ADC conversion.

Returns:

The oversampling ratio (0-7).

Control Functions

uint16_t EvoLineLeader::readADC(byte position)#

Reads the ADC value from the specified position.

Parameters:

position – The ADC channel position (0-7).