ThingPulse / esp8266-weather-station-color

ESP8266 Weather Station in Color using ILI9341 TFT 240x320 display
https://thingpulse.com/product/esp8266-wifi-color-display-kit-2-4/
MIT License
565 stars 221 forks source link

Added ESP32 support #144

Closed anabolyc closed 2 years ago

anabolyc commented 2 years ago

Fixes #\<GitHub-issue-number>.

Make sure all boxes are checked (add x inside the brackets) when you submit your contribution, remove this sentence before doing so.

\<Description of and rationale behind this PR>

edasque commented 2 years ago

So this was never merged, was it?

anabolyc commented 2 years ago

I've created it accidentally, intention was to keep in in fork. My changes would break upstream repo.

edasque commented 2 years ago

Gotcha. I can't create issues on https://github.com/anabolyc/esp32-esp8266-weather-station-color - do you think it would work on a LILYGO TTGO T-Display ESP32 (IPS ST7789V 1.14 Inch at 135px*240px) and if not, what should I be looking at to make it work (guessing you don't support that display resolution), @anabolyc ?

anabolyc commented 2 years ago

@edasque I'm using same display controller and don't have touch, so it will work. Please have a look at platformio.ini file and make pinout and screen size adjustments, it should work with no code changes apart from that.

edasque commented 2 years ago

Some of that worked but not the display. Serial monitor gets up to:

start document
Free mem: 264904

with

    -D ST7789_TFTWIDTH=135
    -D ST7789_TFTHEIGHT=240
    -D TFT_CS=5
    -D TFT_RST=23
    -D TFT_DC=16
    -D TFT_LED=4
    -D TFT_ROTATION=0
    -D TFT_MOSI=19
    -D TFT_SCLK=18

But I think the earlier screen setup part probably isn't working. I changed the code to:

  gfx.init();
  gfx.fillBuffer(MINI_YELLOW/);
  gfx.setRotation(TFT_ROTATION);
  gfx.commit();

And it doesn't turn yellow (LED is on though)

Where would you start debugging?

anabolyc commented 2 years ago

@edasque pinout seems right, MOSI and SCLK is redundant, since it is configured as HW SPI. Really hard to say without having board to poke around. I'd try to run Bodmer's TFT_eSPI and Adafruit ST7789 lib samples, as soon as you'd get it to work you can check what is the initialization code that works.