Skip to content

Commit 31850d7

Browse files
committed
update to driver version 1.1.0
1 parent 1ad8861 commit 31850d7

File tree

1 file changed

+5
-7
lines changed
  • sample-implementations/RaspberryPi_Pico

1 file changed

+5
-7
lines changed

sample-implementations/RaspberryPi_Pico/main.c

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,13 @@ int main(void) {
3434
}
3535

3636
// Get serial number.
37-
uint16_t one;
38-
uint16_t two;
39-
uint16_t three;
40-
status = scd4x_get_serial_number(&one, &two, &three);
37+
uint16_t serial_number[3] = {0};
38+
status = scd4x_get_serial_number(serial_number, 3);
4139
if (status) {
4240
printf("Unable to get sensor serial number. Error: %d\n", status);
4341
return status;
4442
}
45-
printf("Sensor serial number is: 0x%x 0x%x 0x%x\n", (int)one, (int)two, (int)three);
43+
printf("Sensor serial number is: 0x%x 0x%x 0x%x\n", (int)serial_number[0], (int)serial_number[1], (int)serial_number[2]);
4644

4745
// Start the readings.
4846
status = scd4x_start_periodic_measurement();
@@ -57,9 +55,9 @@ int main(void) {
5755
bool dataReady;
5856
do {
5957
sleep_ms(10);
60-
status = scd4x_get_data_ready_flag(&dataReady);
58+
status = scd4x_get_data_ready_status(&dataReady);
6159
if (status) {
62-
printf("Unable to get sensor readiness flag. Error %d.\n", status);
60+
printf("Unable to get sensor readiness status. Error %d.\n", status);
6361
return status;
6462
}
6563
} while (!dataReady);

0 commit comments

Comments
 (0)