|
-
May 3rd, 2007, 05:05 PM
#1
Thread Starter
New Member
Help!
Okay you guys, I need some help. Attached is some software that moves a gun aroud and fires it at a IR point. Is there a way that in stead of moving a couple of servos, can it move the mouse to those coordinates? And click? That would rule. Ill send you guys pics when it's done.
M-kay, heres the link
http://defconbots.org/defcon14/design_software.php
-
May 4th, 2007, 06:47 AM
#2
Frenzied Member
Re: Help!
What exactly do you want to achieve?
-
May 5th, 2007, 03:00 PM
#3
Hyperactive Member
Re: Help!
Is this a robotics question?
-
May 7th, 2007, 08:28 PM
#4
Thread Starter
New Member
Re: Help!
 Originally Posted by singularis
Is this a robotics question?
Um, yes. It is. I didn't know there was a section on that. But what I'm trying to do is identify a white dot and put the mouse there.
-
May 8th, 2007, 02:46 AM
#5
Hyperactive Member
Re: Help!
Ok, if you are attempting to make a simulation of this I can help you.
Get the picture of "what the robot sees" in a picture box and make a function that loops round all the pixels in the box to find any white ones.
I take it that you know how to use loops, there is an API call known as GetPixel which returns the colour of the pixel at specified coordinates.
It looks somewhat like this:
Code:
Private Declare Function GetPixel Lib "GDI32" (ByVal hDC As Long, ByVal x As Long, ByVal y As Long) As Long
Obviously as soon as your program finds a white pixel then it will know where the white target is.
-
May 8th, 2007, 10:09 PM
#6
Re: Help!
GetPixel is extremely slow. Depending on your needs, you may want to use Get/SetDIBits, or even consider switching to C++ and using something like SDL.
chem
Visual Studio 6, Visual Studio.NET 2005, MASM
-
May 15th, 2007, 03:40 PM
#7
Re: Help!
it sounds to me like classroom work in which case it has to be vb and speed doesnt matter. is this the case?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|