preload inputs

This commit is contained in:
Siwat Sirichai 2024-03-25 14:29:03 +07:00
parent 3c04d435f1
commit 63107ce0f2
2 changed files with 3 additions and 2 deletions

View file

@ -12,6 +12,6 @@
platform = espressif32 platform = espressif32
board = wt32-eth01 board = wt32-eth01
framework = arduino framework = arduino
lib_deps = siwats/ESPMegaPROR3@^2.5.1 lib_deps = siwats/ESPMegaPROR3@^2.5.3
monitor_speed = 115200 monitor_speed = 115200
build_flags = -DCORE_DEBUG_LEVEL=5 build_flags = -DCORE_DEBUG_LEVEL=5

View file

@ -12,7 +12,7 @@ AnalogCard analogCard = AnalogCard();
float voltage = 220.0; float voltage = 220.0;
float adc2current(uint16_t adc_val) { float adc2current(uint16_t adc_val) {
return adc_val * 0.707; return adc_val * 1.0;
} }
#define CT_INTERVAL 5000 #define CT_INTERVAL 5000
@ -92,6 +92,7 @@ void setup()
Serial.print("boot_state.txt=\"Core Initializing . . .\""); Serial.print("boot_state.txt=\"Core Initializing . . .\"");
sendStopBytes(); sendStopBytes();
espmega.begin(); espmega.begin();
espmega.inputs.loop();
// if (clear_fram) // if (clear_fram)
// { // {
// Serial.print("boot_state.txt=\"Factory Resetting . . .\""); // Serial.print("boot_state.txt=\"Factory Resetting . . .\"");