This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
version: '3.8'
|
||||
services:
|
||||
app:
|
||||
image: gitea.maiertobi.de/tobimai/devcontainer-pio:latest
|
||||
image: gitea.tobiasmaier.me/tobimai/devcontainer-pio:latest
|
||||
user: tobi:tobi
|
||||
volumes:
|
||||
- ..:/workspace:cached
|
||||
|
||||
@@ -12,18 +12,20 @@
|
||||
default_envs = ESP32_INA233, ESP32_INA226
|
||||
|
||||
[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
|
||||
framework = arduino
|
||||
monitor_speed = 115200
|
||||
; monitor_filters = esp32_exception_decoder
|
||||
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
|
||||
fetchOTA
|
||||
x385832/Elog@~2.0.10
|
||||
INA233
|
||||
ESP32Ping
|
||||
x385832/Elog
|
||||
board_build.partitions = default.csv
|
||||
fetchOTA
|
||||
board_build.partitions = min_spiffs.csv
|
||||
upload_protocol = espota
|
||||
upload_port = 192.168.5.205
|
||||
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
|
||||
bblanchon/ArduinoJson@^6.21.3
|
||||
x385832/Elog@~2.0.10
|
||||
fetchOTA
|
||||
board_build.partitions = min_spiffs.csv
|
||||
upload_protocol = espota
|
||||
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
|
||||
|
||||
void init_sensor(){
|
||||
Wire.begin(33, 32);
|
||||
ina_sensor.begin();
|
||||
#ifdef USE_INA226
|
||||
Wire.begin(33, 32);
|
||||
ina_sensor.begin();
|
||||
ina_sensor.setMaxCurrentShunt(0.02, 4, false);
|
||||
ina_sensor.setBusVoltageConversionTime(7);
|
||||
ina_sensor.setShuntVoltageConversionTime(7);
|
||||
ina_sensor.setAverage(4);
|
||||
#else
|
||||
ina_sensor.begin(33, 32);
|
||||
ina_sensor.reset();
|
||||
ina_sensor.setShuntVoltageConversionTime(conversion_time_8244uS);
|
||||
ina_sensor.setBusVoltageConversionTime(conversion_time_8244uS);
|
||||
|
||||
Reference in New Issue
Block a user