This first week of Feb 2021 I received lots of gadgets and some more displays from Banggood including an old favourite – the ILI9341 – good, cheap LCD display – which I’ve always supported in ESP-GO – but now I want to run on an ESP8266 (again) this time using Tasmota. Here’s the ILI9341 display first: 2.4 Inch 240*320 Color HD LCD TFT Screen SPI Serial Display Module ILI9341
The setup for the display wasn’t QUITE as indicated on the Tasmota site – it seems that displays are not yet a high priority there, but with help I managed to get it running – here’s the template for Tasmota-display standard build – no need to compile a special. Note that the display does NOT have a CS pin but this has to be defined in Tasmota for the display to be recognised. I hooked RESET to RST and the backlight to pin marked BLK on the display. It SEEMS that Tasmota display support is a bit primitive as yet.
Note the ILI9341 CS and DC settings – the SPI versions don’t work – see above and this works. Also, CS is not used on these boards but needs to be defined in Tasmota or it won’t recognise the display. In the end, easier done than written about so here we go – 4 lines and some coloured text. The software also does boxes and circles.
Important update February 14, 2021: I noted in a recent Tasmota-displays dev update some severe font issues and have spent the last 3 days talking to the author of some of the Tasmota displays – Gerhard Mutz – he has code with more fonts including a 7-segment font – and thanks to a little encouragement these will work on ESP8266.
I’ve also learned about the Tasmota file system and as of this weekend it is possible to run PNG files (losing the transparency) though an editor to convert them into .RGB files so that icons can be easily added to Tasmota-displays – I expect this will end up in the tasmota-display.bin file sometime this week – sorry I can’t be more specific as I just fired a question about seemingly inconsistent font numbering. In essence we should soon have a small number of fonts including 7-segment as well as a range of colour icons available to use in Tasmota for the ILI9341. For me it has been a goal to get this facility for many months. The file system makes it possible to store the icons in FLASH and checking earlier I noted not far short of 2MB available for this purpose.
Ibelieve Garhard has just added a new batch command called displaybatch. Given a graphic in the root of the Tasmota file system and also a file called display.ini (in this case with a displaytext command in it) then running displaybatch /display.ini produces the following display: (the virus image wasn’t my idea:-) )
As soon as this lot wnds up in tasmota-display.ini, the ILI9341 wiring to achive all this will be:
Note that I’m actually wiring reset to the processor reset but that reset line has to be defined anyway.
End of update.
With success on the ILI9341 board from Banggood, I turned to a model JYC150-7P SPI SSD1351 OLED board. The board has a link set for 4-wire SPI, I changed the link over to 3-wire SPI. Sadly no matter what combinations I tried – despite help from a couple of guys on the Tasmota displays DISCORD channel, we still got no-where. I found this document – which seemed to clear up what to do with the SPI DC wire, reset and CS – but.. nothing but black from the display.
In the meantime I tried a very old SSD1351 (2013 ILSoft Ltd) display board. Here are the settings I used after changing the link (cutting) on THAT board to set to SPI 3-wire mode with DC grounded, CS wired to Tasmota SSD1351 CS (see Tasmota config page) and RST to ESP8266 RESET. This board has SCK and SDI which go to the Tasmota SPI CLK and SPI MOSI :
Tasmota Console commands:
displaytext [z][x0y0h128x0y127h128x0y0v128x127y0v128][x5y3C31s1f1]Working[x5y23C30735]Color is purple[x5y43C4032]Green text[x5y63C63488]red text[x5y83C64800]Orange text
No other settings in Tasmota-displays.bin.gz were used to achieve the above. See this page for the full colour codes (indexed did not work – I used the full colour codes).
Still working on the (as yet blank screen) new JYC150-7P SSD1351 board and I have an ST7789 board that doesn’t work at all.
However, a small Geekcreit OLED SSD1131 board described as 0.95″ 7-pin 65K colour SPI OLED which works very well.
The little 96*96px SSD1131 board has good, solid colours. Although the purple rectanle looks washed out in the photo here, it is absolutely not, in reality.
I should take this opportunity to correct some colour coding on the Tasmota page as relates to this and similar displays. The page refers to green as code “8”. As we are looking at a display that uses 5 bits, 6 bits and 5 bits for R,G,B respectively, full green is in fact 64*63 i.e. 1984.
Once again this display works well but feature support for displays in Tasmota still leaves something to be desired – more fonts would be good and not just scaled up. In the example to the right above, I’m using codes which may look awkward at first – but are merely text – with commands embedded in square brackets – z for CLEAR SCREEN, x and y for POSITIONING, f for FONT, C for COLOUR, r for RECTANGLE and R for FILLED RECTANGLE:
DisplayText [zf0C64536r96:64C3x3y3C63488]Tasmota 184.108.40.206[x3y15C65504f0]SSD1131 1.14"[x3y27C1984]Some green[x3y39C31]Some blue[x76y44C30735R16:16]
Note that as time goes on, the control for these displays is mutating as the drivers improve – keep an eye out for a later update.
In Other News
Another great gadget – see photo below: You’ll see a white dolphin I picked up at a seaside market in Spain early summer 2020 – they are widely available – they come with a wooden base + USB lead and have a bright, warm, single-colour (white) display – but the SHARK came from Banggood (described as “Shark 3D Night Light 7 Colors Changing LED Touch Switch USB Table Lamp“), has a solid-looking black plastic base, USB lead and has full RGB including touch button options for any single colour or slowly cycling through the colours. I love it and so does my wife. The shark base in the photo above is sitting on a USB battery power pack I happened to have handy.
The tiny, inexpensive boards below recently arrived from China – I believe AliExpress… handy to use if you need extra power pins for a USB project. I’m always short of power and ground pins – as you can see these have both 5v and 3v3 out from micro-USB in.