Skip to content

writeMTreg

Stefan Armborst edited this page Jan 27, 2020 · 6 revisions

writeMtreg

This function sets a new MTreg for the next measurements. Please read working-principle if you are not familiar with this term.

bool writeMtreg(byte mtreg);

result Boolean

true if successful communication. This command is send physically to the sensor.


Parameter byte mtreg

This value is send immediately and stored in the sensor.
It is used for all following measurements.
A running measurement is neither interrupted nor influenced! The Lux calculation of the current running measurement is always calculated correctly (unlike most other libraries).

This command is the only way to force a setting of this value to the sensor.
For example, if you use start(newMtreg... to set a new MTreg it only will write the MTreg to the sensor if it differs from the already stored value. This minimizes the access to wire.

Clone this wiki locally