Sponsors of Wiimoteproject.com
IR Pens for Wiimote Whiteboard
Wiimote Project » Hardware Support » IR Pens » Pen with left and right clicks as a mouse but problems with visible IR dots
Pages: [1]
  Print  
Author Topic: Pen with left and right clicks as a mouse but problems with visible IR dots  (Read 10351 times)
0 Members and 1 Guest are viewing this topic.
*
Karma: +0/-0
Posts: 9
Offline Offline
View Profile
« on: April 10, 2009, 07:00:42 PM »

Hi Everyone,
I implemented a mouse pen : an infrared pen with 3 leds and 3 buttons, each button responsible for one led and my idea was that since the wiimote can't detect IR frequencies it will at least detect how many leds are one so i modified johnny chung lee code to support this:
1 led on ----> mouse cursor moving
2 leds on----> left click
3 leds on ----> right click or customize for other options.
The code is working fine as far as the wiimote detects the leds correctly but the problem is that sometimes one led is on and the wiimote detects it as 2 leds on.
Does anyone know what is the reason of this? is it a problem with reflection or something ??
well, waiting for your replies and thanks in advance,
Mirna
Logged
Guru
*
Karma: +28/-0
Posts: 928
Offline Offline
Smoothboard Developer
View Profile WWW
« Reply #1 on: April 11, 2009, 04:56:44 AM »

Hi Everyone,
I implemented a mouse pen : an infrared pen with 3 leds and 3 buttons, each button responsible for one led and my idea was that since the wiimote can't detect IR frequencies it will at least detect how many leds are one so i modified johnny chung lee code to support this:
1 led on ----> mouse cursor moving
2 leds on----> left click
3 leds on ----> right click or customize for other options.
The code is working fine as far as the wiimote detects the leds correctly but the problem is that sometimes one led is on and the wiimote detects it as 2 leds on.
Does anyone know what is the reason of this? is it a problem with reflection or something ??
well, waiting for your replies and thanks in advance,
Mirna

Hi Mirna,

Yeah, it is the reflection of the IR off the screen and directly from the pen.

That is the reason why the using multiple points to differentiate the clicks is not really suitable.

You can try preventing multiple detected IR points but choosing an IR LED with a narrow beam and also covering the sides of the LED with a material that is opaque to IR. This will prevent the IR from being captured directly from the pen but from the screen reflection.

Another way is to ensure a minimum distance between the two dots before processing this as two different points.

All the best. Smiley

Regards,
Boon Jin
Logged

Smoothboard
Wii Whiteboard/Wiimote Whiteboard with annotation features and collaborate with multiple iPads and Android Tablets!

Smoothboard for Mac
Using a Mac? Now you can annotate on PowerPoint or Keynote slideshows!

