Skip to content

Commit c0f634a

Browse files
authored
Removed pointers
Pointers are not necessary
1 parent 39600c1 commit c0f634a

File tree

1 file changed

+6
-12
lines changed

1 file changed

+6
-12
lines changed

src/Arduino_SensorKit.cpp

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,26 +6,20 @@ DHT Environment(DHTPIN, DHTTYPE);
66
SensorKit_LIS3DHTR Accelerometer;
77
SensorKit_BMP280 Pressure;
88

9-
//Pointers to access them inside the class
10-
U8G2_SSD1306_128X64_NONAME_F_HW_I2C& pOled = Oled;
11-
SensorKit_LIS3DHTR& pAccelerometer = Accelerometer;
12-
SensorKit_BMP280& pPressure = Pressure;
13-
DHT& pEnvironment = Environment;
14-
159
SensorKit::SensorKit(){}
1610

1711
bool SensorKit::begin(){
18-
pOled.begin();
12+
Oled.begin();
1913
Oled.enableUTF8Print();
2014

21-
pAccelerometer.begin();
15+
Accelerometer.begin();
2216
delay(100);
23-
pAccelerometer.setOutputDataRate(LIS3DHTR_DATARATE_50HZ);
17+
Accelerometer.setOutputDataRate(LIS3DHTR_DATARATE_50HZ);
2418

25-
pPressure.begin();
26-
pEnvironment.begin();
19+
Pressure.begin();
20+
Environment.begin();
2721
}
2822

2923
void SensorKit::end(){
3024

31-
}
25+
}

0 commit comments

Comments
 (0)