SCD30 NDIR CO2 sensor calibration

I'm trying to change some values for sensor calibration.
The values that I need to change are in the picture below, "ASC MSB"(byte), "ASC LSB"(byte), "CRC"(byte).
Data sheet what I attached says if I change ["ASC MBS" to 0x00, "ASC LSB" to 0x01], the auto calibration function is activated.
So, I tried that as "SCD_ASC_read_1229" file below, but I got "invalid use of void expression" error for Serial.println()function.

Can anyone help me with this problem?

SCD30_ASC_read_1229.ino (728 Bytes)

co2_Sensirion_SCD30_Protocol.pdf (1.1 MB)

Your ASCread function is defined as "void", meaning it does not return data.
But you expect it to return the byte from the; statement.
You have to declare :
byte ASCread(byte ASCReadheader);

There are some other problems.

  • where is your loop function ?
  • according to the datasheet you include in your post, the CRC byte 0x81 is compatible with the MSB/LSB bytes (0x00 0x00) to deactivate selfcalibration, not with the bytes (0x00 0x01) to activate it. You need to recalculate the CRC byte, see the relevant paragraph on CRC in the datasheet.