Page 1 of 1

temperature sensor LM335Z and analog input

Posted: Tuesday 14 May 2019 15:50
by HenkSynology
Hi evryone,
I have analoge input 0-10000mV
And i have a temperature sensor LM335Z, who gives 10mV/K
I want to now how much Celsius it is.
So.....
C=F-32/1,8

I write a program but is this not oke (??)
See errors in the log
I copy & pasta a lot off stuff and look at other programs :lol:

Code: Select all

local 'Analog Input 1 (AI1)'= 66
return {
    active = true,
	logging = {'Analog Input 1 (AI1)'},
	on = {timer = { 'every minute' }
	},
	fahrenheit1 = 'Analog Input 1 (AI1)'/10
	execute = function(domoticz, device)
	
	celsius1 = fahrenheit-32/1,8
		
		
	end
}



Re: temperature sensor LM335Z and analog input

Posted: Tuesday 14 May 2019 16:46
by waaren
HenkSynology wrote: Tuesday 14 May 2019 15:50 I have analoge input 0-10000mV
And i have a temperature sensor LM335Z, who gives 10mV/K
I want to now how much Celsius it is.
Happy to help but need some more information.
What is the type / subtype of your device in domoticz and what does it show (deg. Fahrenheit or mV or ? )
If you have calculated the Celsius value what do you want to do with it. (show in the log, store it in a variable or show it on a virtual sensor or something else ? )