I have an analog sensor which I want to send data from my Arduino Certified Intel Edison to PC, without using a Serial Monitor and preferably putting the data into a text file.
|
I believe you are looking for something like the Telemetry library. Full disclaismer : I am the author It allows you to send string, numbers, arrays, sparse arrays through the serial port for instance. Each sent data has a label, called topic, that is used to identify it. The Pytelemety command line interface then allows you to connect to the serial port, plot received data in real time, write parameters to reconfigure the arduino from the computer, etc. Example of arduino code thats send an incrementing counter
Overview of the CLI (Command-Line Interface)
Overview of a graph (not produced by the arduino program above)
Output to file is not implemented yet, although all received data is logged to a file (but this log also contains system information). However, this is an interesting feature, quite straightforward to implement, that I might add in coming days if you are interested. Central documentation is available here. |
|||||||||||||||||
|
There are a couple of ways you can communicate between a "Arduino' and a "PC"*. 1)Serial communication. A serial port on your system is created and a program that reads and writes to the serial port is used as communication.
2)Bluetooth (LE) 3) Network Of these methods the serial communication over USB is the best know because -in Arduino world- this method is most commonly used to upload the "sketch" to the "Arduino". As such all hardware is commonly available. *I put quotes around Arduino and PC because in perspective of this answer both arduino and PC are to be interpreted as a device containing a cpu. |
|||||||||||||||||||||
|
I know, I'm late, but I recommend, using python, as I most always do. The import serial S = serial.Serial('/dev/tty/USB0', 115200, timeout=1) S.write("Hello") print S.readline() Should echo Very handy in combination with |
|||
|