Sponsors of Wiimoteproject.com
IR Pens for Wiimote Whiteboard
Wiimote Project » Wiimote Projects » Wiimote Interactive Whiteboard » Right clicks with the Wiimote Whiteboard
Pages: [1] 2 3 ... 6
  Print  
Author Topic: Right clicks with the Wiimote Whiteboard  (Read 40703 times)
0 Members and 1 Guest are viewing this topic.
jarrodhook
Guest
« on: January 10, 2008, 03:34:27 AM »

Hey everyone,

I'm Jarrod Hook - I posted over at the google blog, I am the dude who is setting it up at his work - but stilltrying to make the right click as easy as possible.

I posted some software called 'softright click' but sadly that didnt work for the Wiimote WB. Sad

I even had autohotkey read the clicks, and indeed they are registered as 'Left clicks' from the wiimote WB, but it doesnt bring up the right click menu Sad So, I was gutted.

However, this morning I had a idea, and have decided on the following;

-Right clicking needs to be easy and seperate to the 'always on' left click.
-I need a better IRLEd pen

So - one of New Zealands local suppliers, Jaycar eletronics, has the following for sale

Laser Pointer with Remote Presentation Control
http://www.jaycar.co.nz/productView.asp?ID=ST3108&CATID=&keywords=laser&SPECIAL=&form=KEYWORD&ProdCodeOnly=&Keyword1=&Keyword2=&pageNumber=&priceMin=&priceMax=&SUBCATID=

In short - 'This excellent device incorporates "Page Up" & "Page Down" buttons into a stylish laser pointer.' Hmm, I think to myself, interesting!
Its plug and play, no drivers, so, sadly, I cant change how the device itself works.....until I realised that AutoHotkey maker has a redirect keys option!!

So, I made a small little exe, and everytime I press Pagedown on the keyboard, it right clicks! Brilliant!! After this post I will go buy the pen and see if clicking page down on the pen will allow a right click on the screen.

(FYI - it has a little usb wireless unit that will plug into the pc I am using, no big deal)

I figure, I could remap the Pageup click on the pen to be a double click left - that will make it easy.

There are probably other things that can be done, but I think this might be a good idea, and wanted to share it.

I'll also modify the pen to its got the IR in the top Smiley So the staff here just hold down the middle button to drag the mouse, press one button for double click, and one for right click.

Comments welcome!


EDIT - UPDATE

I'm back from buying the pen. The pen itself isnt wireless, its actually IR! Damn this whole world is IR now Smiley
And indeed, you have to point the tip of the pen at the reciever, and it picks up your page up, or down.

But, with this autohotkey exe I made, it does a nice right click. Cool! Now, to try and open it and retrofit it with ANOTHER led Tongue It does cause a issue however, because its IR, and its a short IR flash, it moves the curser of the whiteboard! DAMN!! Smiley

Still, if I place the Wiimote in a way where it cant see the pointer, or something, I dunno. I'll work something out Smiley

-Jarrod
« Last Edit: January 10, 2008, 05:52:38 AM by jarrodhook » Logged
*
Karma: +0/-0
Posts: 1
Offline Offline
View Profile Email
« Reply #1 on: January 10, 2008, 10:39:42 AM »

I'll chime in with my own right-click idea.

I disagree with Dice that the 'right' way to increase pen functionality is to introduce IR flashing.  I just don't think it'll be reliable enough for the complexity and expense it adds.

Adding lights is my simple, cheap, possibly-reliable solution.  Dice's objection to this is that the IR sources could get too close for the wiimote to differentiate, but that possibility is eliminated by removing the click lights from the IR pen.

The IR pen has one LED that's always on.  This is the cursor light, and the whiteboard software tracks it continually.  There is a thin wire leaving the pen to a 'sensor bar' that's placed somewhere in view of the wiimote.  The bar has 3 more IR LEDs in it, and the whole mess is wired in such a way so that pushing 3 buttons intsalled into the IR pen will light up the LEDs (push left click, light up one LED, right click, light up two LEDs, middle click, light up all 3).  The whiteboard software counts the total number of visible blobs and translates those into clicks.

The sensor bar can also hold the power supply, so you don't have to try and cram a battery into an expo pen.

Though, this introduces the problem of having to make sure you're not in the way of both the pen AND the bar.

If only there was a wireless nunchuck...
Logged
*
Karma: +1/-0
Posts: 8
Offline Offline
View Profile WWW
« Reply #2 on: January 10, 2008, 02:23:54 PM »

Shadwhawk, Your idea with the 3 leds in a sensor bar sound ok but why not expand the number of operations by using binary counting. Assuming all 3 leds off means no action there can still be a possible 7 actions. e.g.

LED1 LED2 LED3
0    0    0    -> No action
0    0    1    -> Left click 
0    1    0    -> Right click
0    1    1    -> Middle click
1    0    0    -> Mappable 1 (e.g. powerpoint blank screen)
1    0    1    -> Mappable 2(e.g. Exit full screen)
1    1    0    -> Mappable 3
1    1    1    -> Mappable 4

