问题
I am building a prototype drip monitor for a brain shunt. It will monitor the drips and report whatever data I need. The problem is I'm just building the device. A person who knows nothing about Arduinos or code is using it. Is there a way or program to display and/or save data to a file such that a person could just plug the Arduino in and not bother the the IDE or any code? Thanks for the help!
回答1:
As noted in the comments, there are many ways to do this depending on budget and other criteria. For example, you don't say for certain if this only needs to be (simple) real time monitoring or (a bit more complicated) if data needs to be logged to a file for later review. Standalone logging is another (fairly complicated) option (e.g. the Arduino not connected to a host computer).
This is a good tutorial and overview of the different approaches.
In terms of user-friendly GUI, one could put together a simple app in a few hours using Processing which would display real time data and if need be, write to a text file.
There are many Arduino data logging projects on the web. Here's one and search results for many, many others
回答2:
A Bash One Liner for getting serial data
(linux, mac os x, or cygwin)
the following line grabs the data, timestamps, and places into csv format
cat /dev/cu.usbmodem1421 | awk '{ for (i=0; i<NF; i++) printf $i + system("date +,%s")}'
Sample Output
data,timestamp
9695,1390087651
9696,1390087652
More Examples
stream the data into a file
cat /dev/cu.usbmodem1421 | awk '{ for (i=0; i<NF; i++) printf $i + system("date +,%s")}' >> sensor_readings.dat
you can monitor while streaming to a file (can also send emails, tweets, etc, any command line util)
cat /dev/cu.usbmodem1421 | awk '{ for (i=0; i<NF; i++) if($i == 9001) {system("say ITS OVER 9000\!")} printf $i + system("date +,%s")}' >> sensor_readings.dat
USAGE NOTES: Make sure to replace cu.usbmodem1421 with your modem (the "cu" is apparently important, it doesn't work for some reason with "tty.usbmodem")
For an example how to use this with arduino code, check out this github repository:
https://github.com/gskielian/Arduino-DataLogging/tree/master/Bash-One-Liner
回答3:
You could use processing, it would be great for you since Arduino iDE is based off of it so you will easily migrate. You could make a processing application that receives the data from the Arduino through serial. A great thing is also is that you can make a standalone application that runs in Java so it is not operating system dependent and requires no install. www.processing.org
来源:https://stackoverflow.com/questions/15181839/arduino-how-to-get-serial-data-without-ide