adafruit / Adafruit_LIS3MDL

Adafruit library for LIS3MDL magnetometer
Other
11 stars 8 forks source link

Do not call Wire.begin inside the sensor.begin #13

Open dizcza opened 5 months ago

dizcza commented 5 months ago

Calling Wire.begin inside a sensor initialization is a bad practice and developers should avoid it by all means.

https://github.com/adafruit/Adafruit_LIS3MDL/blob/64e685ba784c9741b5b101ca8ce509a101a8ff1b/Adafruit_LIS3MDL.cpp#L51