Thursday Gadget Roundup and More Displays

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:

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.

Update September 2021

I noted in an earlier Tasmota-display.bin development update some severe font issues and I spent days talking to the author of some of the Tasmota displays – Gerhard Mutz – he recently included a 7-segment font – and thanks to a little encouragement these will work on ESP8266 (that’s what I’m running my tests on to be sure).

I’ve also learned about the Tasmota file system and it is now possible to run PNG files (losing the transparency) through an editor to convert them into .RGB files so that icons can be easily added to Tasmota-displays – I expect this is in the tasmota-display.bin file but certainly in a custom Tasmota file – also font 5 onwards are optionally added RAM fonts. In essence we can 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.

Lots of fonts are available here but beware they take up RAM. “displaybatch” lets you run files stored in the file system (which has to be enabled depending on your tasmota build). I run it with display.bat (the file who’s contents can init the display on powerup – currently not 100% perfect at powerup) or other .bat files – you need a leading slash before the file name. Example: displaybatch /display2.bat

Given a graphic in the root of the Tasmota file system and also a file called display.bat (with for example [z] in it to clear the display) then running displaybatch /display.ini produces the following display: (the virus image wasn’t my idea:-) )

As soon as this lot ends up in tasmota-display.bin the ILI9341 wiring to achieve all this will be:

Note that I’ve been wiring reset to the processor reset but that reset line has to be defined anyway so may as well wire to that pin. Interestingly, LIL9341 CS does NOT need defining – above you are looking at a screenshot of a working setup – as it happens on a custom build (I finally figured out how to make one of those).

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:
displaymodel 9
power 1
displayrotate 0
displaysize 1
displaymode 0
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 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 9.2.0.4[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 “”), 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.

RGB Shark
RGB USB 3D Shark from Banggood

And Finally

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.

7 thoughts on “Thursday Gadget Roundup and More Displays

  1. speaking of displays:
    rPi OS now allows setting up i2c buses on other GPIO pins but the default node-red-contrib-oled didn’t let you specify the I2C bus and only defaulted to i2c-1.

    My forked version of node-red-contrib-oled lets you set the Bus number in the config node – https://github.com/dlarue/node-red-contrib-oled

    On the rPi, I added the 2nd I2C bus adding this line to /boot/config.txt which creates bus i2c-4:
    dtoverlay=i2c-gpio,bus=4,i2c_gpio_delay_us=1,i2c_gpio_sda=23,i2c_gpio_scl=24

    1. Hi

      The node-red i2c node is one of three which over time has given me trouble – the others being serial and the sqlite node. Serial seems ok now, I was planning to do away with SQLITE and using I2c in Node-Red in favour of simply calling up ESP8266-based displays via MQTT given the tiny exra cost of an ESP8266 board. Worth a note however.

      1. yes, I’ve had problems with I2C on esp8266 recently too and on various other devices over the years. It’s really designed for on board(PCB) type communications but 4 wires is just too easy sometimes. Chaining devices when there’s no pass-thru is also a PIA so I was pleased to see I could create a new i2c bus on the rPi with just a config.txt line.

        Interesting idea of using the esp with OLED as a remote display.

        1. Hi Doug… I’ve been using ESP8266 with OLEDS (SSD1306 – the 32 and 64 px high versions) for years, until recently using my own ESP-GO but now I use Tasmota – it doesn’t get any easier. Just make sure the display gets turned off when you’re not looking at it (foe example a simple timer or proximity device) – they don;t last 3 months if left on 24-7 (first hand experience)… but 5 minutes when needed, say half a dozen times a day, they will last for years. In any case I’ve yet to find an RPi4 case (except monsters) that will do a good job of housing the OLED, so may as well site it nearby or on top… thinking about it, my RPis sit on shelves out of the way.. so a nice SSD1306 with a button (on top of the PC monitor for example) could multi-task to tell the power-up state of the RPi and some other duty as well. Or it could report on several RPis… sky’s the limit 🙂

          1. Thanks for the heads-up on the display age failure. I’ll add some blanking in node-red to turn off the displays and think about a button or sensor to turn them on/off.

            So are you using the displays on esp8266 to show status of the device or are you sending mqtt strings to them for remote displays?

            1. I think the point of the “Power” command is to turn the displays opn and off without losing the contents – so – in Tasniota if you set “Pulsetime” to a decent timeout, the display will go off after a whilewithout losing data. “POWER 1” will bring it back up ready to timeout again. I marginally prefer the idea of a cheap proximity sensor.

        2. The original Espressif implementation of I2c was no good – I2c not supported in hardware, it’s a software version. Of late I’ve had no problems with I2c either in my own ESG-GO or in Tasmota.

Comments are closed.