@ -36,6 +36,10 @@ static int mb_write_and_read(uint8_t *buffer, int num, size_t resplen) {
num = uart_read_bytes(CO2_UART_NUM, buffer, resplen, pdMS_TO_TICKS(500));
ESP_LOGD(TAG, "Received %d bytes", num);
ESP_LOG_BUFFER_HEXDUMP(TAG, buffer, num, ESP_LOG_DEBUG);
if (num == 0) {
ESP_LOGE(TAG, "No modbus response!");
}
return num;