Connecting the Yellow Dev board to a TFT display

Previously I mentioned using a modified version of Squix’s Weather Station Colour as a test application for a 2.2″ TFT 240×320 display with an SPI interface.  If you have a Yellow Board hanging around unused, I really would recommend this as a useful application.  My photo doesn’t really do it justice 2.2" 240x320 TFT Display(it is a rainy day here and the light is bad).  The actual display is quite crisp and sharp (even with the protective plastic shipping sheet still attached to the screen).

What you see to the left is Keith Fowler’s modified version of Neptune2’s modified version of Squix’s original (got that?).  The middle and bottom areas on Keith’s version dynamically update every few seconds to give you expanded information (for instance, the bottom 1/3 of the screen will change to show you the current phase of the moon, while the middle will give you the same style of iconized weather for an additional three days).  It really is quite neat, even for someone with eyes as poor as mine.

Squix has build instructions on his site, which I’d just like to add to here.  He’s using a NodeMCU board, where the GPIOs are numbered a little strangely, so here’s the connection map for a normal ESP-12 (or, in our case, the Yellow Dev board):-

  • DISPLAY  ESP
  • MISO   –   N/C
  • LED   –   3v3
  • SCK   –   GPIO14
  • MOSI   –   GPIO13
  • DC/RS   –   GPIO02
  • RESET   –   RST
  • CS   –   GPIO04
  • GND   –   GND
  • VCC   –   3v3

There’s nothing special which needs to be done (other than watching out for upper-lower case issues with the names of the included font files if you’re compiling on a non-Windows machine).  Once the connections are made, you can load either Squix or Keith’s code and it will burst into life …except that you won’t get much useful weather information until you get your own developer’s ID from Weather Underground (it’s free).

The display connections leave us with GPIOs 16, 15, 12, 05 and 00 to play with (remembering that 00, 02 and 15 need special attention because of their specific pull-up/down functions at power-on).  One obvious addition would be the use of a P-channel MOSFET in the display LED backlight line to only light up the screen when a button is pressed.  That could save quite a bit of power over time (and I don’t particularly want bright flashing screens at night).

Personally, I plan on stealing some of Squix, Neptune2 and Keith’s ideas to implement a little controller which will display inside and outside temperature (using a local DS18B20 for the local sensing) and allow override control of a fan heating system via MQTT.

Squix has build instructions on his site_

Advertisements

7 thoughts on “Connecting the Yellow Dev board to a TFT display

  1. I would like to know where the sketch really is since there are several links throughout the text.
    Are there sketches here for Screens With and Without Touch?
    Thank you

    Like

  2. Hi Daniel,

    The code is Keith Fowler’s version at:- https://github.com/fowlerk/ESP8266-Color-Weather-Station-v8

    Most of the localized settings are in the “settings.h” file (and I seem to recall that the main interface driver pins, apart from DC/RS and CS, are hard coded into the library).

    There’s nothing in there for touch screens, I’m afraid. Squix’s original version has been updated several times since 2016 though, so you might want to check his site for the touch screen info:- https://github.com/ThingPulse/esp8266-weather-station-color

    Best wishes,

    -John-

    Like

    • Hi John, sorry but one question;
      What are the differences in this sketch that you have directed me to the other two: WeMos_Weather_Station_Color_OnDemandPortal_DST_V8 & Weather Alerts v9?
      Thanks++

      – Daniel –

      Like

    • Greetings John. It seems like it’s just me that’s bothering you, is not it?
      Is it that I knew that the site ‘WUNDERGROUND.COM’ no longer grants free API, so is there any solution?
      Once again, thank you.

      – Daniel –

      Like

  3. Daniel,

    The original code is fairly old now (and I certainly haven’t played with it for a couple of years), but Squix’s GitHub page has this comment:-

    ———-
    Upgrade Notes
    Replace Wunderground with OpenWeatherMap as weather data provider

    The weather information provider we used so far (Wunderground) recently stopped their free tier without previous notice on May 15, 2018. This release adds support for a new provider with a free tier for weather information: OpenWeatherMap.com. The basic demo (WeatherStationDemo) has been adapted to use this new API through the OpenWeatherMapCurrent and OpenWeatherMapForecast REST clients.
    ———-

    You can find that updated code here:- https://github.com/ThingPulse/esp8266-weather-station

    Good luck!

    -John-

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s