Home › Forums › Environmental Sensors › Adding a new modbus sensor using current ones as inspiration. › Reply To: Adding a new modbus sensor using current ones as inspiration.
2022-06-01 at 3:32 AM
#17061
Sorry for being so vague. I will try to clarify.
Is it not the order of the parameters given in the constructor that matters when creating a new object?
If the sensor constructor looks like this:
1 2 3 4 5 6 |
KellerNanolevel(byte modbusAddress, Stream* stream, int8_t powerPin, //Power pin of sensor. int8_t powerPin2 = -1, //Power pin of RS485 module. int8_t enablePin = -1, uint8_t measurementsToAverage = 1) |
And the initialization like this:
1 2 3 4 5 6 7 |
// Create a Keller Nanolevel sensor object KellerNanolevel nanolevel(nanolevelModbusAddress, modbusSerial, nlAdapterPower, //Power pin of the RS485 adapter nanolevelPower, //Power pin of the sensor nl485EnablePin, nanolevelNumberReadings); |
Would not the power pins be the opposite of intended?