pico is recognized
Dependencies: max32625pico mbed SerialInterface USBDevice
Diff: main.cpp
- Revision:
- 8:c7d662d45727
- Parent:
- 7:8bc9fad71b8c
- Child:
- 9:42ab3b212395
--- a/main.cpp Thu Jan 30 20:33:16 2020 +0000 +++ b/main.cpp Fri Jan 31 18:23:59 2020 +0000 @@ -107,7 +107,7 @@ int32_t n_brightness; float f_temp; wait(5); - pc.printf("waiting for resetting the max30102\n\r"); + pc.printf("waiting to reset the max30102\n\r"); maxim_max30102_reset(); //resets the MAX30102 wait(1); pc.printf("finished resetting the max30102\n\r"); @@ -142,11 +142,8 @@ //read the first 500 samples, and determine the signal range for(i=0;i<n_ir_buffer_length;i++) - { - wait_ms(10); - + { maxim_max30102_read_fifo((aun_red_buffer+i), (aun_ir_buffer+i)); //read from MAX30102 FIFO - if(un_min>aun_red_buffer[i]) un_min=aun_red_buffer[i]; //update signal min if(un_max<aun_red_buffer[i]) @@ -155,6 +152,7 @@ pc.printf("%i", aun_red_buffer[i]); pc.printf(", ir="); pc.printf("%i\n\r", aun_ir_buffer[i]); + wait_ms(10); } un_prev_data=aun_red_buffer[i];