rated by 0 users
This post has 3 Replies | 2 Followers

Top 50 Contributor
Posts 7
sc0rpi0n Posted: 10-28-2008 4:13 PM | लग गरिएको

hi

 

i am a student programmer trying to learn how to intereact with devices that are installed in my computer like webcam etc can anyone help me??

Top 10 Contributor
Posts 64
admin In reply to 10-30-2008 5:45 AM | लग गरिएको

Hi,

Can you please more specific? What device you want to interact with? For now I will only answer for webcam. To interact with Webcam, it is very device specific and Windows should has its driver. Camera handling in Windows can be done using Microsoft® Video for Windows® (VFW) using C++. You can see more info about VFW on MSDN or you can find ready to use COM like in this code project article. If VFW is too low level for you, just try to use DirectShow that is availabe inside Windows SDK.

If you prefer to use C# or VB.NET instead of C++, you can try the camera wrapper in CCR/DSS Toolkit that was designed for Robotics. Other option for C# is to use WPF in .NET 3.x. This is example of Webcam control using WPF.

Hope this helps. RAM

Top 25 Contributor
पुरूष
Posts 20
Padam Raj Gurung In reply to 11-03-2008 3:43 AM | लग गरिएको

there are many devices that can be controlled by your computer..like led blinking, fan, dc motor, camera, robots, microcontroller, GPS, GPRS and many more...

but, basically, there are two ways of doing this, using wire and not using wire(IR, BlueTooth) etc.

for beginning , you can start with controlling devices using parallel port. For more advance, stayed tuned to my blog.

eg.:

C# language

first create a simple class for importing COM component.

 class PortAccess

    {      

      

        [DllImport("inpout32.dll", EntryPoint = "Inp32")]

        public static extern int input(int address);

        [DllImport("inpout32.dll", EntryPoint = "Out32")]

        public static extern void Output(int address, int value);

 

    

    }

then, u just use in your application by calling, directly to this functions..

e.g.  PortAccess.Output(888, 254); here, 888 is port address and 254 is value, now, you can control devices that are portal with parallel port of your computer...


 

Top 50 Contributor
Posts 7
sc0rpi0n In reply to 11-26-2008 1:22 PM | लग गरिएको

Thanks for the help . I actually needed help with th cam os it was a hlp.

one more thing do u know hot to intereact with bluetooth.

some tuorials link would help.

Page 1 of 1 (4 items) | RSS