Jump to content

Moving hand


raymyster

Recommended Posts

hello community,

we are designing a virtual aircraft on the pc using c++ & opengl, well we managed to do that, all done..

1) the aircraft can swing left using the left arrow

2) the aircraft can swing right using the right arrow

the issue is: (the instructor asked us to implement this)

we need to create 2 sensors with beams that will be projected to my hand, when i swing my hand left: a labview vi will detect that & send a left click instance to the c++ engine. & same thing vise versa when i swing right.

the thing is i have no idea how to start & need help with setting the hardware needs & software needs to be implemented, i know some labview, but i need some pointers to get started.

any tips?

thanks in advance, regards :)

Link to comment

QUOTE (raymyster @ Apr 4 2009, 03:50 AM)

hello community,

we are designing a virtual aircraft on the pc using c++ & opengl, well we managed to do that, all done..

1) the aircraft can swing left using the left arrow

2) the aircraft can swing right using the right arrow

the issue is: (the instructor asked us to implement this)

we need to create 2 sensors with beams that will be projected to my hand, when i swing my hand left: a labview vi will detect that & send a left click instance to the c++ engine. & same thing vise versa when i swing right.

the thing is i have no idea how to start & need help with setting the hardware needs & software needs to be implemented, i know some labview, but i need some pointers to get started.

any tips?

thanks in advance, regards :)

So, what ideas do you have yourself on how you might accomplish this?

Note on list etiquette:

It is nice of you to be honest this is course work. But, even when it is not, it is still a good idea to have made your own contribution to the effort; the fact that it IS course work, and others may be working diligently without asking others to do it for them, makes it even more problematic to start throwing out solutions. It is even a fascinating topic.

But, you really ought to lead with:

"Here are my own ideas; 1, 2, 3, etc."

"Here is how I am currently trying to do it..."

"This is what didn't work."

"I have no idea," doesn't really cut it. That is the starting point for so much project work.

You need to get past that point on your own. IMO.

Mike

Link to comment

QUOTE (mross @ Apr 4 2009, 12:49 PM)

So, what ideas do you have yourself on how you might accomplish this?

Note on list etiquette:

It is nice of you to be honest this is course work. But, even when it is not, it is still a good idea to have made your own contribution to the effort; the fact that it IS course work, and others may be working diligently without asking others to do it for them, makes it even more problematic to start throwing out solutions. It is even a fascinating topic.

But, you really ought to lead with:

"Here are my own ideas; 1, 2, 3, etc."

"Here is how I am currently trying to do it..."

"This is what didn't work."

"I have no idea," doesn't really cut it. That is the starting point for so much project work.

You need to get past that point on your own. IMO.

Mike

thank you mike for your reply :) i understand what you brought up...

but the thing is we are not engineering students :) & the doctor sugested somthing like this..

i didnt ask for a 10 hour code of solution :S i simply asked for an idea like what shaunR suggested:

2 laser switches and the Parallel port VI example.

Move hand left, breaks beam 1.

Move hand right, breaks beam 2.

now what i mean is there anything more exact:

what kind of laser switches & how can i transmit those to parallel port & will labview take the data easily?

Link to comment

QUOTE (raymyster @ Apr 6 2009, 08:07 AM)

thank you mike for your reply :) i understand what you brought up...

but the thing is we are not engineering students :) & the doctor sugested somthing like this..

i didnt ask for a 10 hour code of solution :S i simply asked for an idea like what shaunR suggested:

2 laser switches and the Parallel port VI example.

Move hand left, breaks beam 1.

Move hand right, breaks beam 2.

now what i mean is there anything more exact:

what kind of laser switches & how can i transmit those to parallel port & will labview take the data easily?

Yes, LabVIEW can do what you want. LabVIEW will do it much more easily than C++. But interfacing... I have not done that. I stick to LabVIEW.

I do not see the point of lasers. You can use mechanical switches that cost a few pesos just as well.

With a proper data acquisition and control system, you can sense and respond to continuously changing inputs which will be better for aircraft control. A binary system - hand blocking laser versus hand not blocking laser - is an ineffective way to control all but the simplest systems. How will you tell it to turn slowly or quickly?

