setDriveMode()

Set sample rate of the sensor. In begin set default CCS811_DRIVE_MODE_1SEC. In Modes CCS811_DRIVE_MODE_1SEC, CCS811_DRIVE_MODE_10SEC, CCS811_DRIVE_MODE_60SEC, the equivalent CO2 concentration (ppm) and TVOC concentration (ppb) are calculated for every sample.
  • Mode CCS811_DRIVE_MODE_1SEC reacts fastest to gas presence, but has a higher operating current
  • Mode CCS811_DRIVE_MODE_60SEC reacts more slowly to gas presence but has the lowest average operating current.
When a sensor operating mode is changed to a new mode with a lower sample rate (e.g. from Mode CCS811_DRIVE_MODE_1SEC to Mode CCS811_DRIVE_MODE_60SEC), it should be placed in Mode 0 (Idle) for at least 10 minutes before enabling the new mode. When a sensor operating mode is changed to a new mode with a higher sample rate (e.g. from Mode CCS811_DRIVE_MODE_60SEC to Mode CCS811_DRIVE_MODE_1SEC), there is no requirement to wait before enabling the new mode. Mode CCS811_DRIVE_MODE_250MS is intended for systems where an external host system wants to run an algorithm with raw data and this mode provides new sample data every 250ms Mode timings are subject to typical 2% tolerance due to accuracy of internal clock ccs.setDriveMode(mode)
ccs: a variable of type ZUNO_CCS811.
mode:
  • CCS811_DRIVE_MODE_IDLE – Idle (Measurements are disabled in this mode)
  • CCS811_DRIVE_MODE_1SEC – Constant power mode, IAQ measurement every second
  • CCS811_DRIVE_MODE_10SEC - Pulse heating mode IAQ measurement every 10 seconds
  • CCS811_DRIVE_MODE_60SEC – Low power pulse heating mode IAQ measurement every 60 seconds
  • CCS811_DRIVE_MODE_250MS - Constant power mode, sensor measurement every 250ms

nothing