From ff89a6ce7b5d85767652fbd895942faef38198f6 Mon Sep 17 00:00:00 2001 From: ENGO150 Date: Fri, 15 Nov 2024 21:29:11 +0100 Subject: [PATCH] replaced serial communication with LCD --- RadiationMapper.ino | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/RadiationMapper.ino b/RadiationMapper.ino index 8800c07..f0d15c3 100644 --- a/RadiationMapper.ino +++ b/RadiationMapper.ino @@ -18,6 +18,7 @@ along with this program. If not, see . #include +#include "display.hpp" #define INPUT_PIN 10 //VIN PIN FOR GEIGER COUNTER #define MEASUREMENT_TIME_MS 60000 //MINUTE @@ -33,8 +34,8 @@ void IRAM_ATTR increment_counts() //TODO: Possible noise void setup() { - //SERIAL COMMUNICATION INIT - Serial.begin(9600); + //INIT LCD + display::begin(); //INIT PINS pinMode(INPUT_PIN, INPUT); @@ -59,6 +60,6 @@ void loop() if (last_counts != current_counts) //PRINT CPM IF CHANGED { last_counts = current_counts; - Serial.println(String(current_counts * CALIBRATION_FACTOR) + " uSv/h"); + display::print(String(current_counts) + " CPM", String(current_counts * CALIBRATION_FACTOR) + " uSv/h"); //TODO: Replace with OLED } }