# Display data in window from Arduino serial port

**URL:** https://discourse.processing.org/t/display-data-in-window-from-arduino-serial-port/955
**Category:** Coding Questions
**Created:** [June 14, 2018, 10:46am UTC](https://discourse.processing.org/t/display-data-in-window-from-arduino-serial-port/955 "2018-06-14T10:46:10Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![noahbuddy](https://avatars.discourse-cdn.com/v4/letter/n/73ab20/32.png) [@noahbuddy](https://discourse.processing.org/u/noahbuddy)
#### Post date: [June 15, 2018, 7:18am UTC](https://discourse.processing.org/t/display-data-in-window-from-arduino-serial-port/955/2 "2018-06-15T07:18:00Z")

</div>

You could use a [StringList](https://processing.org/reference/StringList.html) as a buffer.

Add the text to the list instead of displaying it right away.  
If the buffer is larger than some number, remove the oldest entry (index zero).

Call text() in a loop to draw the whole list.

---

_[View the full topic](https://discourse.processing.org/t/display-data-in-window-from-arduino-serial-port/955)._
