Author Topic: Wiimote Presenter, PowerPoint, Mouse Control, Timing. (Application release)  (Read 44116 times)

Offline jasonlpsmith

  • *
  • Posts: 12
  • Karma: +4/-0
    • View Profile
    • Wiimote Presenter
Hello,

My name is Jason, I am an Electronic Engineer from Australia and I wanted to share a little program I wrote for the Wiimote. The program and source code can be downloaded from my website http://jasonlpsmith.googlepages.com/

This program can be used for:
- mouse control with the infrared (IR) camera and a single IR source
- wiimote button mapping to keyboard keypress events, mouse click events and some other functions like timing and command line execution
- rotation of the wiimote can also be used the same way as wiimote buttons above
- timing
- across multiple screens

The easiest way to explain the program is to show you with my youtube video.

[youtube]http://www.youtube.com/watch?v=c7JaravPeKc[/youtube]

I originally wrote the program for use with PowerPoint presentations, but as I was creating it I saw further uses. I now realise that much of what I have made has already been done before. (I should have looked at what was already available before writing this program). Hopefully this program can be useful, easy to use and flexible.

The program uses Brian Peek’s WiimoteLib and requires .NET 3.5 to run. So far I have only tested it on my laptop with Windows XP.

I would appreciate any feedback.

Regards,

Jason
« Last Edit: May 14, 2008, 06:00:36 PM by jasonlpsmith »



Offline guiguito

  • *
  • Posts: 59
  • Karma: +2/-0
    • View Profile
good job !! very nice program !



Offline UndCon

  • Support Admin
  • *
  • Posts: 566
  • Karma: +11/-3
    • View Profile
    • UndCon
Yes I like it - job well done!


//UndCon



Offline jasonlpsmith

  • *
  • Posts: 12
  • Karma: +4/-0
    • View Profile
    • Wiimote Presenter
Thank you for your comments guiguito and UndCon.

Has anyone tried it in Vista? I am interested in knowing if the new security in Vista prevents keystrokes and mouse events from my program being sent to other programs.

Thanks,

Jason


Offline micbridge

  • *
  • Posts: 28
  • Karma: +1/-0
    • View Profile
Jason:

Your programming and use of the wiimote is just what I've hoped would come into being. I've wanted to make use of it as an uber device for the presentation of architectural graphics on charrettes (intense week-long design sessions with clients to develop design concepts interactively). We use SketchUp, Revit, Google Earth and Powerpoint almost always and your clever research can now make that work so much more dynamic. Thanks a million for pulling it all together.

After seeing your video I had an idea that might help you with your IR source. I just saw these online today and think it could be a beautiful solution, LED throwies. (see link below) A neodynium magnet, a button battery and an LED and you're in business. I just happen to have a number of these lying around because of recent Wii pen constructions. It took all of a couple of minutes to put it together and that was mostly to go to different rooms to find the pieces. See result below. Even this tiny neodynium magnet can 'find' a metal fastener in a gypsum and wood stud wall. It work even better in a comercial building with metal stud walls. I hope this helps. You certainly have helped me with your wiimote presenter program!

-Mike Burbridge, Roanoke, VA, USA

http://graffitiresearchlab.com/?page_id=6




Offline jasonlpsmith

  • *
  • Posts: 12
  • Karma: +4/-0
    • View Profile
    • Wiimote Presenter
Thanks for your comments Mike, I do appreciate it.

That throwie idea is brilliant, perfect for a projector onto a wall or screen. I like that, thanks for sharing your photos.


Offline micbridge

  • *
  • Posts: 28
  • Karma: +1/-0
    • View Profile
Jason:

I tested out your wiimote presenter program with the IR LED throwie at work today. It worked great. In fact it gathered a number of oohs and aahs from neighboring cube mates (as well as myself). I can see now I will spending much of my free time playing with different configurations for both the wiimote and SketchUp to see what 'feels' the best with wiimote movements and buttons. I had a thought last night that might be a presenter addition for you. Can you program the wiimote power button to display and control what looks like a laser dot on the screen? I figure this would fill out that last item of the ubiquitous laser pointer in a presentation remote device. Perhaps it could be a momentary function or maybe a 'laser dot' function that could be assigned to any button. Just a thought. Also, is it possible to program a double or triple command into a button like "Shift +" ?
« Last Edit: May 19, 2008, 07:36:23 PM by micbridge »



Offline jasonlpsmith

  • *
  • Posts: 12
  • Karma: +4/-0
    • View Profile
    • Wiimote Presenter
I'm glad to hear it will be useful.

I like your suggestion of a "laser pointer". Another member of the forum (benpaddlejones) suggested the same thing in a private message. I will be adding this as an option to a future release if I can work out how to do it (probably by modifying the mouse cursor to a bright red or green spot when the wiimote has control over the mouse cursor).

