I was wondering if you take an input from the camera using c program.
I use Turbo C, windows xp. I just know the basics of c program, it would be helpful you could describe how one could do this. Thanks in advance. If any clarifications please let me know. Thanks again.
You can use Window's AVICAP:
link to the DLL AVICAP32.DLL
call capCreateCaptureWindow
send messages to it using SendMessage()
Take a look here:
http://www.codeguru.com/cpp/g-m/multimedia/video/article.php/c1601
Related
I just want to play a simple tone when a variable is set to true, I can't find any examples of this using c.
Any help would be greatly appreciated.
I know its broad but thats because any way of doing it using c should be fine.
Board Manual: https://ftp.intel.com/Public/Pub/fpgaup/pub/Intel_Material/18.1/Computer_Systems/DE10-Standard/DE10-Standard_Computer_NiosII.pdf
Nobody know a good way to take the terminfo key string in a C program? Like the infocmp of ncurses. I can't find anything :(
If someone know and want to tell me, I will be very thankful.
"Capturing" the value depends on what you are trying to do with it. The usual application uses the tigetstr function to read the value for a given terminal capability from the terminal database.
To do this, you must first initialize the terminfo interface using the ncurses library, for example using setupterm, setterm or newterm. The choice of function depends on what the program will be doing with the string.
In ncurses-examples, there are a few low-level terminal programs such as demo_terminfo.
I'm doing a project where I need to create some kind of GUI for the user as well as control some servo motors.
I'm thinking of using ActionScript for the GUI and C for to control the hardware. Is this even possible? How do I make ActionScipt talk to C and vice-versa?
Obviously the C part will be driving the motors and will send the data to the ActionScript GUI
to be displayed to the user.
Is the above possible? If yes, could someone kindly provide me some pointers?
Thank you very much!
Edit: How do I pass a variable (e.g. x = 5) from ActionScript to be printed in C? Or is this not possible?
"You could go via ASP to a DLL as TG suggested or you could probably call an ANSI C (command line) app and pass in variables (at least on a Windows PC)... that owuld be done using FSCommands. see this tutorial
http://www.actionscripts.org/tutoria...es/index.shtml"
Originally replied by
Jesse Stratford
ActionScript.org Cofounder
This is taken from here
I don`t know the specifics of programming servo motors but basically, if you want some C to AS3 interaction you could do one of the following:
Compile your C/C++ code using flascc.
Wrap your C code in a native extension (if you are targeting AIR).
As sberry suggested - use Sockets.
I have a c code and I want to extract some patterns of code which contains instructions of communication etc and build a sequence chart from that.
Is there any way I can do that?
Thanks
I strongly recommend to use doxygen with the following options:
EXTRACT_ALL = YES
CALL_GRAPH = YES
CALLER_GRAPH = YES
GRAPHICAL_HIERARCHY = YES
You will get a very nice call and caller graphs of functions which can help a great deal with understanding the code. A call graph is more common and useful for C code than a sequence chart.
call graph http://pedro.larroy.com/files/example.png
You can use pic2plot which is part of GNU plotutils. You need log/trace what talks to what, to a file and then you can render it with pic2plot. I've done this for a python program, but there is no reason why you can't do that with a C program.
(source: umlgraph.org)
see http://www.umlgraph.org/
I have developed a graphic program on a desktop system. But when I tried to run it on the hp compaq laptop it's not getting executed. I developed it using Turbo C. Then i tried writing a simple graphic program in Turbo C on the laptop, but the problem I am getting is in 'initgraph' statement it is unable to detect the driver.
Can you please tell me what might be the problem?
Turbo-C, much like my first girlfriend, will always have a special place in my heart.
But its time to let her go. She's not the same girl you remember, and just cannot keep up with modern times. She may have been hip and cool at the time, but she can't handle modern trends at all. Even 32-bit memory is a real challenge for her. You're a better man now, and deserve a real woman. Go find yourself a good Visual Studio, or a nice GCC environment.
I'm not saying you have to forget Turbo-C. I know she was your first and will always be magical, but put her pictures in a shoebox, and don't take them out more than once a year. Its time to move on, buddy.
It sounds like it can't detect what kind of graphics card you have. Try setting the graphdriver parameter to either VGA or IBM8514.
In Turbo c goto options->Linker->Liabraries-> add Graphics Library.
It might help
I'm assuming that all the other prerequisites like linkers are satisfied.
Now, as we know the BGI folder is usually in the following path(i.e. if you've followed the default installation):
C:\TurboC++\disk\TurboC3\BGI
As you can see the BGI folder is inside "TurboC3" and not TC.
So the code you need to put in your program is as follows,
initgraph(&gd, &gm, "C:\\TurboC3\\BGI");
I hope this helps :) Happy graphics programming :D
you need to initialize the graphics function first.
below is the code to initialize.
int gd=DETECT,gm;
initgraph(&gd,&gm,"c:\\tc\\bgi");
this will initialize the graphics.
The Steps to make your TC able to run graphics program are as follows:
copy CGA.BGI and EGAVGA.BGI files from TC\BGI folder and paste them in TC\BIN directory.
Open TC by clicking on TC\BIN\TC.EXE.
Click on Options -> Linker -> Libraries .
Select the Graphics Library option and Press OK.
Now you can compile your graphics program with Zero Compilation Errors.
Thanks!