1

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.

2
  • 1
    You need to edit this question to be more specific about what you are asking. A typical Arduino can report data back to a USB host such as a PC (typically actually through a serial port like channel, although the transport is USB), however at least the ATmega-based ones are unable to act as hosts themselves, which means that they cannot directly write data to a USB device such as a flash drive. Commented Jul 3, 2017 at 12:48
  • That's correct. I use Arduinos of many flavors to write data out their serial port, and have a Python program on the PC side waiting for data on /dev/ttyUSB0 (for example). That works fine. Please take the tour at arduino.stackexchange.com/Tour then come back and edit this question to be more specifically about the Arduino. You are welcome here. But this question is in danger of being closed as-is.
    – SDsolar
    Commented Jul 4, 2017 at 2:44

2 Answers 2

0

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
2
  • Thanks I would want to do that with the serial port directly with a terminal application as putty or the Arduino serial monitor. Commented Jul 3, 2017 at 10:48
  • Than just copy the content to a text file. Commented Jul 3, 2017 at 12:15
0

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.