Read and store data with the usb Hi i am new to Arduino and I want to know if it is possible to read the data from a sensor that it is connected to the Arduino, I am using the Arduino mega 2560, which is already working, as I have a LED which change color depending on the detection of the object and then store it in a file as txt or another normal extension.
I don't have experience with Processing, but probably that is what you need. It communicates through USB and with the CreateWriter function, you can create a text file.

More about Processing can be found at Processing

Also another thread at Electronics stack exchange might help:

Related question

Alternatives (also mentioned in the above thread):


Use serial port directly with a terminal application on the PC
Use an SD card inside the Arduino to log