Could I use draw image block of OLED Graphics lib to show Chinese words

Issue #413 resolved
Tom Ming created an issue

@John Maloney

Hi John,

I would like to show chinese words on OLED with ESP32 Dev Kit.

Could I use draw image block or make image block to do it? OR is there a better way?

Thanks.

Comments (9)

  1. John Maloney repo owner

    Hi, Tom. You can definitely use the draw image block. However, the "make image" block is only 5x5, which may not provide enough resolution for Chinese characters.

    An alternative is to use larger images. This tutorial describes a way to create the images and embed them as data in a MicroBlocks project using Snap! Another way is to use the BMP library and the 8-bit library. This post on discord demos that technique.

    Good luck!

  2. Tom Ming reporter

    I clould show chinese words on OLED with ESP32 Dev kit.

    This is my demo to show chinese words.

    Thanks for your help.

  3. Tom Ming reporter

    We have a lively discussion about how to display Chinese characters with OLED in our community.

    Now Patch Li has built a Scratch project to generate Hex code for a 16*16 Chinese word.

    And he also built a Scratch project to return Hex codes for Chinese words throuth MQTT.

  4. John Maloney repo owner

    I tried Patch Li's project. I am impressed that he was able to implement it in Scratch.

    Are you using the "OLED Graphics" library to display the hex on the OLED display? That library is flexible, but it is big.

    For certain boards (e.g. the Pico-W and micro:bit V2), an OLED driver is built into the MicroBlocks firmware. On those boards, you can use the TFT library for graphics, which is much smaller than the "OLED Graphics" library so projects load faster and have more room for your own code. However, the TFT library currently lacks an equivalent to the "draw image" block of the "OLED Graphics" library.

    It might make sense to add an equivalent feature to the TFT library.

    What board(s) are you currently using with the OLED display?

  5. Tom Ming reporter

    I use ESP32 Dev kit with the OLED display.

    Yes I use "OLED Graphics" library to display the hex on the OLED display.

    When the board displays many chinese words,The MB IDE will become a bit stuck.

  6. Log in to comment