INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

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?

cheers

peace
Fe

RE: Processing save data

You ain't doing so good with English, either.

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

(OP)
I agree with you about my structure of the OP.
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 smile
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.



 

peace
Fe

RE: Processing save data

(OP)
BTW, Mike I appreciate your "smart alec" post. Those inexperienced can easily interpret that post to be very negative....
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. smile

peace
Fe

RE: Processing save data

Well, the first thing that confused me, is that some ID10T has gone and named a programming language with the word "Processing".

Sorry, it looks too much like C.
I hate C, and all its offspring.

 

Mike Halloran
Pembroke Pines, FL, USA

RE: Processing save data

(OP)
LOL. I see the confusion. There are many languages these days...too many.
No worries Mike.

peace
Fe

RE: Processing save data

(OP)
You know. That confusion I could have clarified if my OP was better. My fault.
cheers

peace
Fe

RE: Processing save data

Repeat after me: Et cetera, ETC for short. I'm not normally an anal person, but this has been bugging me for a long time, you always get it wrong. In my world, ECT is Emissions Control Technology (catalysts).

I love C, gives me the horn. I quite like C++ too.

- Steve
 

RE: Processing save data

(OP)
Steve,
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.  

peace
Fe

RE: Processing save data

(OP)
lol. I never even realized I wrote that in the OP. Thanks for pointing it out Steve and IRstuff.
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 smile
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...

cheers

peace
Fe

RE: Processing save data

Fe,

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

(OP)
Steve,
Not to worry. I had no idea you noticed I always do that. Thanks for noticing and letting me know. I take no offence smile

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.  

peace
Fe

RE: Processing save data

Oh, OK, Matlab is certainly a viable approach.  There are a couple of hooks in Matlab for interfacing with external entities like serial ports or COM clients.  

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 http://www.ebay.com/itm/280456846465?ssPageName=STRK:MEWAX:IT&_trksid=p3984.m1438.l2649 It's a USB connected oscilloscope, essentially...  Looks tempting...

TTFN

FAQ731-376: Eng-Tips.com Forum Policies
Chinese prisoner wins Nobel Peace Prize

RE: Processing save data

(OP)
Cool. Thanks IRstuff. That usb connected DAQ box is not bad for 167 bucks. I might pick up one of those.
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. pipe)

Only advantage is the price I can set it up for smile
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!
 

peace
Fe

RE: Processing save data

(OP)
For sure thumbsup2

peace
Fe

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources


Close Box

Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close