Author Topic: Using a 2.8in SPI LCD Touchscreen ILI9341 with an ESP32 on the new Arduino IDE 2  (Read 697 times)

0 Members and 1 Guest are viewing this topic.

Offline jcrubinTopic starter

  • Frequent Contributor
  • **
  • Posts: 353
  • Country: us
    • Technocoma
Today well be interfacing the 2.8 inch SPI LCD Touchscreen with the ILI9341 chipset to an ESP32 using the new Arduino IDE 2.X Taking advantage of both display and touchscreen features, though well skip the SD card as its just an addon to the board not directly connected to these systems.  I have a separate video for SD card interfacing.  Out setup will not be powered through the ESP32 so I'm setting up an HW-131, a well known cheap DC power supply for this task.

First Ill actually be installing the new IDE version 2.0 because I dont actually have it.  Though its much more streamlined than the 1.x series of Arduino IDE.  It also allows for a per project board configuration which is quite an improvement over the old version.  I make sure that TDT_ESPI library is installed; in my case it is, but the latest should be installed. 

Following library installation, some library configurations will be made in support of out device.  In particular, setup 42 will be addressed in a few files.  Once these changes are made the physical wiring will be made between the two devices as demonstrated in the video.    Note I did make a mistake in the wiring, it did work but wasn't ideal and caught an interesting quirk.

In the Arduino IDE I first attempt an easy example under 320x240 to ensure correct operation and wiring of the device, finding quickly a python issue on my system, easily corrected.  The next attempt shows the example working correctly.  Following this a touchscreen example is loaded for testing, which proves to also work correctly, completing this demonstration.

CVM CATAPVLTAE PROSCRIPTAE ERVNT TVM SOLI PROSCRIPTI CATAPVLTAS HABEBVNT

https://www.youtube.com/c/jordanrubin6502
 
The following users thanked this post: Lindley

Online coromonadalix

  • Super Contributor
  • ***
  • Posts: 5894
  • Country: ca
Maybe harsh or having some rant

Always visual examples, never a code snippet ...... downloadable

Nice to see but .... i tend to back away from all of this,  it's like a teaser  nothing else


And  on some cases, i had to revert to an pre v2 version, v2 was not working well for an AR488 project ?
« Last Edit: December 04, 2022, 02:12:50 pm by coromonadalix »
 
The following users thanked this post: Ian.M

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 12856
+1.  Post your code somewhere sane, that doesn't require registration to download from and link it from at least the video description, but preferably add links in the video.

If you are still using the Arduino 1.8x IDE, and have conflicting libraries (or even just settings) between different projects, a portable install of it is your friend: https://docs.arduino.cc/software/ide-v1/tutorials/PortableIDE
 

Offline Lindley

  • Regular Contributor
  • *
  • Posts: 195
  • Country: gb
Timely post @jcrubin as we are just updating our old ESP32/ILI9341 project which uses the Adafruit libraries.

Just run your tutorial  after changing the Setup file to reflect our existing wiring (DC,RST,CS pins) and even on our old  Arduino v1.8.19  IDE  it works fine, looks lke some useful code/ fonts etc in those example files.


 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf