So I'm using two arduino nano 33 BLEs as peripherals that are sending data from the ADC pins to Raspberry Pi 4 Model B central. For my application, it is neccessary to very precisely measure the sampling rate of data from the ADC and the sampling rate of data on the Raspberry Pi end. As well, my current sampling rate is a measly 10 data samples/second (with my imprecise way of measuring it at the moment) and I need to increase that to around 2000.
My question is, how can I very precisely measure data sampling rate and the data transmission rate, and how can I increase the data sampling/transmission rate (maybe buffers or something like that)?