Skip to content

Commit d0663f3

Browse files
Merge pull request #2 from alexschwantes/patch-1
Removing hard coded I2CAddress
2 parents fceb615 + fc0d31e commit d0663f3

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

src/SparkFunCCS811.cpp

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,17 +35,13 @@ Distributed as-is; no warranty is given.
3535

3636
//****************************************************************************//
3737
//
38-
// LIS3DHCore functions
39-
//
40-
// For I2C, construct LIS3DHCore myIMU(<address>);
38+
// CCS811Core functions
4139
//
4240
// Default <address> is 0x5B.
4341
//
4442
//****************************************************************************//
45-
CCS811Core::CCS811Core( uint8_t inputArg ) : I2CAddress(0x5B)
43+
CCS811Core::CCS811Core( uint8_t inputArg ) : I2CAddress(inputArg)
4644
{
47-
I2CAddress = inputArg;
48-
4945
}
5046

5147
CCS811Core::status CCS811Core::beginCore(void)
@@ -535,4 +531,4 @@ float CCS811::getResistance( void )
535531
float CCS811::getTemperature( void )
536532
{
537533
return temperature;
538-
}
534+
}

0 commit comments

Comments
 (0)