From 6a81630826763b0fc0ac341d57b26ba99e56d4e2 Mon Sep 17 00:00:00 2001 From: "Kevin Veen-Birkenbach [aka. Frantz]" Date: Tue, 12 May 2020 18:11:35 +0200 Subject: [PATCH] Added calculation of volt input --- main/main.ino | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main/main.ino b/main/main.ino index 2e5faa5..16275f8 100644 --- a/main/main.ino +++ b/main/main.ino @@ -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){