Your parallel port is not easily useful. It is a digital system. You can use use this for sending simple digital IO, but this is a misuse - alot of trouble with little payback. If you have a microcontroller that can send parallel information (bits, bytes, and words) then it is used properly. Only in this way can you get continuous control of the aircraft.

Assuming you don't really want the trivial binary control, then you are essentially trying to replicate a joystick function - this is nothing new. There must be a ton of information about how to design a joytick and interface it with a PC. Look in some hacking sites on the web. There is probably C code to use. This will be more fruitful than persuing the LabVIEW connection. There may even be hobbyist joysticks to use. Look into radio controlled helicopters and aircrafrt for control hardware and software.

LabVIEW is a full featured software development environtment. The learning curve is steep, but significant. It does not seem practical to me that you should be using LabVIEW for this small project. You should be learning your C++ to do this.

Link to comment

QUOTE (raymyster @ Apr 6 2009, 01:07 PM)

What switches depends on the range (laser are generally longer ranges than.....say...photo and inductive - not that inductive would be any good for detecting your hands...so how far away are you from the interface?) and probably more importantly on your budget.

Other factors will affect your choice (do you have to see the spots...if not then maybe IR?) do you want to build something cheap (laser pointer and photo-detector < £5) or buy something to industrial standards (Pepperl + Fuchs £50-£100 each). Only you can choose the sensor as only you know your project.

Go down to Maplins and see what they have or if you have an account....RS Components have loads under "Sensors and Transducers" e.g

http://uk.rs-online.com/web/search/searchB...t&R=5103249

Getting it to the parallel port is with wire! Lots of info out there on using the parallel port as digital IO

http://www.doc.ic.ac.uk/~ih/doc/par/

and I guess you haven't looked at the example yet to see just how easy it is to get the data in (watch the voltages though.....parallel port is 5v and many off the shelf industrial sensors are 12-24v!). You could go for a digital IO card but why not use the one that comes with every PC as you only need 2. With a bit of thought and preparation, you should have this up and running in 1/2hr after ordering/receiving the bits!

function alert(m) {}

QUOTE (mross @ Apr 6 2009, 02:51 PM)

Yes, LabVIEW can do what you want. LabVIEW will do it much more easily than C++. But interfacing... I have not done that. I stick to LabVIEW.

I do not see the point of lasers. You can use mechanical switches that cost a few pesos just as well.

Thats not the brief.

QUOTE

we need to create 2 sensors with beams that will be projected to my hand, when i swing my hand left: a labview vi will detect that & send a left click instance to the c++ engine. & same thing vise versa when i swing right.

QUOTE

With a proper data acquisition and control system, you can sense and respond to continuously changing inputs which will be better for aircraft control. A binary system - hand blocking laser versus hand not blocking laser - is an ineffective way to control all but the simplest systems. How will you tell it to turn slowly or quickly?

Indeed but that is not the requirement. I imagine this is a learning exercise rather than a commercial product to fly airplanes.

QUOTE

Your parallel port is not easily useful. It is a digital system. You can use use this for sending simple digital IO, but this is a misuse - alot of trouble with little payback. If you have a microcontroller that can send parallel information (bits, bytes, and words) then it is used properly. Only in this way can you get continuous control of the aircraft.

I Disagree. Little trouble and cheap. Bits, bytes and words are just highs and lows on a digital IO interpreted in a certain manner.

QUOTE

LabVIEW is a full featured software development environtment. The learning curve is steep, but significant. It does not seem practical to me that you should be using LabVIEW for this small project. You should be learning your C++ to do this.

Apart from the fact that that Labview is more intuitive, has lots of examples you can modify for just this sort of thing and (more importantly) they have already done it in C++ but using a keyboard.

I think the most interesting conundrums will be when they want to interface the Labview to the rest of the existing system. There is no sane reason to use Labview for this trivial part of the project (and mixing languages is always more trouble than it's worth) when all they have to do is read the parallel port/digital IO or whatever interface they choose, directly from thier C++ program which is why I am lead to beleive this is a learning exercise.

function alert(m) {}

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.