# Sampling Incoming data from serial port

**URL:** <https://discourse.processing.org/t/sampling-incoming-data-from-serial-port/26600>\
**Category:** Electronics (Arduino, etc.)\
**Created:** [December 29, 2020, 10:20pm UTC](https://discourse.processing.org/t/sampling-incoming-data-from-serial-port/26600 "2020-12-29T22:20:16Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![glv](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/glv/32/18785_2.png) [@glv](https://discourse.processing.org/u/glv)\
**Post date:** [December 29, 2020, 11:59pm UTC](https://discourse.processing.org/t/sampling-incoming-data-from-serial-port/26600/2 "2020-12-29T23:59:15Z")

</div>

Hello,

I posted a response here:

> [@Storing all incoming data and button not working](https://discourse.processing.org/t/storing-all-incoming-data-and-button-not-working/26398/4):
>
> Hello, Here is the simplest example of collecting data into an ArrayList of Integers. 
> 
> > **Example Code**
> >
> > //This program takes ASCII-encoded strings //from the serial port at 9600 baud and graphs them. It expects values in the //range 0 to 1023, followed by a newline, or newline and carriage return IntList data; import processing.serial.\*; Serial myPort; // The serial port - object from serial class //String[] list = new String[3]; // For serial port int inData…

`:)`

---

_[View the full topic](https://discourse.processing.org/t/sampling-incoming-data-from-serial-port/26600)._