BoonJin[/url
*
Karma: +0/-0
Posts: 9
Offline Offline
View Profile
« Reply #2 on: April 11, 2009, 11:48:03 AM »

Boon Jin,
Thank you so much for your reply. I'm really a big fan of your work  Smiley
I'll try the ideas you told me but what do u mean by ensuring a minimum distance between the 2 dots?!!
could u pls explain it to me.
Thank you again  Smiley
Mirna
Logged
Guru
*
Karma: +28/-0
Posts: 928
Offline Offline
Smoothboard Developer
View Profile WWW
« Reply #3 on: April 11, 2009, 04:52:38 PM »

Boon Jin,
Thank you so much for your reply. I'm really a big fan of your work  Smiley
I'll try the ideas you told me but what do u mean by ensuring a minimum distance between the 2 dots?!!
could u pls explain it to me.
Thank you again  Smiley
Mirna

Hi Mirna,

Thanks Smiley

The minimum distance that I mentioned is regarding the two IR points detected by the Wiimote. If the extra IR point is actually a reflection, usually it will be quite close to the original IR source. Therefore, maybe if you can try to ignore dots that appear very close to each other.

Where are you placing the extra IR LEDs?

Regards,
Boon Jin
Logged

Smoothboard
Wii Whiteboard/Wiimote Whiteboard with annotation features and collaborate with multiple iPads and Android Tablets!

Smoothboard for Mac
Using a Mac? Now you can annotate on PowerPoint or Keynote slideshows!

BoonJin[/url
*
Karma: +0/-0
Posts: 9
Offline Offline
View Profile
« Reply #4 on: April 13, 2009, 02:50:22 PM »

Hi Boon Jin,

thanks for your explaination.
I'm placing one led at the tip of the pen , 2nd one at the back of the pen:facing the wiimote, and I didn't decide where to place the 3rd yet , but concerning what u said, may be I should place it on the side or something so as to ignore the dots which are close to each other.
I'll give it  a try.
Thanks again,

Mirna
Logged
*
Karma: +0/-0
Posts: 1
Offline Offline
View Profile Email
« Reply #5 on: April 25, 2009, 11:02:17 PM »

This may have already occurred to you, but when I was playing around with the pen I had two buttons: one to turn on the pen and a momentary button to interrupt the circuit when pressed. Then I defined a click to be if a tracked IR source disappeared and then reappeared within a certain region and within a certain time (250 ms, though both of these could be added to the calibration step for the individual user). Thus a single click was a single click, a double click was a double click, and I tried both triple clicking and a poor man's mouse gestures to simulate a right click.

It may not be what you want, but it did work for me.
Logged
*
Karma: +0/-0
Posts: 9
Offline Offline
View Profile
« Reply #6 on: April 28, 2009, 01:08:40 PM »

Hi bracyman,

Thanks for your reply. This is not really what I want to do but it is something similar.
My idea is that I want to see the cursor moving all the time(like a mouse) so I have a permanent led on which is the cursor. Then I have other leds with pushbuttons.
If I turn another one on , then the wiimote will see 2 leds and recognize this as left click..and so on

Thanks again,

Mirna
Logged
*
Karma: +1/-0
Posts: 10
Offline Offline
View Profile
« Reply #7 on: April 28, 2009, 03:18:54 PM »

My idea is that I want to see the cursor moving all the time(like a mouse)...
Hi Mirna,

just curious: why would you want that?
The whole idea is that you don't need that anymore... you can use your pen (or hand, or a stick, etc.) to point at things on your whiteboard. As soon as you click somewhere, your mouse pointer instantly moves to that area.

Calvin
Logged

Disclaimer: Any errors in spelling, tact, or fact are transmission errors.

"Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that none of it has tried to contact us." - Calvin (Calvin & Hobbes)
*
Karma: +0/-0
Posts: 9
Offline Offline
View Profile
« Reply #8 on: April 30, 2009, 01:49:18 PM »

Hi Calvin,

No this is not really my own aim, I have other issues like adding a button to the pen to switch between writting and erasing mode,Other button to chnage the colors of writting. It´s my bachelor project and I have to try lots of other options.

Thank You,

Mirna
Logged
*
Karma: +0/-0
Posts: 1
Offline Offline
View Profile
« Reply #9 on: September 15, 2009, 08:15:23 AM »

Hi Mirna,

I  was recently trying to do what you say you have done ... (but only for the left click... in other words, only with two buttons), but i had the same problem that you have had.

When i press the first button sometimes it detects more than one IR light.

I would like to know if  the solution proposed by Boon Jin:

"The minimum distance that I mentioned is regarding the two IR points detected by the Wiimote. If the extra IR point is actually a reflection, usually it will be quite close to the original IR source. Therefore, maybe if you can try to ignore dots that appear very close to each other"

Was ulseful for you.

And if it wasnt useful for you, i would like to know if you finally solve this problem and how.

Thank you very much.

By the way Im working on my bachelor project too.
Logged
*
Karma: +0/-0
Posts: 4
Offline Offline
View Profile
« Reply #10 on: July 06, 2010, 04:21:06 PM »

That is really awesome Boon Jin, you had really explain every thing so well that one who don't know anything about IR pen they also can understand everything very well. Great help is done by you, Keep it up.
Logged

Pages: [1]
  Print  
 
Jump to:  

Clicky Web Analytics