Hii! There is a probleme that I have to solve:

I have to use 4 ‘‘TMP36’’ and 3 LEDS. I have 4 appartments and one temperature for each one. My TMP sensor will read thease temperatures with this function: **T ( ^{o}C) = (((analogValue*5)/1024) - 0.5)*100**

The function which calculates the average temperature is **Τ = x _{1}*T_{1} + x_{2}*T_{2} + x_{3}*T_{3} + x_{4}*T**

_{4 ,}

in which x1,x2,x3,x4 are by default

**x**

_{1}= 0.1, x_{2 }= 0.3, x_{3}= 0.5, x_{4}= 0.1Afterwards

if T<=20 then LEDS OFF

if T>20 && T<=30 then one LED ON

if T>30 && T<=40 then two LEDS ON

if T>40 then tree LEDS ON