# Bradzilla84/arduino-tft-lib text overwrites

**URL:** <https://forum.xod.io/t/bradzilla84-arduino-tft-lib-text-overwrites/3910>\
**Category:** XOD Programming Questions\
**Created:** [May 5, 2020, 9:37pm UTC](https://forum.xod.io/t/bradzilla84-arduino-tft-lib-text-overwrites/3910 "2020-05-05T21:37:21Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![fusionfanatic](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.xod.io/fusionfanatic/32/2757_2.png) [@fusionfanatic](https://forum.xod.io/u/fusionfanatic)\
**Post date:** [May 5, 2020, 9:37pm UTC](https://forum.xod.io/t/bradzilla84-arduino-tft-lib-text-overwrites/3910/1 "2020-05-05T21:37:21Z")

</div>

Hey, I’m using bradzilla84 library with my ST7735. I’m running some tests with a Real Time Clock module. using the display text node the text overwrites and just fills the area rather than clearing the previous character first.

Any iadvice?  
Thanks

---

<div class="post-metadata">

**Author:** ![cesars](https://avatars.discourse-cdn.com/v4/letter/c/f05b48/32.png) [@cesars](https://forum.xod.io/u/cesars)\
**Post date:** [May 5, 2020, 10:07pm UTC](https://forum.xod.io/t/bradzilla84-arduino-tft-lib-text-overwrites/3910/2 "2020-05-05T22:07:01Z")

</div>

Hi, can you upload the project or a screenshot?

---

<div class="post-metadata">

**Author:** ![fusionfanatic](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.xod.io/fusionfanatic/32/2757_2.png) [@fusionfanatic](https://forum.xod.io/u/fusionfanatic)\
**Post date:** [May 5, 2020, 10:28pm UTC](https://forum.xod.io/t/bradzilla84-arduino-tft-lib-text-overwrites/3910/3 "2020-05-05T22:28:32Z")

</div>

[ST7735 1.8 inch TFT Test Program.xodball](https://forum.xod.io/uploads/short-url/9j1ZzqZwefNQOdkQZz9FDaGDE5Q.xodball) (14.3 KB)

I added a rectangle and clock to overwrite every second as you can see.

---

<div class="post-metadata">

**Author:** ![cesars](https://avatars.discourse-cdn.com/v4/letter/c/f05b48/32.png) [@cesars](https://forum.xod.io/u/cesars)\
**Post date:** [May 5, 2020, 11:36pm UTC](https://forum.xod.io/t/bradzilla84-arduino-tft-lib-text-overwrites/3910/4 "2020-05-05T23:36:51Z")

</div>

Maybe using `draw-fillscreen` to clean up, sending an `OK` pulse to `INT`.

I have no experience with that hardware, but maybe your file will help someone else.

---

<div class="post-metadata">

**Author:** ![fusionfanatic](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.xod.io/fusionfanatic/32/2757_2.png) [@fusionfanatic](https://forum.xod.io/u/fusionfanatic)\
**Post date:** [May 6, 2020, 6:36am UTC](https://forum.xod.io/t/bradzilla84-arduino-tft-lib-text-overwrites/3910/5 "2020-05-06T06:36:59Z")

</div>

Yes I tried that on a clock every second for the seconds to refresh but it’s no good having the whole screen flicker.

This is why I went with the rectangle.

I shall keep trying.

Ty

---

<div class="post-metadata">

**Author:** ![cesars](https://avatars.discourse-cdn.com/v4/letter/c/f05b48/32.png) [@cesars](https://forum.xod.io/u/cesars)\
**Post date:** [May 6, 2020, 7:12am UTC](https://forum.xod.io/t/bradzilla84-arduino-tft-lib-text-overwrites/3910/6 "2020-05-06T07:12:50Z")

</div>

I do not have hardware to try but keep in mind the following, sometimes something sequential is not the best. Try the following options, clean before sending the new data, send everything at the same time and update later, update some with a defer.

In the tm1637 library example I had to use a pulse string to show the byte data on the display. I know it has nothing to do with a TFT but it will give you an idea of ​​how to use the pulses.

---

<div class="post-metadata">

**Author:** ![fusionfanatic](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.xod.io/fusionfanatic/32/2757_2.png) [@fusionfanatic](https://forum.xod.io/u/fusionfanatic)\
**Post date:** [May 6, 2020, 12:09pm UTC](https://forum.xod.io/t/bradzilla84-arduino-tft-lib-text-overwrites/3910/7 "2020-05-06T12:09:21Z")

</div>

The main reason for posing the question was to ensure that I wasn’t missing something obvious. Thanks for your input cesars.

---

<div class="post-metadata">

**Author:** ![cesars](https://avatars.discourse-cdn.com/v4/letter/c/f05b48/32.png) [@cesars](https://forum.xod.io/u/cesars)\
**Post date:** [May 7, 2020, 7:31am UTC](https://forum.xod.io/t/bradzilla84-arduino-tft-lib-text-overwrites/3910/8 "2020-05-07T07:31:28Z")

</div>

Something that I had to change in some libraries to be able to use OUT to IN, are some lines of code.  
In the first code it only sends to the output if there is no pulse in INIT, and that causes a delay in the output.

In the second code, IN is always sent to OUT.

```auto
   if (!isInputDirty<input_INIT>(ctx)){
   emitValue<output_OUT>(ctx, getValue<input_DEV>(ctx));
       return;}

```

by

```auto
    emitValue<output_OUT>(ctx, getValue<input_DEV>(ctx));
    if (!isInputDirty<input_INIT>(ctx))
        return;

```

---

<div class="post-metadata">

**Author:** ![fusionfanatic](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.xod.io/fusionfanatic/32/2757_2.png) [@fusionfanatic](https://forum.xod.io/u/fusionfanatic)\
**Post date:** [May 7, 2020, 10:08am UTC](https://forum.xod.io/t/bradzilla84-arduino-tft-lib-text-overwrites/3910/9 "2020-05-07T10:08:56Z")

</div>

I think XOD is an excellent platform. I really want to use it and support it. I feel like its at the early stages still but come a long way.

Cesars, I really appreciate your suggestion/comment here but I switched to xod because getting the program to do what I want in arduino IDE is beyond my current abilities. I wouldn’t know where to start with what you have presented.

I also have a suspicion that the node does not read the TFT screen size correctly given that there are 2-4 pixels on the right and bottom of the screen missed.

I’d like to be able to use different fonts too.

Feels like I’m whining a bit on this message…time to do more learning

---

<div class="post-metadata">

**Author:** ![fusionfanatic](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.xod.io/fusionfanatic/32/2757_2.png) [@fusionfanatic](https://forum.xod.io/u/fusionfanatic)\
**Post date:** [May 7, 2020, 10:11am UTC](https://forum.xod.io/t/bradzilla84-arduino-tft-lib-text-overwrites/3910/10 "2020-05-07T10:11:01Z")

</div>

[![](https://img.youtube.com/vi/z8BIsVmcqQk/hqdefault.jpg "Update on Testing project XOD with DS18B20 Temperature and ST7735 TFT LCD on...") ](https://www.youtube.com/watch?v=z8BIsVmcqQk)

video so you can see the setup

---

<div class="post-metadata">

**Author:** ![fusionfanatic](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.xod.io/fusionfanatic/32/2757_2.png) [@fusionfanatic](https://forum.xod.io/u/fusionfanatic)\
**Post date:** [May 7, 2020, 10:13am UTC](https://forum.xod.io/t/bradzilla84-arduino-tft-lib-text-overwrites/3910/11 "2020-05-07T10:13:36Z")

</div>

[ST7735 1.8 inch TFT Test Program.xodball](https://forum.xod.io/uploads/short-url/s7mfhYz1COhHlUASDwafp1z88w2.xodball) (25.9 KB)

Added the program too, I made it dynamically change the size of a rectangle drawn to clear the seconds then minutes based on change from those outputs, if mins = “00” it clears the whole screen to deal with the date and hours refreshing.

Feels like a really clunky work around…

---

<div class="post-metadata">

**Author:** ![cesars](https://avatars.discourse-cdn.com/v4/letter/c/f05b48/32.png) [@cesars](https://forum.xod.io/u/cesars)\
**Post date:** [May 7, 2020, 1:42pm UTC](https://forum.xod.io/t/bradzilla84-arduino-tft-lib-text-overwrites/3910/12 "2020-05-07T13:42:39Z")

</div>

When I started with XOD it looked like the following image.

 ![many_nodes1](https://canada1.discourse-cdn.com/flex027/uploads/xod/original/2X/7/76c2c65aee0cbb11564051a9b09853b2258bce63.png)

I did not spend much time with XOD, I continued experimenting with various software, some of which I never understood, only after learning with XOD I came to understand those

But I dedicated everything to XOD because it gave me the possibility of making my nodes in an easier way.  
It was also evolving and improving.

Here attached a project that is the modified library of Bradzilla84. Personalize it a bit and change the color pins.

The compilation is correct on my pc, but I can’t test on hardware, you can work on 00-example or create a new patch.

[tft-display.xodball](https://forum.xod.io/uploads/short-url/28bbt49FRfqolR6SESsXWG3Ihw5.xodball) (40.9 KB)

ps: there is a library TFT in progress, maybe the developers will release it in the next version. 😉 , can see the progress at

> **[xodio/xod](https://github.com/xodio/xod/)**
>
> XOD IDE. Contribute to xodio/xod development by creating an account on GitHub.

---

<div class="post-metadata">

**Author:** ![fusionfanatic](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.xod.io/fusionfanatic/32/2757_2.png) [@fusionfanatic](https://forum.xod.io/u/fusionfanatic)\
**Post date:** [May 7, 2020, 2:05pm UTC](https://forum.xod.io/t/bradzilla84-arduino-tft-lib-text-overwrites/3910/13 "2020-05-07T14:05:20Z")

</div>

Thanks for the reply, it did not work, not sure why. I just get blank screen.

I will keep on with it.

---

<div class="post-metadata">

**Author:** ![cesars](https://avatars.discourse-cdn.com/v4/letter/c/f05b48/32.png) [@cesars](https://forum.xod.io/u/cesars)\
**Post date:** [May 7, 2020, 2:13pm UTC](https://forum.xod.io/t/bradzilla84-arduino-tft-lib-text-overwrites/3910/14 "2020-05-07T14:13:40Z")

</div>

you can try something simple, for example make a circle only.  
In some cases you have to reset manually.

---

<div class="post-metadata">

**Author:** ![fusionfanatic](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.xod.io/fusionfanatic/32/2757_2.png) [@fusionfanatic](https://forum.xod.io/u/fusionfanatic)\
**Post date:** [May 7, 2020, 2:15pm UTC](https://forum.xod.io/t/bradzilla84-arduino-tft-lib-text-overwrites/3910/15 "2020-05-07T14:15:28Z")

</div>

its all good, I haven’t had chance to look at it properly, just a quick upload. I will be able to dedicate more time to it later on.

Thanks

---

<div class="post-metadata">

**Author:** ![cesars](https://avatars.discourse-cdn.com/v4/letter/c/f05b48/32.png) [@cesars](https://forum.xod.io/u/cesars)\
**Post date:** [May 8, 2020, 1:22am UTC](https://forum.xod.io/t/bradzilla84-arduino-tft-lib-text-overwrites/3910/16 "2020-05-08T01:22:40Z")

</div>

> [@fusionfanatic](#):
>
> [ST7735 1.8 inch TFT Test Program.xodball](https://forum.xod.io/uploads/short-url/s7mfhYz1COhHlUASDwafp1z88w2.xodball) (25.9 KB)

Could you try this? is the example above with modified nodes.

[ST7735 1.8 inch TFT Test Program\_mod.xodball](https://forum.xod.io/uploads/short-url/ybcE38TuKz1OhaYkL4BUDp9p9zA.xodball) (53.8 KB)

---

<div class="post-metadata">

**Author:** ![fusionfanatic](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.xod.io/fusionfanatic/32/2757_2.png) [@fusionfanatic](https://forum.xod.io/u/fusionfanatic)\
**Post date:** [May 8, 2020, 8:31am UTC](https://forum.xod.io/t/bradzilla84-arduino-tft-lib-text-overwrites/3910/17 "2020-05-08T08:31:11Z")

</div>

Hey Cesars, I tried a raw upload of your modified program, the screen is blank.

I also modified your previous modified test down to the fill screen only node and it did not fill the screen with the colour suggested. just black.

Thanks

---

<div class="post-metadata">

**Author:** ![cesars](https://avatars.discourse-cdn.com/v4/letter/c/f05b48/32.png) [@cesars](https://forum.xod.io/u/cesars)\
**Post date:** [May 8, 2020, 11:36am UTC](https://forum.xod.io/t/bradzilla84-arduino-tft-lib-text-overwrites/3910/18 "2020-05-08T11:36:24Z")

</div>

Thanks for answering, I ask you for one last test, in the above I had removed the output update, generally not necessary in other libraries.  
Otherwise I will have to get a hardware to continue investigating.  
Cheers

[ST7735 1.8 inch TFT Test Program\_mod(2).xodball](https://forum.xod.io/uploads/short-url/xC5rj7D3Sm9s1PyqZCdwmXakxqG.xodball) (54.1 KB)

---

<div class="post-metadata">

**Author:** ![fusionfanatic](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.xod.io/fusionfanatic/32/2757_2.png) [@fusionfanatic](https://forum.xod.io/u/fusionfanatic)\
**Post date:** [May 8, 2020, 11:52am UTC](https://forum.xod.io/t/bradzilla84-arduino-tft-lib-text-overwrites/3910/19 "2020-05-08T11:52:39Z")

</div>

Hi, still black screen on that iteration

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex027/uploads/xod/original/1X/eb7348baa04192c2ef932d1db54d44f09f8a7888.png) [@system](https://forum.xod.io/u/system)\
**Post date:** [June 7, 2020, 12:01pm UTC](https://forum.xod.io/t/bradzilla84-arduino-tft-lib-text-overwrites/3910/20 "2020-06-07T12:01:09Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
