My arduino gets some data from sensors and save it into EEPROM. Now, I want that when I connect my arduino to PC there should be a software(like sketch) which can fetch data from arduino's EEPROM processes it and saves it into a file in PC. I am willing to create such a software but how will I then communicate with arduino like Sketch does?
|
Just use serial communication. Make sure you know which port your Arduino is recognized in your system, make a sketch to send data through Arduino's serial communication and try making a simple Node.js application using serialport package which will receive your data. There is a code sample where you can start from. Just set the port and start receiving data. And that's good, using Node.js you are really close to web tools, so it's easy to migrate your application to web. It's really simple and you can get it done in a few minutes, even if you have not been introduced to node. These kind of embedded applications have been accepted by Node.js and there are plenty of robotics projects which use node on the web.
Usually Arduino is recognized as ttyACM0 on Unix-based systems. With this line of code you establish a serial communication with your board. Going further you can register events like data, which is fired when data comes from Arduino:
In this example your app just receives data and log it to your terminal. |
||||
|
The options that I see:
I have a vague recollection that EEPROM may be overwritten when you upload a sketch, so if you want to use serial (the first option), make sure your sketch already knows how to transfer the data before you collect it. This is not a limitation for ICSP. |
|||||
|
You should specify what programming language/compiler/IDE you want to use for the part on your pc. I would suggest using "Processing" - https://processing.org/ it's a similiar IDE as the arduino IDE and the coding is also a bit similiar. You can use a serial library to receive data from USB/COM port. Processing has the ability to create a window with graphics. You could read the position of something with your arduino, then send it to 'processing' and it will draw the object on the screen (after a bit of coding). Guide: https://learn.sparkfun.com/tutorials/connecting-arduino-to-processing |
|||
|