C and C++

Moderators: None (Apply to moderate this forum)
Number of threads: 28695
Number of posts: 94715

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Timed Input Posted by mani_prabhat on 10 Jan 2009 at 3:27 AM
Can I design a program in C++ which can take input at pre defined intervals from a device like rotating cam & manipulate it according to my wish ......... Assume that regular data input is available in a file ..... Or you may suggest another way ....

Please help I'm novice .......
Report
Re: Timed Input Posted by aramonkg101 on 10 Jan 2009 at 5:08 AM
Well, C++ does not provide the facilities you ask "out of the box". You could code it yourself if you had good knowledge of C++, perhaps some knowledge of assembly, some knowledge of operating system design and in-depth knowledge of the hardware of that device. Since you say you are a novice you probably do not have that.

So what you could do is use a library of classes/methods(C++) or functions(C) that will allow you to "communicate" with the device through a C++ program. Of course that is only possible if such a library exists and is available.

Alternatively you could use your own operating system's functionatily exposed to you through a set of functions found in your OS developer documentation. These set of functions, also called API, will provide you some control of the device but depending on the device what you can do may be limited.
Report
Re: Timed Input Posted by mani_prabhat on 17 Jan 2009 at 9:20 AM
Thanks buddy,
Firstly I'm thankful for guidance .... Can u plzzzz tell me more about programming API's ..... I've to develop something to read the input from a flapping foil before May or I'll be screwed !!!!! My project is on Biomimetics..... & I'm not that novice with C++ , I can program proficiently ......
Report
Re: Timed Input Posted by aramonkg101 on 18 Jan 2009 at 4:55 AM
What device are we talking about? Do you have any documentation on the hardware(registers, memory, controller) or are you going to build it yourself? Connection? USB, serial, wireless? What Operating System are you going to work with? These are just a few questions to start with.
Report
Re: Timed Input Posted by vibin_mdcp on 18 Jan 2009 at 6:05 AM
From the post I understood that you know nothing about C and C++.
So don't waste your precious time.
To do your project in time consult with a hardware engineer.

Wishing you all the best.
Report
Re: Timed Input Posted by mani_prabhat on 18 Jan 2009 at 11:46 AM
No yaar
I do know C++ ..... I learnt it just for the sake of the project all these winters as experts at IISc told me that C++ is powerful enough ...... Ok I agree that I'm still not fluent but given a direction I can somehow manage .......


Report
Re: Timed Input Posted by rudog on 20 Jan 2009 at 6:46 AM
Now you've peeked and poked my interest! There is a lack of description. I was always told C could do anything, C++ could do more.

Is this a hypothetical scenario or a "real/real time" application?

Does the output come from a sensor or simulated from a file?

Is this an embedded application or other?
Report
Re: Timed Input Posted by mani_prabhat on 21 Jan 2009 at 9:34 AM
Well thanks for ur interest, my friend ........ I'm sorry to say that the idea is still hypothetical as I'm unable to get a clear idea about how to program devices..... I've command over the technical aspect of the project which is titled "Propulsion by Biologically Inspired Flapping Foils" but I was wondering if I could replace the bulky (in the sense of complexity) strain gauges & associated wiring with a small sensor or something which can directly manipulate forces and give results according to the program ...... I know strain gauges its amplifier will be their but can it be followed by a sensor or something ...... Actually I'm back to my college & can't devote much time to the idea .......
Report
Re: Timed Input Posted by mani_prabhat on 21 Jan 2009 at 9:34 AM
Well thanks for ur interest, my friend ........ I'm sorry to say that the idea is still hypothetical as I'm unable to get a clear idea about how to program devices..... I've command over the technical aspect of the project which is titled "Propulsion by Biologically Inspired Flapping Foils" but I was wondering if I could replace the bulky (in the sense of complexity) strain gauges & associated wiring with a small sensor or something which can directly manipulate forces and give results according to the program ...... I know strain gauges its amplifier will be their but can it be followed by a sensor or something ...... Actually I'm back to my college & can't devote much time to the idea .......
Report
Re: Timed Input Posted by mani_prabhat on 21 Jan 2009 at 9:34 AM
Well thanks for ur interest, my friend ........ I'm sorry to say that the idea is still hypothetical as I'm unable to get a clear idea about how to program devices..... I've command over the technical aspect of the project which is titled "Propulsion by Biologically Inspired Flapping Foils" but I was wondering if I could replace the bulky (in the sense of complexity) strain gauges & associated wiring with a small sensor or something which can directly manipulate forces and give results according to the program ...... I know strain gauges its amplifier will be their but can it be followed by a sensor or something ...... Actually I'm back to my college & can't devote much time to the idea .......
Report
Re: Timed Input Posted by rudog on 21 Jan 2009 at 11:39 PM
It's too bad that this idea has taken a back burner. It really sounds interesting. IMO strain guages are not bulky, but they can be slow depending on the cycles per second you expect to see. It also seams to me that you would prolly need an embedded processor for this (eg - DSP).

To answer your original question, C/C++ can be used to program this, but in my experience with embedded controlers, C is a waste of time. It's relatively slow and always large. Assembler would be the way to go.



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.