Storing sensor data in an array

Hi sterretje, that code is working perfectly thank you for your help. I must have been reading out of date information on the variable used to index the array. Thank you so much for your help it is much appreciated.