Open Eth030 opened 1 year ago
Can you confirm that you are using ESPHome version 2022.11 or higher?
Can you confirm that you are using ESPHome version 2022.11 or higher?
ESPHome Current version: 2022.12.3
I just checked in a bunch of changes - the errors indicating the re-assignment of pins can be safely ignored for now.
Can you confirm that you are using ESPHome version 2022.11 or higher?
@eisaheinig can you confirm you are using the tft_espi_display.h file included in this repo? There is a change in that file that will cause your errors if you are not using this version.
Please make sure your tft_espi_display.h file looks like the following:
#include <SPI.h>
#include <TFT_eSPI.h>
#include "esphome.h"
#include "Free_Fonts.h"
#ifndef DISPLAYCONTROLLER
#define DISPLAYCONTROLLER
class DisplayController : public Component
{
public:
void setup() override {
tft.init();
}
TFT_eSPI tft = TFT_eSPI();
TFT_eSprite spr = TFT_eSprite(&tft); // Sprite object
private:
};
DisplayController * display = new DisplayController();
#endif
Can you confirm that you are using ESPHome version 2022.11 or higher?
@eisaheinig can you confirm you are using the tft_espi_display.h file included in this repo? There is a change in that file that will cause your errors if you are not using this version.
I was using the tft_espi from the manufacturer https://github.com/Xinyuan-LilyGO/T-Display-S3 Mine is way bigger than yours, pun not intended:
#include <SPI.h>
#include <TFT_eSPI.h>
#include "esphome.h"
#include "Free_Fonts.h"
#ifndef DISPLAYCONTROLLER
#define DISPLAYCONTROLLER
class DisplayController : public Component
{
double barSize = 0;
public:
TFT_eSPI tft = TFT_eSPI();
std::string time = "init";
void setup() override {
tft.init();
tft.fillScreen(TFT_BLACK);
tft.setRotation(3);
tft.setFreeFont(FSB18);
}
void drawString(std::string text) {
tft.setTextColor(TFT_RED, TFT_BLACK);
tft.drawString(text.c_str(), 8, 64, GFXFF);
}
void drawBar() {
tft.fillRect(0, 4, barSize, 8, TFT_RED);
barSize+=1;
if(barSize > 320) {
tft.fillRect(0, 4, barSize, 8, TFT_BLACK);
barSize = 0;
}
}
void clear() {
tft.fillScreen(TFT_BLACK);
}
void loop() override {
}
private:
};
DisplayController * displayControllerComponent = new DisplayController();
#endif
Thanks for helping out, I will try yours.
That will do it. I edited that file to make the ESPHome code easier to read
Hi I am having issue with your yaml, can you look over it, maybe you can spot the error. Thank you very much.