Added calculation of volt input
This commit is contained in:
parent
d89cac59cb
commit
6a81630826
|
@ -144,7 +144,8 @@ String getJsonPir(void){
|
|||
}
|
||||
|
||||
String getJsonLdr(void){
|
||||
return "{\"relative\":\""+String(analogRead (pin_ldr))+"\"}";
|
||||
float volt = 5.0 /1024.0 * analogRead (pin_ldr);
|
||||
return "{\"input_volt\":\""+String(volt)+"\"}";
|
||||
}
|
||||
|
||||
String getJsonIrLastRecieved(void){
|
||||
|
|
Loading…
Reference in New Issue