HB, OTA etc

This commit is contained in:
2026-04-22 20:11:55 +03:00
parent 4100931deb
commit cb1014c950
76 changed files with 3157 additions and 232 deletions

20
esp32/main/gpio_init.cpp Normal file
View File

@@ -0,0 +1,20 @@
#include "gpio_init.h"
#include "hal/gpio_types.h"
#include "driver/gpio.h"
#define PIN_OUT GPIO_NUM_22
void init_gpio()
{
gpio_config_t io_conf = {
.pin_bit_mask = (1ULL << PIN_OUT),
.mode = GPIO_MODE_OUTPUT,
.pull_up_en = GPIO_PULLUP_DISABLE,
.pull_down_en = GPIO_PULLDOWN_DISABLE,
.intr_type = GPIO_INTR_DISABLE
};
gpio_config(&io_conf);
gpio_set_level(PIN_OUT, 1); // HIGH ≈ 3.3В
}