feat(firmware): support configurable SEN54 and SEN66 boards

Add the pinned Sensirion SEN66 driver, central sensor and board profiles, and a separate GPIO I2C bus for SEN66 with display. Preserve the original display layout and keep NOx and CO2 in InfluxDB. Include protocol tests, hardware workflow documentation and verified deployment results without credentials.
This commit is contained in:
root
2026-11-09 21:44:04 +00:00
parent 45b05d045a
commit 69bb47dda1
27 changed files with 2634 additions and 111 deletions
+1 -1
View File
@@ -2,4 +2,4 @@ file(GLOB_RECURSE SRC_FILES "*.c")
idf_component_register(SRCS ${SRC_FILES}
INCLUDE_DIRS "."
REQUIRES "esp_lcd" "driver" "esp_adc" "esp_lcd_jd9853" "esp_lcd_touch_axs5106" "fatfs" "nvs_flash" "lwip" "esp_wifi")
REQUIRES "hardware_config" "esp_lcd" "driver" "esp_adc" "esp_lcd_jd9853" "esp_lcd_touch_axs5106" "fatfs" "nvs_flash" "lwip" "esp_wifi")
+5 -3
View File
@@ -4,9 +4,11 @@
#include "driver/i2c_master.h"
#include "driver/gpio.h"
#define EXAMPLE_PIN_I2C_SDA GPIO_NUM_18
#define EXAMPLE_PIN_I2C_SCL GPIO_NUM_19
#define I2C_PORT_NUM 0
#include "hardware_config.h"
#define EXAMPLE_PIN_I2C_SDA NANOPSX_I2C_SDA
#define EXAMPLE_PIN_I2C_SCL NANOPSX_I2C_SCL
#define I2C_PORT_NUM NANOPSX_I2C_PORT
#ifdef __cplusplus
extern "C" {
+14 -3
View File
@@ -7,7 +7,7 @@
#include "esp_log.h"
#include "bsp_touch.h"
void bsp_touch_init(esp_lcd_touch_handle_t *touch_handle, i2c_master_bus_handle_t bus_handle, uint16_t xmax, uint16_t ymax, uint16_t rotation)
esp_err_t bsp_touch_init(esp_lcd_touch_handle_t *touch_handle, i2c_master_bus_handle_t bus_handle, uint16_t xmax, uint16_t ymax, uint16_t rotation)
{
static i2c_master_dev_handle_t dev_handle;
i2c_device_config_t dev_cfg = {
@@ -15,7 +15,9 @@ void bsp_touch_init(esp_lcd_touch_handle_t *touch_handle, i2c_master_bus_handle_
.device_address = ESP_LCD_TOUCH_IO_I2C_AXS5106_ADDRESS,
.scl_speed_hz = 400000,
};
ESP_ERROR_CHECK(i2c_master_bus_add_device(bus_handle, &dev_cfg, &dev_handle));
*touch_handle = NULL;
esp_err_t err = i2c_master_bus_add_device(bus_handle, &dev_cfg, &dev_handle);
if (err != ESP_OK) return err;
esp_lcd_touch_config_t tp_cfg = {};
tp_cfg.x_max = xmax < ymax ? xmax : ymax;
@@ -48,5 +50,14 @@ void bsp_touch_init(esp_lcd_touch_handle_t *touch_handle, i2c_master_bus_handle_
tp_cfg.flags.mirror_y = 0;
}
ESP_ERROR_CHECK(esp_lcd_touch_new_i2c_axs5106(dev_handle, &tp_cfg, touch_handle));
err = esp_lcd_touch_new_i2c_axs5106(dev_handle, &tp_cfg, touch_handle);
if (err == ESP_OK) {
err = i2c_master_probe(bus_handle, dev_cfg.device_address, 100);
if (err != ESP_OK) esp_lcd_touch_del(*touch_handle);
}
if (err != ESP_OK) {
i2c_master_bus_rm_device(dev_handle);
*touch_handle = NULL;
}
return err;
}
+1 -1
View File
@@ -13,7 +13,7 @@
extern "C" {
#endif
void bsp_touch_init(esp_lcd_touch_handle_t *touch_handle, i2c_master_bus_handle_t bus_handle, uint16_t xmax, uint16_t ymax, uint16_t rotation);
esp_err_t bsp_touch_init(esp_lcd_touch_handle_t *touch_handle, i2c_master_bus_handle_t bus_handle, uint16_t xmax, uint16_t ymax, uint16_t rotation);
#ifdef __cplusplus
}
#endif