# Processing to Arduino serial

**URL:** <https://discourse.processing.org/t/processing-to-arduino-serial/34382>\
**Category:** Electronics (Arduino, etc.)\
**Created:** [December 30, 2021, 6:39pm UTC](https://discourse.processing.org/t/processing-to-arduino-serial/34382 "2021-12-30T18:39:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![danjy](https://avatars.discourse-cdn.com/v4/letter/d/58f4c7/32.png) [@danjy](https://discourse.processing.org/u/danjy)\
**Post date:** [December 30, 2021, 6:39pm UTC](https://discourse.processing.org/t/processing-to-arduino-serial/34382/1 "2021-12-30T18:39:08Z")

</div>

I am trying to send arduino serial commands.  
I have set up port4 after following some documentation in the sample files.  
the below code is not working as expected, textfield11 has a float value inside and the arduino command i need through serial would be “y200.3” as an example.  
any help greatly appreciated

\<  
public void button1\_click1(GButton source, GEvent event) { //_CODE_:button1:461790:  
transf = (textfield11.getText());  
transf = “y” + transf;  
println(transf);  
myPort.write(transf);  
} //_CODE_:button1:461790:  
/\>

---

<div class="post-metadata">

**Author:** ![MiguelSanches](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/miguelsanches/32/11172_2.png) [@MiguelSanches](https://discourse.processing.org/u/MiguelSanches)\
**Post date:** [January 4, 2022, 8:38am UTC](https://discourse.processing.org/t/processing-to-arduino-serial/34382/2 "2022-01-04T08:38:22Z")

</div>

Hi @danjy,

Have you tried this tutorial to successfully send data between the Processing IDE and the Arduino IDE and vice-versa?

[https://learn.sparkfun.com/tutorials/connecting-arduino-to-processing/all](https://learn.sparkfun.com/tutorials/connecting-arduino-to-processing/all)

Best regards

---

<div class="post-metadata">

**Author:** ![RichardDL](https://avatars.discourse-cdn.com/v4/letter/r/f475e1/32.png) [@RichardDL](https://discourse.processing.org/u/RichardDL)\
**Post date:** [January 6, 2022, 10:21pm UTC](https://discourse.processing.org/t/processing-to-arduino-serial/34382/3 "2022-01-06T22:21:26Z")

</div>

Hi @danjy, are you making progress? I made an [example](https://discourse.processing.org/t/processing-and-arduino-serial-example/31650) that will almost certainly work first time. Then you could replace the test data with yours.
