All modules and core of the app was created

This commit is contained in:
2024-01-11 22:47:53 +07:00
parent 3c2889b8f7
commit 5dd404d44b
18 changed files with 647 additions and 128 deletions

16
BoardI2C.hpp Normal file
View File

@@ -0,0 +1,16 @@
#include "Wire.h"
#include "board_pins.h"
#include "esp_log.h"
class BoardI2C : public TwoWire {
public:
BoardI2C(bool loop_on_fail = true) : TwoWire(0) {
if (begin(I2C_SDA_PIN, I2C_SCL_PIN, 100000)) {
ESP_LOGI("I2CBus", "Bus initialized");
} else {
ESP_LOGE("I2CBus", "Failed to initialize the i2c software bus!");
while (loop_on_fail)
;
}
}
};