Skip to content

Files

Failed to load latest commit information.

Latest commit

 Cannot retrieve latest commit at this time.

History

History

ESP8266-TFT_eSPI

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Touch Electra

Easy install Electra Touch TFT on ESP8266 4MByte 12E / 12F from Browser

ESP Web installer https://ldijkman.github.io/randomnerd_esp32_wifi_manager/Touch_Electra-Electra_Touch/

  • 4 versions to choose from (at its best with a 480x320 TFT screen)
    • ILI9341_DRIVER for SPI TFT Touch display.
    • ILI9486_DRIVER for SPI TFT Touch display. with openweather -> edit config.txt -> from cloudeditor
    • ILI9488_DRIVER for SPI TFT Touch display. with openweather -> edit config.txt -> from cloudeditor
    • ST7796_DRIVER for SPI TFT Touch display. with openweather -> edit config.txt -> from cloudeditor
  • if you delete the file touch_calibrate.txt on the ESP with webeditor ACE js CloudEditor http:// IP or mDNS /edit
      • editor login == admin / admin (removed the login)
    • then on next reboot a touch calibrate again
  • D0==GPIO16 free for relais
  • D1, D2 for i2c BME280 temperature / humidity / millibar pressure

want to make an ESP8266 touch display for Electra

Easy Home Automation


(sorry wil be best for 480x320 TFT displays 14pins SPI resistive touch IC XPT2046)


<br


idea: do a local network scan for other mDNS "Electra" devices:

  • kitchen.local, living.local, garage.local, garden.local Etcetera
  • and show touch controlled buttons on screen. button color reveals status of the other devices

Will try TFT Touch LCD with ESP8266 NodeMCU 12E TFT_eSPI https://www.google.com/search?q=nodemcu

  • also same pinout tested on ESP8266 Wemos D1 R2 12F arduino uno sized == succesfull

https://github.com/Bodmer/TFT_eSPI

https://youtu.be/jgfdkedoNfE


ESP8266 NodeMCU 12E 12F to 14pins SPI touch TFT connections

  • VCC == +5vdc in use onboard ESP +5v is from USB (3,3V ESP onboard regulator maybe cannot handle display poweruse)
  • GND == gnd
  • CS == D8
  • RESET == RST
  • DC/RS == D3
  • SDI(MOSI) == D7
  • SCK == D5
  • LED == backlight transitor switch, +3.3vdc (could make it PWM to set backlight brightness)
      • ord dim display or turn backliht off att certain times, on at touch
  • SDO(MISO) == (not used/needed and Do not share / connect on ILI9488, if shared with T_DO touch will not work on ILI9488)
  • touch is tested tftespi touch_calibrate example with ili9341 ili9488
  • TIRQ == not used
  • T_DO == D6
  • T_DIN == shared with SDI(MOSI) == D7
  • T_CS == D4
  • T_CLK == shared with SCK == D5
  • as defined in tft_espi user_setup.h /home/pi/Arduino/libraries/TFT_eSPI/user_setup.h
  • #define TFT_MISO PIN_D6
  • #define TFT_MOSI PIN_D7
  • #define TFT_SCLK PIN_D5
  • #define TFT_CS PIN_D8 // Chip select control pin
  • #define TFT_DC PIN_D3 // Data Command control pin
  •                              // Reset pin (could connect to RST pin)
    
  • #define TFT_RST -1 // Set TFT_RST to -1 if display RESET is connected to ESP board RST
  • #define TOUCH_CS PIN_D4 // Chip select pin (T_CS) of touch screen
    • D1, D2 free for i2c BME280?! And/Or i2c i/o extender more inputs/outputs and/or whatever i2c device
    • D0 == GPIO16 for Relais (but is high at boot, wich is no problem for me)

image 14 pins SPI TFT XPT2046 Resistive Touch


make sure to set the right tft driver for your display

  • edit user_setup.h located in /home/pi/Arduino/libraries/TFT_eSPI/user_setup.h

ESP8266 NodeMCU 12E tft_espi meters example test

YT video of same tft_espi meters example but running on esp32 https://www.youtube.com/watch?v=pkHV_xGdL-s

prototype setup

ESP8266 Wemos D1 R2 12F arduino uno sized

prototype setup

more wires for touch

Just Stack it

storm in brain, make GUI scalable for 320x240 and 480x320

see if i can make a scaled gui that will look more or less the same on 320x240 and 480x320

sw x 0 to 1, SH x 0 to 1, got it from touch x/SW, y/SH

the scaled button is from center screen to rightbottom quarter center

on a smaller resolution pixels screen that scaled button will be the same possition from center screen to rightbottom quarter center

topleft will then be on the center off gray rectangle wich is the smaller screen resolution 320x240 this is 480x320

Bodmer openweather test hmmm https://blog.squix.org/2017/07/new-weatherstation-color-version-published.html

Electra touch should have this ;-)

config is now in ino code wivh is not handy

    • would like to include this with Electra so it can be installed from Brower
      • not the arduino loads off library nerdy stuff, make it easy for normal people
  • openweather api key https://openweathermap.org/
  • timezone
  • locaction Latitude and Longitude Finder https://www.latlong.net/

could make a config.txt in litlefs

  • and edit the config.txt file with inbrowser ace js cloud-web editor

https://github.com/ldijkman/OpenWeather

https://github.com/ldijkman/OpenWeather

Mixed copy paste mesh

Electra's OpenWeatherMap browser installed on ESP


EasyEDA Design a PCB inbrowser and order it inbrowser Cheap at JLCPCB


Electra Needs a Case

  • 3D Printed ;-)

arduino ide settings

  • "fqbn": "esp8266:esp8266:generic:xtal=160,vt=flash,exception=legacy,ssl=all,ResetMethod=nodemcu,CrystalFreq=26,FlashFreq=40,FlashMode=dout,eesz=4M2M,led=2,sdk=nonosdk_190703,ip=lm2f,dbg=Disabled,lvl=None____,wipe=all,baud=115200",

arduino ide settings

nodemcu pinout

NodeMcu-V21-CP2102-Lua-ESP8266-pinout-mischianti-high-resolution picture https://www.mischianti.org/

NodeMcu-V3-CH340-Lua-ESP8266-pinout-mischianti-low-resolution picture https://www.mischianti.org/


Wemos D1 R2 pinout arduino uno sized board ESP8266 12F 32mbit==4MByte

https://www.google.com/search?q=Wemos+D1+R2+pinout+arduino+uno+sized+board&oq=Wemos+D1+R2+pinout+arduino+uno+sized+board

wemos_d1_r2_pinout picture https://protosupplies.com/product/esp8266-d1-r2-wifi-processor-with-uno-footprint/


Electra Touch

Soon Electra wil Power a Gazillion Devices!

https://github.com/ldijkman/randomnerd_esp32_wifi_manager

All you need is Electra

Easy install Electra Touch TFT on ESP8266 4MByte 12E / 12F from Browser

ESP Web installer https://ldijkman.github.io/randomnerd_esp32_wifi_manager/Touch_Electra-Electra_Touch/