Nano BLE Bootloader Crash?

I certainly can not find any issues with your sketch.

I double press the white button to place the Nano 33 in bootload mode. I then select the bootload port and upload the code. After upload I go back to tools and select the usb serial port for the monitor. I then can open the monitor and see this output

21:35:44.777 -> sensor values = 
21:35:44.777 -> 1023
21:35:46.792 -> sensor values = 
21:35:46.792 -> 1020
21:35:48.807 -> sensor values = 
21:35:48.807 -> 1021
21:35:50.775 -> sensor values = 
21:35:50.775 -> 1023