Processing save data
Processing save data
(OP)
Hello all,
I am working on a portion of a project that involves using a micro controller as sort of a Data Acquisition tool. We have other DAQ boards directly hooked up to desktop PC's.
But basically, I want something I can just plug into my laptop (say on the field or somewhere where I don't have much equipment).
So, I am trying it out using input from a microcontrller to processing.
Problem is, I am not that familiar with Processing as I am with other languages.
Everything works fine except when I need to save my acquired signal to my computer. I can easily display it on my laptop, but saving is another story.
I can't find a decent command for processing to take values and simply save it to a text or mat ect. file.
Anyone have an idea?
I am working on a portion of a project that involves using a micro controller as sort of a Data Acquisition tool. We have other DAQ boards directly hooked up to desktop PC's.
But basically, I want something I can just plug into my laptop (say on the field or somewhere where I don't have much equipment).
So, I am trying it out using input from a microcontrller to processing.
Problem is, I am not that familiar with Processing as I am with other languages.
Everything works fine except when I need to save my acquired signal to my computer. I can easily display it on my laptop, but saving is another story.
I can't find a decent command for processing to take values and simply save it to a text or mat ect. file.
Anyone have an idea?
![[peace] peace](https://www.tipmaster.com/images/peace.gif)
Fe






RE: Processing save data
Not that there's anything terribly wrong with your grammar or spelling, but you haven't given us a single proper noun with which to estimate the scope of your ignorance, or the sort of help you really need.
Mike Halloran
Pembroke Pines, FL, USA
RE: Processing save data
It is unorganized and not very informative. I was a little tired when I wrote that a few hours ago. After a nap I'm back to my regular anal perky structured self....watch out I'm as anal as it gets
Seems After my nap I also managed to write a bit of code that does exactly what I want. This usually happens when I post to ET. This is why I tend to answer questions here more than ask them...
I just though that possibly someone with more experience in Processing lingo would have a better way.
I am not ignorant to Processing at all.... I usually use C,C++, or the like. But, I am inexperienced in interfacing serial communications for microcontrollers with C. I was pointed to Processing as apparently it's serial communication functions are flawless (I had a good source on this)
This code works fine on exporting the data I receive from the analogue in on the microcontroller:
void export_cv(){
OUTPUT = createWriter("expPoints.csv");
for(int i = 0; i < pointList.size(); ++i){
PVector V = (PVector) pointList.get(i);
OUTPUT.println(V);
}
OUTPUT.flush();
OUTPUT.close();
If anyone knows a better way to interface a microcontroller to a laptop for input of analogue signals (using any language as I am very open...) I would be willing to hear.
This would be so that I could take my laptop and microcontroller to another facility and simply connect the microcontorller to some important sensors and I could collect and analyze it right away on m laptop. (of course there are packages you can by from Mathworks, dSpace, Labview, ect. ...but I am focusing on this being totally free)
Thanks.
Fe
RE: Processing save data
I appreciate the ET community as there are intelligible members. I also know that 'crappy' posts are often responded to with that kind of response....but I also know that this has to do with the reputation of the OP.
Anyways, thanks for responding. Made me rethink my crappy OP.
Fe
RE: Processing save data
Sorry, it looks too much like C.
I hate C, and all its offspring.
Mike Halloran
Pembroke Pines, FL, USA
RE: Processing save data
No worries Mike.
Fe
RE: Processing save data
Fe
RE: Processing save data
I love C, gives me the horn. I quite like C++ too.
- Steve
RE: Processing save data
I don't quite understand. ETC? You mean ect.,?
Please elaborate.
I also enjoy C mostly.
Processing is too Java'ish :P, but not bad. I have only started using it now. I got it to convert my micro controller into kind of a low res DAQ board.
Fe
RE: Processing save data
http://onelook.com/?w=etc&ls=a
TTFN
FAQ731-376: Eng-Tips.com Forum Policies
Chinese prisoner wins Nobel Peace Prize
RE: Processing save data
I have a few very odd spelling mistakes as well. I have been told this before before by teachers. There are some other odd things about me that, if you ever met me, you would for sure notice
etc. it is. (Even funnier is in the post above IRsutffs I also made the mistake...haha) I was too into finishing my code at that moment to even think about the abbreviation. Got it though.
No worries about the original question. My low res, extremely portable 'DAQ board' is functional.
On another note, do you guys use this "Processing" much? It seems not bad, particularly for an open source lingo. But, much of it is graphics based...
Fe
RE: Processing save data
Sorry for the after-beer shout-up. Was quite a heavy weekend. I never really know when it's ok to correct language and when it's rude. Hopefully it was correct this time.
Regards.
- Steve
RE: Processing save data
TTFN
FAQ731-376: Eng-Tips.com Forum Policies
Chinese prisoner wins Nobel Peace Prize
RE: Processing save data
Not to worry. I had no idea you noticed I always do that. Thanks for noticing and letting me know. I take no offence
IRstuff,
I am not a huge fan of excel for data processing. I was planning on writing something in Matlab to take in the .csv. I would say I'm proficient with Matlab and C. Not so much with excel. But, you recommend that I can get rid of Processing to take in the serial communication from the micoricontller? I never knew excel had these capabilities? Is this correct?
Thanks.
Fe
RE: Processing save data
Matlab also supports reading data from the Windows audio device, so if you use the audio inputs on the computer to digitize a signal, one could probably get that digital data streamed directly into Matlab.
One other option for data acquisition might be h
TTFN
FAQ731-376: Eng-Tips.com Forum Policies
Chinese prisoner wins Nobel Peace Prize
RE: Processing save data
My setup right now uses an Uno I got for 30bucks. There are 2 disadvantages to the setup.
1) the sampling rate is about 0.01samples/s ( think I may be able to get is a bit higher, but the bottleneck here is the processor on the microcontroller). However, for what I need it for the sampling rate is alright.
2) All the serial communication and acquisition is custom programmed. (more time consuming, rather than just plug and play). Although, I got it running with a couple hours of work. The GUI is not very good though. There is no scale on the scope etc. (notice I didn't use ect.
Only advantage is the price I can set it up for
I was aware of Matlab's compatibility with the sound card. And I know of the DAQ toolbox for Matlab. I don't think my superiors will be into purchasing it just for my "away parties", since we have Labview and dSapce in house.
But yea, I may pick up one of those boxes. Sampling rate is good. Seems like it comes with built-in software as well. Thanks!
Fe
RE: Processing save data
TTFN
FAQ731-376: Eng-Tips.com Forum Policies
Chinese prisoner wins Nobel Peace Prize
RE: Processing save data
Fe