Fixed button update code
Updated rolling average code for temperature