I doubt all these functions can be built into a pen but it is do-able in some presentation style control with a pointer.


I also see benifit in the pulses idea for this will conserve battery life by not requiring the led to always be on, and only required one led. I hope to look further into the possibility of pulsing the led, just have to get the code building and operational first, should not be too hard to determine the pulse width although it must be considered that windows has a timer granularity of 10ms, so a pulse should be at least 20ms wide.
Logged

*
Karma: +0/-0
Posts: 2
Offline Offline
View Profile
« Reply #3 on: January 10, 2008, 04:02:59 PM »

I disagree with Dice that the 'right' way to increase pen functionality is to introduce IR flashing.  I just don't think it'll be reliable enough for the complexity and expense it adds.


The advantage of some sort of modulation on the IR output and detection is that it keeps the
transfer of information down to single IR source and detection points.

You could have three modes, one for cursor tracking (like when you just move your mouse), one
for a left click and one for a right click. You would only have to ensure that the wiimote
was able to pick up the pen tip.

I'm not sure how easy this would be to add to the SW, do the bluetooth/wiimote drivers have a
good enough data throuput to allow PWM/PCM to be detected?

Adding this to the pen would involve a small uC (8 pin pic or similar) but this wouldn't be
difficult.

?

Nial.
Logged
Administrator
Site Admin
*
Karma: +18/-0
Posts: 441
Offline Offline
View Profile WWW Email
« Reply #4 on: January 10, 2008, 06:54:52 PM »

Dice is the person that posted the comments, but Johnny is the one that is the original author.

Just clearing that up

I disagree with Dice that the 'right' way to increase pen functionality is to introduce IR flashing.  I just don't think it'll be reliable enough for the complexity and expense it adds.

Wink
Logged

*
Karma: +0/-0
Posts: 1
Offline Offline
View Profile
« Reply #5 on: January 10, 2008, 07:59:54 PM »

Sorry - I appear to have posted this in the wrong section:

How about actually using a Wacom pen (or equivalent but cheaper wireless pen) - the pressure sensitive behaviour is measured in the tip of the pen, not the tablet itself, so you could just have the tablet plugged in but use the pen elsewhere. By using an IR led attached to a Wacom pen you'd solve the problem of pressure-sensitivity. It even has the side button for left and right click. Maybe one of the other pen/tablet combinations would work juat as well - like the Trust TB-4200, which is dead cheap.
Haven't tried it but it's worth looking into I think.
Logged
*
Karma: +0/-1
Posts: 26
Offline Offline
View Profile WWW
« Reply #6 on: January 10, 2008, 10:07:52 PM »

Why not using a microcontroller?

You can build a very simple microcontroller board and programm it.
Like:
 right click : 3 times flashing ( Very short in milliseconds)
 left click  : allways on

you can also programm other codes like starting the media player or scrolling.

The Attiny25 from Atmel is small and you don't have to have much components to run it.

The only thing I can't do is to code a recognition programm. If someone wants to code the recognition software then I can make the code for the µC.
« Last Edit: January 11, 2008, 12:49:23 AM by Der Wichtel » Logged
*
Karma: +1/-0
Posts: 10
Offline Offline
View Profile Email
« Reply #7 on: January 11, 2008, 04:04:59 AM »

I have only just read through this topic and haven't done any research into it so correct me if I'm not following this correctly.  The basic challenge here is to find a way to add right click functionality to the white board.  So far, I have seen a lot of solutions that utilize additional LEDs to accomplish this.  My question is, could this also not be accomplished by using a second wiimote?  It has the button to utilize and it is not dependent on the first wiimote picking up the signal as it is tied directly to the Wii base unit via Bluetooth.

Just a thought.

Logged
*
Karma: +3/-0
Posts: 39
Offline Offline
View Profile
« Reply #8 on: January 11, 2008, 04:26:54 AM »

I think the problem is solved.

ZDNet has a writeup of the "Best of CES" and guess what I see... A wireless nunchuk. WiimoteLib already handles buttons C and Z, as well as the stick, and probably even the accelerometers.
http://ces.cnet.com/8301-13855_1-9843460-67.html



So you can have the wireless nunchuck in one hand, and the pen in the other. Use one, or both buttons as a 'shift', so for example, if you press C and "click" with the pen at the same time, that could be a right-click.

In fact, I would change the control scheme so, that you MOVE the cursor with the pen, left-click with Z and right-click with C depressed.

What do you think, can we say this one is solved?
Logged
*
Karma: +1/-0
Posts: 8
Offline Offline
View Profile WWW
« Reply #9 on: January 11, 2008, 12:22:32 PM »

Gabort, I don't think the wireless nunchuck solves the issue. It is not a combined solution; it may be off the shelf but I think what the user would want is a pen that does all this. It may be possible to replace the wireless nunchuck with a wireless pen which communicates in the same way as the nunchuck but still uses the IR emitter to be tracked by the wiimote.
Logged

