Hi all,
I am trying to get this OLED under control with an Arduino Nano: 0.96 inch 80x160 OLED with SPI connectivity, controller chip ST7735S.
As you can see on the picture I can do a lot of things with instructions based on what the <Adafruit_GFX.h> and <Adafruit_ST7735.h> libraries have to offer (i.e., a lot - thanks, Adafruit!). I found additional <Xtronical_ST7735.h> and <UTFT.h> libraries, next decided to give these a try and then the compiler went berserk, probably because of the multiplicity of libraries. I had to completely reinstall my libraries.
So, because of this experience I embarked on a fresh U8G2 type of approach. However, I have not yet been able to put a sketch together a in U8g2lib style. Main issue is the constructor. Does U8G2 support the ST7735S chip / Nano anyway? (the S at the end stands for 'scroll'. Any suggestions for a constructor?
wiring currently: SCL--D13, SDA--D11, RED--D5, DC--D7, CS--D6 and BLK not connected. This is a 3.3V device; all control wires have a 220 ohm resistor in series to reduce the 5V HIGHs of the Nano
You do not have an OLED.
It is a ST7735 TFT. It should be supported by several ST7735 libraries. But do not expect "older" libraries like UTFT to support it. This particular item is relatively recent to the Ebay market.
What target Arduino do you intend to use?
David.
Hi David,
Yes, of course, it is a TFT, and it has a very bright and stable screen with nice colors. I acquired it out of sheer curiosity and with some vague intention to combine it with an ESP8266 to create long animatons. My habit is to test any new sensor or display first with the familiar Arduino before attempting to identify the correct pins on NodeMCU's and Wemos D1 minis (the latter board is my favorite ESP8266). A complicating factor is that I bought last summer a bag full of electronics that contained a couple of WROOM ESP32 boards. Oh my, these are even more intimidating than the ESP8266s.
<U8g2lib.h> is very versatile and supports a large range of mircropocessors and displays. This prompted me to bring my question on the forum. Does <mcufriend_kbv.h> support this TFT?
regards, Photoncatcher
ESP32 is much easier than ESP8266.
Bodmer's TFT_eSPI supports both ESP8266 and ESP32. And now STM32.
From memory, the 80x160 is only a 128x160 with 24 pixels on the left and right snipped off.
Also from memory, I think that both TFT_eSPI and Adafruit_ST7735 can handle this geometry.
Also from memory, it is Ucglib which does colour. U8g2lib is monochrome.
Personally, I would stick to a GFX style library. And just rearrange any project for the different geometries of the popular TFT and OLED displays. I recently bought a Lilygo TTGO T-Display which has a 135x240 panel.
David.
I posted a wiring diagram for the 160*180 ST7735 TFT with an Arduino Nano on my blog, thesolaruniverse.wordpress.com. As it turns out with the demo sketch included the RGB585 colors are for some unknown reason displayed inverted, so in order to get the desired colors I had to create a #define color table with inverted colors. The GFX instruction to invert color, neither tft.invertDisplay(true); nor tft.invertDisplay(false); did not change any color.
As the ultimate goal is to wire this interesting TFT to an ESP8266 or a WROOM I am now continuing with this display with Bodmer's TFT-eSPI library. The example TFT_7735_Meter_5 was unsuccessful.
Post links to your hardware display.
Then you will get an accurate reply.
Panels vary. e.g. geometry, inverted colours, Blue/Red swap, ...
If you ask, you will probably get shown which INIT_NAME to use in the tft.begin() or tft.init() method.
Yes, you can create a whole set of non-standard COLOUR_VALUES but it is much simpler to just initialise correctly in the first place. i.e. one single statement.
Or in Bodmer's TFT_eSPI library, it is probably one line in User_Setup that fixes all the example sketches.
David.
There are variants on the ST7735 chip, check the possible initiators from the library, somewhere you should mention it. This determines the correct registers for each variant in both pixel offset and the proper RGB arrangement.
As far as I remember the new libraries take into account the first denomination that ADAFRUIT gave them, there is a variant called BLACKTAB, another GREENTAB and variants with different pixel arrangements (160x80, 160x128, among others).
PD: And that you have not seen the ST7735 version with touch panel...
ST7735 Graph test
Panels vary. It is always wise to post a link to the actual display that you bought.
For example, Adafruit sell a 80x160 display but the colours are different to the regular Ebay/AliExpress 80x160.
Provide a link (or photo of the pcb) and we can probably identify it. And suggest the correct initialisation.
@ TFTLCDCyg,
Likewise, please provide a link to the Touch Panel display in your video.
David.
Here is the place where I found this little guy, he comes in handy for tests in teensy 4. It is the 12 pin version
Ha! Finally the sketch e_TFT_graphicstest combined with Bodmer's e_TFT library produced text, lines, triangles and buttons on my little 80*160 ST7735 TFT wired to an ESP32-WROOM32. Now this has been accomplished I can proceed towards letting my green dino animations run and roar on this little jewel TFT. Watch the solaruniverse blog!
Everything seems to boil down to properly editing <setup.h> that is located in the library folder, TFT_eSPI. Not done this before. There's a lot to discover in e-TFT world!
regards to all, Photoncatcher