This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
version: '3.8'
|
version: '3.8'
|
||||||
services:
|
services:
|
||||||
app:
|
app:
|
||||||
image: gitea.maiertobi.de/tobimai/devcontainer-pio:latest
|
image: gitea.tobiasmaier.me/tobimai/devcontainer-pio:latest
|
||||||
user: tobi:tobi
|
user: tobi:tobi
|
||||||
volumes:
|
volumes:
|
||||||
- ..:/workspace:cached
|
- ..:/workspace:cached
|
||||||
|
|||||||
@@ -12,18 +12,20 @@
|
|||||||
default_envs = ESP32_INA233, ESP32_INA226
|
default_envs = ESP32_INA233, ESP32_INA226
|
||||||
|
|
||||||
[env:ESP32_INA233]
|
[env:ESP32_INA233]
|
||||||
platform = espressif32 @ 6.0.0
|
platform = https://github.com/pioarduino/platform-espressif32/releases/download/55.03.32/platform-espressif32.zip
|
||||||
board = esp32dev
|
board = esp32dev
|
||||||
framework = arduino
|
framework = arduino
|
||||||
monitor_speed = 115200
|
monitor_speed = 115200
|
||||||
|
; monitor_filters = esp32_exception_decoder
|
||||||
lib_deps =
|
lib_deps =
|
||||||
ottowinter/ESPAsyncWebServer-esphome@^3.3.0
|
esp32async/AsyncTCP @ ~3.4.9
|
||||||
|
esp32async/ESPAsyncWebServer @ ~3.8.1
|
||||||
|
robtillaart/INA226@ ~0.6.4
|
||||||
bblanchon/ArduinoJson@^6.21.3
|
bblanchon/ArduinoJson@^6.21.3
|
||||||
fetchOTA
|
x385832/Elog@~2.0.10
|
||||||
INA233
|
INA233
|
||||||
ESP32Ping
|
fetchOTA
|
||||||
x385832/Elog
|
board_build.partitions = min_spiffs.csv
|
||||||
board_build.partitions = default.csv
|
|
||||||
upload_protocol = espota
|
upload_protocol = espota
|
||||||
upload_port = 192.168.5.205
|
upload_port = 192.168.5.205
|
||||||
build_flags = -Wall -Wextra -DLOGGING_SPIFFS_DISABLE -DLOGGING_SD_DISABLE -DELOG_SYSLOG_ENABLE -fexceptions
|
build_flags = -Wall -Wextra -DLOGGING_SPIFFS_DISABLE -DLOGGING_SD_DISABLE -DELOG_SYSLOG_ENABLE -fexceptions
|
||||||
@@ -40,6 +42,7 @@ lib_deps =
|
|||||||
robtillaart/INA226@ ~0.6.4
|
robtillaart/INA226@ ~0.6.4
|
||||||
bblanchon/ArduinoJson@^6.21.3
|
bblanchon/ArduinoJson@^6.21.3
|
||||||
x385832/Elog@~2.0.10
|
x385832/Elog@~2.0.10
|
||||||
|
fetchOTA
|
||||||
board_build.partitions = min_spiffs.csv
|
board_build.partitions = min_spiffs.csv
|
||||||
upload_protocol = espota
|
upload_protocol = espota
|
||||||
upload_port = 192.168.6.45
|
upload_port = 192.168.6.45
|
||||||
|
|||||||
@@ -26,14 +26,15 @@ extern SensorData shunt_data;
|
|||||||
float zero_value = 0.03; // Measured shunt voltage with nothing connected, used to fix measuring offset
|
float zero_value = 0.03; // Measured shunt voltage with nothing connected, used to fix measuring offset
|
||||||
|
|
||||||
void init_sensor(){
|
void init_sensor(){
|
||||||
Wire.begin(33, 32);
|
|
||||||
ina_sensor.begin();
|
|
||||||
#ifdef USE_INA226
|
#ifdef USE_INA226
|
||||||
|
Wire.begin(33, 32);
|
||||||
|
ina_sensor.begin();
|
||||||
ina_sensor.setMaxCurrentShunt(0.02, 4, false);
|
ina_sensor.setMaxCurrentShunt(0.02, 4, false);
|
||||||
ina_sensor.setBusVoltageConversionTime(7);
|
ina_sensor.setBusVoltageConversionTime(7);
|
||||||
ina_sensor.setShuntVoltageConversionTime(7);
|
ina_sensor.setShuntVoltageConversionTime(7);
|
||||||
ina_sensor.setAverage(4);
|
ina_sensor.setAverage(4);
|
||||||
#else
|
#else
|
||||||
|
ina_sensor.begin(33, 32);
|
||||||
ina_sensor.reset();
|
ina_sensor.reset();
|
||||||
ina_sensor.setShuntVoltageConversionTime(conversion_time_8244uS);
|
ina_sensor.setShuntVoltageConversionTime(conversion_time_8244uS);
|
||||||
ina_sensor.setBusVoltageConversionTime(conversion_time_8244uS);
|
ina_sensor.setBusVoltageConversionTime(conversion_time_8244uS);
|
||||||
|
|||||||
Reference in New Issue
Block a user