mirror of
https://github.com/kevinveenbirkenbach/physical-interface.git
synced 2024-11-13 05:41:05 +01:00
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
Block a user