Yes, it will be possible to have double and triple key combinations, I haven't done that yet, but it would certainly be useful. Other additions I am planning on adding are listed in http://jasonlpsmith.googlepages.com/wiimotepresenterhelp#Future. I'm always happy to hear suggestions, not exactly sure when I will get around to programming it though.

Regards,
Jason


Offline DerTürke86

  • *
  • Posts: 20
  • Karma: +1/-0
    • View Profile
Hello People

i cant get the program get work or debugged it say StackOverflowException in the form1.cs in Line 341!
do any have the same problem i have .Net 3.5 and it still wont work...




Offline jasonlpsmith

  • *
  • Posts: 12
  • Karma: +4/-0
    • View Profile
    • Wiimote Presenter
Hello DerTürke86,

At line 341 of form1.cs, the program is drawing a rectangle... I do not know why this is causing an error, but I will look into it.

Could you try downloading the WiimoteLib runtime binary zip file and running WiimoteTest.exe? The file is located at http://www.codeplex.com/WiimoteLib/Release/ProjectReleases.aspx?ReleaseId=13780

If you get WiimoteTest.exe to work, that may help me isolate the bug in the program.

Thanks,

Jason


Offline DerTürke86

  • *
  • Posts: 20
  • Karma: +1/-0
    • View Profile
Yes the WiimoteTest works Fine. I dont understand why this problem came! The other Programms like rightclick v3.1 doesnt debug to! I am a little bit confused!
and would be thankful for help



Offline DerTürke86

  • *
  • Posts: 20
  • Karma: +1/-0
    • View Profile
this ist the output in the Console sorry its on German bit may be you can see the Error!

"WiimotePresenter.vshost.exe" (Verwaltet): "C:\WINNT\assembly\GAC_32\mscorlib\2.0.0.0__b77a5c561934e089\mscorlib.dll" wurde geladen, das Laden von Symbolen wurde übersprungen. Das Modul ist optimiert, und die Debugoption "Nur eigenen Code" ist aktiviert.
"WiimotePresenter.vshost.exe" (Verwaltet): "C:\WINNT\assembly\GAC_MSIL\Microsoft.VisualStudio.HostingProcess.Utilities\9.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.HostingProcess.Utilities.dll" wurde geladen, das Laden von Symbolen wurde übersprungen. Das Modul ist optimiert, und die Debugoption "Nur eigenen Code" ist aktiviert.
"WiimotePresenter.vshost.exe" (Verwaltet): "C:\WINNT\assembly\GAC_MSIL\System.Windows.Forms\2.0.0.0__b77a5c561934e089\System.Windows.Forms.dll" wurde geladen, das Laden von Symbolen wurde übersprungen. Das Modul ist optimiert, und die Debugoption "Nur eigenen Code" ist aktiviert.
"WiimotePresenter.vshost.exe" (Verwaltet): "C:\WINNT\assembly\GAC_MSIL\System\2.0.0.0__b77a5c561934e089\System.dll" wurde geladen, das Laden von Symbolen wurde übersprungen. Das Modul ist optimiert, und die Debugoption "Nur eigenen Code" ist aktiviert.
"WiimotePresenter.vshost.exe" (Verwaltet): "C:\WINNT\assembly\GAC_MSIL\System.Drawing\2.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll" wurde geladen, das Laden von Symbolen wurde übersprungen. Das Modul ist optimiert, und die Debugoption "Nur eigenen Code" ist aktiviert.
"WiimotePresenter.vshost.exe" (Verwaltet): "C:\WINNT\assembly\GAC_MSIL\Microsoft.VisualStudio.HostingProcess.Utilities.Sync\9.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.HostingProcess.Utilities.Sync.dll" wurde geladen, das Laden von Symbolen wurde übersprungen. Das Modul ist optimiert, und die Debugoption "Nur eigenen Code" ist aktiviert.
"WiimotePresenter.vshost.exe" (Verwaltet): "C:\WINNT\assembly\GAC_MSIL\Microsoft.VisualStudio.Debugger.Runtime\9.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.Debugger.Runtime.dll" wurde geladen, das Laden von Symbolen wurde übersprungen. Das Modul ist optimiert, und die Debugoption "Nur eigenen Code" ist aktiviert.
"WiimotePresenter.vshost.exe" (Verwaltet): "D:\Projekt NintendoWii\Presenter\Sourcecode\WiimotePresenter\bin\Debug\WiimotePresenter.vshost.exe" wurde geladen, das Laden von Symbolen wurde übersprungen. Das Modul ist optimiert, und die Debugoption "Nur eigenen Code" ist aktiviert.
"WiimotePresenter.vshost.exe" (Verwaltet): "C:\WINNT\assembly\GAC_MSIL\System.Core\3.5.0.0__b77a5c561934e089\System.Core.dll" wurde geladen, das Laden von Symbolen wurde übersprungen. Das Modul ist optimiert, und die Debugoption "Nur eigenen Code" ist aktiviert.
"WiimotePresenter.vshost.exe" (Verwaltet): "C:\WINNT\assembly\GAC_MSIL\System.Xml.Linq\3.5.0.0__b77a5c561934e089\System.Xml.Linq.dll" wurde geladen, das Laden von Symbolen wurde übersprungen. Das Modul ist optimiert, und die Debugoption "Nur eigenen Code" ist aktiviert.
"WiimotePresenter.vshost.exe" (Verwaltet): "C:\WINNT\assembly\GAC_MSIL\System.Data.DataSetExtensions\3.5.0.0__b77a5c561934e089\System.Data.DataSetExtensions.dll" wurde geladen, das Laden von Symbolen wurde übersprungen. Das Modul ist optimiert, und die Debugoption "Nur eigenen Code" ist aktiviert.
"WiimotePresenter.vshost.exe" (Verwaltet): "C:\WINNT\assembly\GAC_32\System.Data\2.0.0.0__b77a5c561934e089\System.Data.dll" wurde geladen, das Laden von Symbolen wurde übersprungen. Das Modul ist optimiert, und die Debugoption "Nur eigenen Code" ist aktiviert.
"WiimotePresenter.vshost.exe" (Verwaltet): "C:\WINNT\assembly\GAC_MSIL\System.Deployment\2.0.0.0__b03f5f7f11d50a3a\System.Deployment.dll" wurde geladen, das Laden von Symbolen wurde übersprungen. Das Modul ist optimiert, und die Debugoption "Nur eigenen Code" ist aktiviert.
"WiimotePresenter.vshost.exe" (Verwaltet): "C:\WINNT\assembly\GAC_MSIL\System.Xml\2.0.0.0__b77a5c561934e089\System.Xml.dll" wurde geladen, das Laden von Symbolen wurde übersprungen. Das Modul ist optimiert, und die Debugoption "Nur eigenen Code" ist aktiviert.
Der Thread 0x128c hat mit Code 0 (0x0) geendet.
Der Thread '<Kein Name>' (0x1220) hat mit Code 0 (0x0) geendet.
"WiimotePresenter.vshost.exe" (Verwaltet): "D:\Projekt NintendoWii\Presenter\Sourcecode\WiimotePresenter\bin\Debug\WiimotePresenter.exe" geladen, Symbole geladen.
"WiimotePresenter.vshost.exe" (Verwaltet): "D:\Projekt NintendoWii\Presenter\Sourcecode\WiimotePresenter\bin\Debug\WiimoteLib.dll" wurde geladen





