Skip to content

Commit ce2e7bb

Browse files
committed
Change naming SCD40 to SCD4x and adapt readout time from 2 s to 5 s
1 parent 7baf987 commit ce2e7bb

File tree

2 files changed

+12
-11
lines changed

2 files changed

+12
-11
lines changed

SCD4x_I2C_FRC_Forced_Recalibration_Example/SCD4x_I2C_FRC_Forced_Recalibration_Example.ino

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131

3232
#include <Wire.h>
3333

34-
// SCD40
34+
// SCD4x
3535
const int16_t SCD_ADDRESS = 0x62;
3636

3737
void setup() {
@@ -52,7 +52,7 @@ void setup() {
5252
// wait until sensors are ready, > 1000 ms according to datasheet
5353
delay(1000);
5454

55-
// start scd measurement in periodic mode, will update every 2 s
55+
// start scd measurement in periodic mode, will update every 5 s
5656
Wire.beginTransmission(SCD_ADDRESS);
5757
Wire.write(0x21);
5858
Wire.write(0xb1);
@@ -108,7 +108,7 @@ void setup() {
108108
// wait for sensor
109109
delay(20);
110110

111-
// assuming an external reference shows 350 ppm
111+
// assuming an external reference shows 650 ppm
112112
calibration = 650;
113113

114114
// prepare buffer with data for calibration
@@ -155,8 +155,8 @@ void setup() {
155155
Wire.write(0xb1);
156156
Wire.endTransmission();
157157

158-
// wait for first measurement to be finished
159-
delay(4000);
158+
// wait for first measurement to be finished (> 5 s)
159+
delay(10000);
160160
}
161161

162162
void loop() {
@@ -194,8 +194,8 @@ void loop() {
194194
Serial.print(humidity);
195195
Serial.println();
196196

197-
// wait 2 s for next measurement
198-
delay(2000);
197+
// wait 5 s for next measurement
198+
delay(5000);
199199
}
200200

201201
// calculate CRC according to datasheet section 5.17

SCD4x_I2C_minimal_example/SCD4x_I2C_minimal_example.ino

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,11 @@
3131

3232
#include <Wire.h>
3333

34-
// SCD40
34+
// SCD4x
3535
const int16_t SCD_ADDRESS = 0x62;
3636

3737
void setup() {
38+
// check in your settings that the right speed is selected
3839
Serial.begin(115200);
3940
// wait for serial connection from PC
4041
// comment the following line if you'd like the output
@@ -50,14 +51,14 @@ void setup() {
5051
// wait until sensors are ready, > 1000 ms according to datasheet
5152
delay(1000);
5253

53-
// start scd measurement in periodic mode, will update every 2 s
54+
// start scd measurement in periodic mode, will update every 5 s
5455
Wire.beginTransmission(SCD_ADDRESS);
5556
Wire.write(0x21);
5657
Wire.write(0xb1);
5758
Wire.endTransmission();
5859

5960
// wait for first measurement to be finished
60-
delay(2000);
61+
delay(5000);
6162
}
6263

6364
void loop() {
@@ -96,5 +97,5 @@ void loop() {
9697
Serial.println();
9798

9899
// wait 2 s for next measurement
99-
delay(2000);
100+
delay(5000);
100101
}

0 commit comments

Comments
 (0)