Why doesn't the port.write() work when placed inside the setup() function? Processing doesn't get serial data back from Arduino

Hi @wasd808

Welcome to the community! :slight_smile:

I have not tested your code, but check https://learn.sparkfun.com/tutorials/connecting-arduino-to-processing/all
Maybe something like a handshake protocol will be useful for you. That way, you can send the data for processing and establish a contact between Arduino and Processing.

Also, like @kfrajer I am not understanding why are you loading a file. Maybe if you share it we can test and try to help you :slight_smile:

1 Like