from atemperatureSensor import ATemperatureSensor
import math


class TempSensorSim(ATemperatureSensor):
	def __init__(self, name):
		super(TempSensorSim, self).__init__(name)
		self.count = 0
		self.freq = 0.2

	def temperature(self):
		self.count += 1
		return 22.37 + 0.1*math.sin(2*math.pi*self.count*self.freq)

