@dreamer This is 'roughly' how I average temperatures from sensor
float room_temp_read[5] = { 25, 25, 25, 25, 25 }; //array of five reads int x = 1; //(declared in Setup) //Read and Average subroutine if (x > 4) { x = 0; } room_temp_read[x] = tempC; room_tempAVG = (room_temp_read[0] + room_temp_read[1] + room_temp_read[2] + room_temp_read[3] + room_temp_read[4] + room_tempAVG * 8) / 13; //five reads + weighted average equals 13 x++; //increment to next array pointerThere are five reads 0-4 and a heavy weighted average (times 8) of the last average results
This is Arduino C, but just change the grammar for Python.
-Terry