You read 5 Sensors with three readings per sensor, so either have three arrays five elements deep...
for a = 0 to 4
gosub read_temp
temp_A[a] = temp_c
temp_B[a] = temp_f
temp_C[a] = temp_k
next a
or one array 15 elements deep...
for a = 0 to 4
gosub read_temp
temp_0[a] = temp_c
temp_0[a+5] = temp_f
temp_0[a+10] = temp_k
next a
or if you want the readings contiguous next to each other (again with a 15 element array), add another variable like so...
for a = 0 to 4
b=a*3
gosub read_temp
temp_0[b] = temp_c
temp_0[b+1] = temp_f
temp_0[b+2] = temp_k
next a
There's three examples... need more variations?




Bookmarks