1
0
mirror of https://github.com/DCC-EX/CommandStation-EX.git synced 2024-11-26 17:46:14 +01:00

Update IO_AnalogueInputs.h

Add I2C initialisation calls (previously missing).
This commit is contained in:
Neil McKechnie 2023-01-22 12:38:24 +00:00
parent e079a9e395
commit bfbc45674f

View File

@ -73,6 +73,11 @@ private:
addDevice(this);
}
void _begin() {
// Initialise I2C
I2CManager.begin();
// ADS111x support high-speed I2C (4.3MHz) but that requires special
// processing. So stick to fast mode (400kHz maximum).
I2CManager.setClock(400000);
// Initialise ADS device
if (I2CManager.exists(_i2cAddress)) {
_nextState = STATE_STARTSCAN;