How does one get an array of temperature data (from adafruit infrared sensor) and put it in a csv or xls file? We've tried using Gobetwino and PLX-DAQ but couldn't get neighter to work. Thanks!
The usual two options are GoBetwino and PLX-DAQ.
Both require that you have some code. But you've shown us no code.
jzhu069:
We've tried using Gobetwino snip
Gobetwino will work, but it is a bit clunky. Read the pdf manual .
You have to create a command in Gobetwino which your arduino will send.
Commands - New Command - Command Type - pick "LGFIL"
Give the command a name e.g. "LOGCSV"
Pick an existing file (you will have to create an empty file first)
Save
Then your Arduino code can send a string over serial like: Serial.println("#S|LOGCSV|[1,2,3,4]#");
You'll have to exit Gobetwino, upload your sketch, then start Gobetwino.
You will probably have to select the serial port in Settings - Serial port then click Update and exit Gobetwino
Run Gobetwino again and it should show data coming from your Arduino.
Yours,
TonyWilk
Maybe you are trying to use the original PLX with a modern version of Excel. If so, have a look at PLX-DAQ version 2 - now with 64 bit support! (and further new features) - Interfacing w/ Software on the Computer - Arduino Forum nearby.
Not sure if this helps, but I have a micro-controller running the Arduino IDE that outputs, to the serial monitor, a bunch of temperatures, currents and voltages every 5 seconds. At the end of each run, which takes about 19 hours, the program stops and the data in the serial monitor stops being updated. I scroll to the top of the serial monitor window, double click on the first data, then scroll down to the bottom and with the shift key pressed I click on the last bit of data and then I do "CTRL+C" to copy all the data to the clip-board. Next I go to the desktop, right click and select "New -> Text Document", next I give the file a name then open it, I then do "CTRL+V" to paste the contents of the clipboard into the text file. Once that's done I can drop that text file onto Excel and all the data is ready and in the right columns and rows. A typical run is 19 hours and with updates every 5 seconds that translates into 13693 rows with each row comprised of 14 columns. I am not using any additional software or tools -- just the serial monitor from the Arduino IDE. Not that it matters, but the controller is a Teensy 3.6 -- that, however, is irrelevant.
Oh, one last point ...
While the program is running and the data is being spit out every 5 seconds you have to click on the "Autoscroll" button at the bottom left to deselect it so the display stop scrolling -- the data continues to be written to the serial monitor but the display won't immediately jump to the bottom when it updates. If you don't do that you have to do the selection between updates, but with autoscroll deselected you can take your time. Just remember to put it back on when you're done.
Brian
Raptor1956:
Not sure if this helps,
I'm sure it doesn't.
Even recording direct to a .CSV file using a proper terminal programme like RealTerm has to be a better option than that silly circus. Indeed, "not using any additional software or tools" in order to get data into Excel, which IS additional software, is not the sort of thing you want to write home to your mother about. RealTerm is free, as are all the other terminals, so that isn't an excuse.
But, since you already have Excel, writing direct to it via PLX, also free, might sound like a good way to go. I'm not sure what OPs problem is with PLX, but it can't be hard to fix, and persevering with it surely beats the hell out banging your head against the serial monitor.
Oh, an easy trap to forget about... Don't have Serial Monitor open when trying to use any other program to capture the output of the Arduino. At least on windows only one program can have the COM port open at a time (without resorting to hacks).
We used code from this instructable for PLX-DAQ except replacing the "..." with arbitrary number '3': http://www.instructables.com/id/Sending-data-from-Arduino-to-Excel-and-plotting-it/
void setup() {
Serial.begin(9600); // the bigger number the better
Serial.println("CLEARDATA"); //clears up any data left from previous projects
Serial.println("LABEL,Acolumn,Bcolumn,..."); //always write LABEL, so excel knows the next things will be the names of the columns (instead of Acolumn you could write Time for instance)
Serial.println("RESETTIMER"); //resets timer to 0
}
void loop() {
Serial.print("DATA,TIME,TIMER,"); //writes the time in the first column A and the time since the measurements started in column B
Serial.print(Adata);
Serial.print(Bdata);
Serial.println(...); //be sure to add println to the last command so it knows to go into the next row on the second run
delay(100); //add a delay
}
Our issue with PLX-DAQ was that it kept giving an error message saying it couldn't "connect", even though we checked the arduino COMPORT and beaudrate and matched it to the PLX-DAQ window. Also we made sure the arduino serial monitor was closed (also no issues with compiling the code).
Thanks for all the feedback so far!
Nick_Pyner:
I'm sure it doesn't.Even recording direct to a .CSV file using a proper terminal programme like RealTerm has to be a better option than that silly circus. Indeed, "not using any additional software or tools" in order to get data into Excel, which IS additional software, is not the sort of thing you want to write home to your mother about. RealTerm is free, as are all the other terminals, so that isn't an excuse.
But, since you already have Excel, writing direct to it via PLX, also free, might sound like a good way to go. I'm not sure what OPs problem is with PLX, but it can't be hard to fix, and persevering with it surely beats the hell out banging your head against the serial monitor.
Oh please, I offered a way to get the data without any other tools -- if the OP was wanting to massage in Excel then the OP already had Excel.
BTW, the silly drill takes seconds and in my case it's a once every 19 hour thing so no big deal. Additionally, I tend to frown on installing additional software when it isn't absolutely necessary though I am aware there are others that install at the drop of a hat. It should be obvious to anyone with a pulse these days that anything you install increases the risk of bad stuff happening.
Take you sanctimonious attitude elsewhere!
Brian
jzhu069:
We used code from this instructable for PLX-DAQ except replacing the "..." with arbitrary number '3': http://www.instructables.com/id/Sending-data-from-Arduino-to-Excel-and-plotting-it/
I think it is time to read reply #3, again. I believe your problem is not with PLX per se, but with Excel. You have not said what version of Excel you are using but, if it is less than 15 years old, it will not work with the macro from the link in the "Instructable". The original PLX-DAQ works fine with older Excel, but there aren't many of us Office 2000 users left these days. IF you are using that macro with Excel 2003 or earlier, now is the time to say so, and you might find this useful
http://homepages.ihug.com.au/~npyner/Arduino/GUIDE_2PLX.pdf
Your code appears incomplete, and does not look kosher, but that may be because there is stuff or procedures therein that I'm not familiar with. You can probably test this by simply sending it to the serial monitor to see how it looks. I don't think any code issues are causing your problem.