# Sending simple text to Nextion Display

**URL:** <https://discourse.nodered.org/t/sending-simple-text-to-nextion-display/61713>\
**Category:** General\
**Created:** [24 April 2022 11:02 UTC](https://discourse.nodered.org/t/sending-simple-text-to-nextion-display/61713 "2022-04-24T11:02:13Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![robertebroomfield](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/robertebroomfield/32/60554_2.png) [@robertebroomfield](https://discourse.nodered.org/u/robertebroomfield)\
**Post date:** [24 April 2022 11:02 UTC](https://discourse.nodered.org/t/sending-simple-text-to-nextion-display/61713/1 "2022-04-24T11:02:13Z")

</div>

Hi All  
Im deeply frustrated with this.  
I'm trying to send text to a nextion display using serial.  
Inject node fires a function with this code

> msg.payload = 't0.txt="' + msg.payload + '"';  
> return msg;

But alas this does not appear. I have tried everything and it should just work. Here's my outgoing msg.payload from debugNode

t0.txt="Please"  
I have a textbox in the HMI called t0

Thanks in advance  
Rob

---

<div class="post-metadata">

**Author:** ![edje11](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/edje11/32/572_2.png) [@edje11](https://discourse.nodered.org/u/edje11)\
**Post date:** [24 April 2022 11:39 UTC](https://discourse.nodered.org/t/sending-simple-text-to-nextion-display/61713/2 "2022-04-24T11:39:50Z")

</div>

Isn't it that al commands that are send to the display have to be [terminated](https://nextion.tech/instruction-set/#s7) with 3x 0xff?

```auto
msg.payload = "t0.txt=" + msg.payload + "\xFF\xFF\xFF" ;
return msg;

```

Sorry, don't have Nextion display anymore to test.

---

<div class="post-metadata">

**Author:** ![robertebroomfield](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/robertebroomfield/32/60554_2.png) [@robertebroomfield](https://discourse.nodered.org/u/robertebroomfield)\
**Post date:** [24 April 2022 11:49 UTC](https://discourse.nodered.org/t/sending-simple-text-to-nextion-display/61713/3 "2022-04-24T11:49:51Z")

</div>

I thought the same but could not get it to work.  
Thanks for trying ☹  
Rob

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [24 April 2022 14:31 UTC](https://discourse.nodered.org/t/sending-simple-text-to-nextion-display/61713/4 "2022-04-24T14:31:30Z")

</div>

> [@edje11](#):
>
> 3x 0xff

Also don't forget that the serial out node may add a closing line-feed character as well, you might need to play with the settings.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [23 June 2022 14:31 UTC](https://discourse.nodered.org/t/sending-simple-text-to-nextion-display/61713/5 "2022-06-23T14:31:51Z")

</div>

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