summaryrefslogtreecommitdiff
path: root/src/app
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2021-11-03 21:58:58 +0100
committerDaniel Friesel <derf@finalrewind.org>2021-11-03 21:58:58 +0100
commit4c357319532aa07fa6e4d42552c3e1e22259c944 (patch)
tree8497acabece1f37af6cb674c77705ce9f198a2fc /src/app
parent39872ea0504d3a87158623e22596390e56759c53 (diff)
wetterstation: monitor vcc and temperature
Diffstat (limited to 'src/app')
-rw-r--r--src/app/wetterstation/main.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/app/wetterstation/main.cc b/src/app/wetterstation/main.cc
index 6907eac..fb62ae9 100644
--- a/src/app/wetterstation/main.cc
+++ b/src/app/wetterstation/main.cc
@@ -4,6 +4,7 @@
* SPDX-License-Identifier: BSD-2-Clause
*/
#include "arch.h"
+#include "driver/adc.h"
#include "driver/gpio.h"
#include "driver/stdout.h"
@@ -61,6 +62,9 @@ void loop(void)
dew_count = 0;
gpio.input(GPIO::pc5, 0);
gpio.input(GPIO::pc4, 0);
+
+ kout << "Voltage = " << adc.getVCC_mV() << endl;
+ kout << "Temperature = " << adc.getTemp_mdegC() << endl;
}
}