Processing to Arduino

Hi,

I have an Arduino to Processing connection. I wanted to know if Processing could take in value that in that Arduino code are only read and not printed? So if the Arduino code contained just analogRead() for example with no print statement, could the Processing read that with a function?

Many thanks

Hi,

If you want to communicate between your arduino and your computer, you need on one side to send data and receive it on the other side.

If you don’t send any information, you won’t be able to communicate (pretty intuitive right? :wink: ) since the computer is distinct from the electronic chip.

But apart from Serial communication (which I assume you are using), you can use a wireless communication or other kind of data transmission.

Hope I understood your question! Have fun :grinning:

Hi,

Thank you for your reply! So is printing from Arduino the ONLY way to send information over the serial port?

I think so. From the documentation, there’s the Serial.write() function to send bytes over the serial port :

https://www.arduino.cc/reference/en/language/functions/communication/serial/write/

Serial.write (or Serial.print) are the ONLY ways to use the built-in com port on e.g. an Arduino Uno or Nano. Depending on what hardware you have there are other ways to connect Processing and Arduino. 1. Use the software serial library on the Ard and a ttl-to-usb adaptor to another com port on the PC. 2. Software serial and bluetooth adaptor. 3. If you have Mega or Due they have extra serial ports, use ttl-to-usb or bluetooth again. 3. WiFi adaptor on the Arduino. 4. If Processing is on Raspberry Pi you can connect to Ard with I2C.

If any of those seem interesting, please say what hardware you have and ask, or go searching.

1 Like