Offline DerTürke86

  • *
  • Posts: 20
  • Karma: +1/-0
    • View Profile
First this when i debug the presenter this came and then alle the time the Pic above



Offline mauro

  • *
  • Posts: 1
  • Karma: +1/-0
    • View Profile
Same problem for me: wiimoteTest.exe (last version of the wiimotelib, 1.3) work well, but your program throw an exception with the 1.2.1 lib, and i have the same problem of the screenshot above, dozen of windows with that error.
I tried to use the 1.3 instead id the 1.2.1 but without success:

System.TypeLoadException: Impossibile caricare il tipo 'WiimoteLib.WiimoteChangedEventHandler' dall'assembly 'WiimoteLib, Version=1.3.0.0, Culture=neutral, PublicKeyToken=null'.

   in WiimotePresenter.Form1.Form1_Load(Object sender, EventArgs e)

   in System.Windows.Forms.Form.OnLoad(EventArgs e)

   in System.Windows.Forms.Form.OnCreateControl()

   in System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)

   in System.Windows.Forms.Control.CreateControl()

   in System.Windows.Forms.Control.WmShowWindow(Message& m)

   in System.Windows.Forms.Control.WndProc(Message& m)

   in System.Windows.Forms.ScrollableControl.WndProc(Message& m)

   in System.Windows.Forms.ContainerControl.WndProc(Message& m)

   in System.Windows.Forms.Form.WmShowWindow(Message& m)

   in System.Windows.Forms.Form.WndProc(Message& m)

   in System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)

   in System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)

   in System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)



Offline jasonlpsmith

  • *
  • Posts: 12
  • Karma: +4/-0
    • View Profile
    • Wiimote Presenter
Thank you DerTürke86 for taking the time to help me fix this bug by showing me where it is. Thanks mauro for the same thing.

I will try to fix this bug.