*
Karma: +3/-0
Posts: 39
Offline Offline
View Profile
« Reply #10 on: January 11, 2008, 03:08:04 PM »

I tend to disagree. The reason is, that you can (and would probably want to) solve this simply. Building a wireless pen, that has 3 buttons, all conveniently placed, that also communicates wirelessly with the wiimote seems hard. It is not something I would have a chance at pulling off at home really. Even if the communication was somehow possible, placing the buttons ergonomically in itself would be quite difficult.

On the other hand, the wireless Nunchuck seems to do this off the shelf. It has 2 extra buttons, can be held in your hand conveniently, and your existing "pen" with just one button will work nicely.

I have just one concern: range. But we'll see.
Logged
*
Karma: +0/-0
Posts: 1
Offline Offline
View Profile
« Reply #11 on: January 11, 2008, 03:19:53 PM »

I think the pwm idea for right click has some merit. It'll need to be a fairly slow flash since the wiimote only updates at 100hz, but that's fast enough to be usable. The tricky bit will be to synchronise the flashing with the wiimote framegrabs. I guess you could flash at 50hz to guarantee at least one frame with no blob in it between updates. Then you set your pattern recogniser to pick up all the possible temporal patterns that can result from that. If there's any overlap between flash patterns then just pick some different patterns.

This is a slightly harder problem than a simple IR remote control, since the IR detector in a TV detects the start of the flash pattern and automatically synchronises to it, but it should still be possible to figure something out.

Not sure about using microcontrollers here. Any chips small and cheap enough to use in the project will be surface mount and that'll add a fair amount of complication to building a pen. The beauty of Johnny Lee's project is in its simplicity!
Logged
*
Karma: +0/-1
Posts: 26
Offline Offline
View Profile WWW
« Reply #12 on: January 11, 2008, 04:18:46 PM »

I think the pwm idea for right click has some merit. It'll need to be a fairly slow flash since the wiimote only updates at 100hz, but that's fast enough to be usable. The tricky bit will be to synchronise the flashing with the wiimote framegrabs. I guess you could flash at 50hz to guarantee at least one frame with no blob in it between updates. Then you set your pattern recogniser to pick up all the possible temporal patterns that can result from that. If there's any overlap between flash patterns then just pick some different patterns.

This is a slightly harder problem than a simple IR remote control, since the IR detector in a TV detects the start of the flash pattern and automatically synchronises to it, but it should still be possible to figure something out.

Not sure about using microcontrollers here. Any chips small and cheap enough to use in the project will be surface mount and that'll add a fair amount of complication to building a pen. The beauty of Johnny Lee's project is in its simplicity!

100Hz means that the wiimote will update the picture every 10ms. To be sure, that the remote recognizes the flashing you can let the LED turn on for 20ms. So you have to do something like:
20ms on - 20ms off - 20ms on - 20ms off - 20ms on - 20ms off. ( which is what you have already mentioned 50Hz?)
Therefore you need 120ms for one rightclick. Of course you can also use less than 20ms but with 20ms you don't have to sync it with the Wiimote.

But 120ms is enough for a rightclick action. To be sure that the software will recognize the 3 times flashing, you can let the LED flash 4 times and program the recognition software to interpret a flash of at least3 times flashing as rightclick. So if one flash was not recognized the software interprets the rightclick too.

Yeah I have to admit that mikrocontrollers were not easy to solder without the right hardware.
But someone can produce some and sell them for 5$ or so. I think 5$ plus shipping is not much, isn't it?
« Last Edit: January 11, 2008, 04:21:06 PM by Der Wichtel » Logged
*
Karma: +0/-0
Posts: 2
Offline Offline
View Profile Email
« Reply #13 on: January 11, 2008, 04:54:45 PM »

what if you just did some keybinding to the keyboard. click with like the f5 or f6. but the whiteboard would then have to just move the courser instead of the click and drag it does now.
Logged
Guru
*
Karma: +16/-0
Posts: 177
Offline Offline
atomriot@hotmail.com colbzilla View Profile
« Reply #14 on: January 11, 2008, 05:21:37 PM »

how about this, what if you preset an area of your whiteboard to be the click area. so if you set it at the very top in the middle, any activity in that zone would send a mouseclick, otherwise you would send a mousemove. you could have 2 distinct zones

This would work because as long as you have your wiimote app calibrated, you could handle it in the mouse position processing. the mouse wouldn't move since it is set to read one of those zones. you could even draw something on the client desktop area so you can see where the zone is. or pop up a window at the same point after calibration. sure you would have to move away for clicks but i think this would be a good option with current hardware and software for the most part.
Logged

Details, details. Things to do. Things to get done. Don't bother me with details, just tell me when they're done.
--
James Lionel Price

Pages: [1] 2 3 ... 6
  Print  
 
Jump to:  

Clicky Web Analytics