# Display text from file with linebreaks

**URL:** <https://rpi-rgb-led-matrix.discourse.group/t/display-text-from-file-with-linebreaks/1014>\
**Category:** Uncategorized\
**Created:** [February 15, 2025, 5:13pm UTC](https://rpi-rgb-led-matrix.discourse.group/t/display-text-from-file-with-linebreaks/1014 "2025-02-15T17:13:13Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gavor](https://avatars.discourse-cdn.com/v4/letter/g/59ef9b/32.png) [@Gavor](https://rpi-rgb-led-matrix.discourse.group/u/Gavor)\
**Post date:** [February 15, 2025, 5:13pm UTC](https://rpi-rgb-led-matrix.discourse.group/t/display-text-from-file-with-linebreaks/1014/1 "2025-02-15T17:13:14Z")

</div>

Hello,  
I would like to realize the following.  
A text consisting of 4 lines is written to a file every minute.

54.1 °C - Pufferspeicher oben  
52.6 °C - Pufferspeicher unten  
25.8 °C - Kollektor Rücklauf  
1.9 °C - Kollektor

I would like to output this text on a display (64x64).  
The line breaks should be taken from the text file.  
Alternatively, I could also create 4 text files per line and each text file should be shown on a separate line on the display.  
Is there a solution for this?  
Unfortunately, I am not familiar with C or Python programming.  
Greetings,  
Gavor

---

<div class="post-metadata">

**Author:** ![board707](https://avatars.discourse-cdn.com/v4/letter/b/bc79bd/32.png) [@board707](https://rpi-rgb-led-matrix.discourse.group/u/board707)\
**Post date:** [February 16, 2025, 5:51pm UTC](https://rpi-rgb-led-matrix.discourse.group/t/display-text-from-file-with-linebreaks/1014/2 "2025-02-16T17:51:10Z")

</div>

> [@Gavor](#):
>
> I am not familiar with C or Python programming.

What solution do you expect in this case?  
That someone will write you ready-made code?  
How else can you be helped if you don’t know how to program?

---

<div class="post-metadata">

**Author:** ![Gavor](https://avatars.discourse-cdn.com/v4/letter/g/59ef9b/32.png) [@Gavor](https://rpi-rgb-led-matrix.discourse.group/u/Gavor)\
**Post date:** [February 17, 2025, 6:40am UTC](https://rpi-rgb-led-matrix.discourse.group/t/display-text-from-file-with-linebreaks/1014/3 "2025-02-17T06:40:11Z")

</div>

Hello,  
What do I expect? Something along the lines of “…yes, this is possible in principle…” or “…no, this is not possible…”, at best someone has already realized something like this and can help me get closer to my desired result.  
And no, no, I certainly can’t wait for code programmed especially for me.  
Greetings, Gavor

---

<div class="post-metadata">

**Author:** ![board707](https://avatars.discourse-cdn.com/v4/letter/b/bc79bd/32.png) [@board707](https://rpi-rgb-led-matrix.discourse.group/u/board707)\
**Post date:** [February 17, 2025, 8:32am UTC](https://rpi-rgb-led-matrix.discourse.group/t/display-text-from-file-with-linebreaks/1014/4 "2025-02-17T08:32:55Z")

</div>

Yes, it definitely possible.  
The line breaks are a symbols like any other, they can be saved in a file, and when reading, the program can split the text into lines by these symbols. It is a process that called a “parsing”.

---

<div class="post-metadata">

**Author:** ![Gavor](https://avatars.discourse-cdn.com/v4/letter/g/59ef9b/32.png) [@Gavor](https://rpi-rgb-led-matrix.discourse.group/u/Gavor)\
**Post date:** [February 17, 2025, 10:07am UTC](https://rpi-rgb-led-matrix.discourse.group/t/display-text-from-file-with-linebreaks/1014/5 "2025-02-17T10:07:03Z")

</div>

Thank you, which example would you start with here?  
I probably find it easier to try to customize an example so that it does what I want it to do.

---

<div class="post-metadata">

**Author:** ![jonms](https://yyz2.discourse-cdn.com/free1/user_avatar/rpi-rgb-led-matrix.discourse.group/jonms/32/504_2.png) [@jonms](https://rpi-rgb-led-matrix.discourse.group/u/jonms)\
**Post date:** [February 18, 2025, 6:34pm UTC](https://rpi-rgb-led-matrix.discourse.group/t/display-text-from-file-with-linebreaks/1014/6 "2025-02-18T18:34:34Z")

</div>

You could ask something like Claude.ai to write the code for you.

Just describe the platform, hardware and requirement and see how you go!

---

<div class="post-metadata">

**Author:** ![lonesometraveler](https://avatars.discourse-cdn.com/v4/letter/l/3ec8ea/32.png) [@lonesometraveler](https://rpi-rgb-led-matrix.discourse.group/u/lonesometraveler)\
**Post date:** [February 18, 2025, 8:37pm UTC](https://rpi-rgb-led-matrix.discourse.group/t/display-text-from-file-with-linebreaks/1014/7 "2025-02-18T20:37:28Z")

</div>

I don’t think “54.1 °C - Pufferspeicher oben” will fit on a 64-pixel-wide display. Are you trying to scroll the text?

If you’re not familiar with C or Python, maybe you’d like to try Rust? I find [this Rust library](https://github.com/EmbersArc/rpi_led_panel) very easy to use.

---

<div class="post-metadata">

**Author:** ![marcmerlin](https://yyz2.discourse-cdn.com/free1/user_avatar/rpi-rgb-led-matrix.discourse.group/marcmerlin/32/40_2.png) [@marcmerlin](https://rpi-rgb-led-matrix.discourse.group/u/marcmerlin)\
**Post date:** [February 26, 2025, 8:34am UTC](https://rpi-rgb-led-matrix.discourse.group/t/display-text-from-file-with-linebreaks/1014/8 "2025-02-26T08:34:53Z")

</div>

you might get someone with spare time to help, but generally this group is to help with issues with the library, not to get code written for you fi you don’t know programming. I suggest you learn that first.
