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:
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
From what I understand from your question, you want to store the data displayed in the Serial monitor to a text file or something similar. As the Arduino itself cannot do this task, I used "GoBetwino" to save my data from an Arduino into a text file, from where you can export the data into Excel if you want charts and graphs. The process is fairly easy and described properly in their user manual. https://playground.arduino.cc/Interfacing/GoBetwino