Skip to content

Commit

Permalink
update to driver version 1.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
LeonieFierz committed Feb 4, 2025
1 parent 1ad8861 commit 1c1f909
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions sample-implementations/RaspberryPi_Pico/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,13 @@ int main(void) {
}

// Get serial number.
uint16_t one;
uint16_t two;
uint16_t three;
status = scd4x_get_serial_number(&one, &two, &three);
uint16_t serial_number[3] = {0};
status = scd4x_get_serial_number(serial_number, 3);
if (status) {
printf("Unable to get sensor serial number. Error: %d\n", status);
return status;
}
printf("Sensor serial number is: 0x%x 0x%x 0x%x\n", (int)one, (int)two, (int)three);
printf("Sensor serial number is: 0x%x 0x%x 0x%x\n", (int)serial_number[0], (int)serial_number[1], (int)serial_number[2]);

// Start the readings.
status = scd4x_start_periodic_measurement();
Expand All @@ -57,9 +55,9 @@ int main(void) {
bool dataReady;
do {
sleep_ms(10);
status = scd4x_get_data_ready_flag(&dataReady);
status = scd4x_get_data_ready_status(&dataReady);
if (status) {
printf("Unable to get sensor readiness flag. Error %d.\n", status);
printf("Unable to get sensor readiness status. Error %d.\n", status);
return status;
}
} while (!dataReady);
Expand Down

0 comments on commit 1c1f909

Please sign in to comment.