CCS811 CO2 sensor change operation mode

Hi , i want to ask how to change operation mode of this sensor. In datasheet it is stated that i change a register on this chip but how i change register bit on a i2c device. The code and the datasheet is in the image

tasos1234567890:
Hi , i want to ask how to change operation mode of this sensor. In datasheet it is stated that i change a register on this chip but how i change register bit on a i2c device. The code and the datasheet is in the image

the Adafruit_CCS811 library has a funtion for that:

setDriveMode();

and the mode available in the library as well:

CCS811_DRIVE_MODE_IDLE = 0x00
CCS811_DRIVE_MODE_1SEC = 0x01
CCS811_DRIVE_MODE_10SEC = 0x02
CCS811_DRIVE_MODE_60SEC = 0x03
CCS811_DRIVE_MODE_250MS = 0x04

so to change the mode to '010' all you need to do IMHO is to insert
ccs.setDriveMode(CCS811_DRIVE_MODE_10SEC); after
ccs.begin() in you code.

also I don't think it is necessary need to include wire.begin() in your code based on the example provided.

hope that helps....

thanks man. you saved me 19mA :slight_smile: