MCPcopy Create free account
hub / github.com/OpenEarable/open-earable / start

Method start

src/custom_sensor/BARO_Sensor.cpp:9–24  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7}
8
9void BARO_Sensor::start() {
10 if (available) {
11 return;
12 }
13
14 Wire1.begin(); // Call if neccessary
15
16 if (Baro->begin(BMP280_ADDRESS_ALT, BMP280_CHIPID)) {
17 available = true;
18 Baro->setSampling(Adafruit_BMP280::MODE_NORMAL,
19 Adafruit_BMP280::SAMPLING_X2,
20 Adafruit_BMP280::SAMPLING_X1,
21 Adafruit_BMP280::FILTER_OFF,
22 Adafruit_BMP280::STANDBY_MS_1);
23 }
24}
25
26void BARO_Sensor::end() {
27 if (!available) {

Callers

nothing calls this directly

Calls 2

setSamplingMethod · 0.80
beginMethod · 0.45

Tested by

no test coverage detected