# I am attempting a serial communication with my Arduino

**URL:** <https://discourse.processing.org/t/i-am-attempting-a-serial-communication-with-my-arduino/47521>\
**Category:** Electronics (Arduino, etc.)\
**Created:** [November 9, 2025, 7:49pm UTC](https://discourse.processing.org/t/i-am-attempting-a-serial-communication-with-my-arduino/47521 "2025-11-09T19:49:53Z")\
**Posts on this page:** 1\
**Showing post:** 3

<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:** [November 9, 2025, 11:20pm UTC](https://discourse.processing.org/t/i-am-attempting-a-serial-communication-with-my-arduino/47521/3 "2025-11-09T23:20:48Z")

</div>

Hello @electron59,

Welcome to the forum!

This is a good place to start:  
_[Welcome to the Processing Foundation Discourse](https://discourse.processing.org/t/welcome-to-the-processing-foundation-discourse/8)_

The _Guidelines - Asking Questions_ is an excellent guide!

There are resources (tutorials, references, examples and more) here:  
_[https://processing.org/](https://processing.org/)_

Take advantage of the search in the forum and on the main page.

Try to build your code in steps!

Save each working version and then save it as a new version to continue.  
MySketch\_1\_0\_0  
My Sketch\_1\_0\_1  
And so on…

Code is not forgiving!  
Pay attention to details and learn from it.  
Perseverance and taking advantage of the resources and tools available to you will pay off in the long run.

A snippet of code to get you started:

```auto

// Uncomment the String declarations and see what happens!
// Try all the combinations! Each one and both.

// Declare globally:
//String string = "global"; // Declares string

void setup()
  {
  // Declare locally:
  //String string = "setup";
  
  // Trying to print string but it was note declared!
  println(string); 
  }  

```

This is the error I get initially:

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/3X/8/d/8d95524465c08441b4b36a30b35911fc57463064.png)

This is the error when I click on the underlined:

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/3X/2/7/27bb915f8d17468504b709868efa01b173c9d6a7.png)

It does not exist because I did not declare it globally or locally!

And have fun!

`:)`

---

_[View the full topic](https://discourse.processing.org/t/i-am-attempting-a-serial-communication-with-my-arduino/47521)._
