/ PyGamer_Thermal_Camera / thermal_cam_converters.py
thermal_cam_converters.py
1 # SPDX-FileCopyrightText: 2020 Jan Goolsbey for Adafruit Industries 2 # 3 # SPDX-License-Identifier: MIT 4 5 # thermal_cam_converters.py 6 7 def celsius_to_fahrenheit(deg_c=None): # convert C to F; round to 1 degree C 8 return round(((9 / 5) * deg_c) + 32) 9 10 def fahrenheit_to_celsius(deg_f=None): # convert F to C; round to 1 degree F 11 return round((deg_f - 32) * (5 / 9))