Use the Wiimote as a wireless PowerPoint Presenter

Discussion in 'Wii - Hardware, Devices and Utilities' started by Renegade_R, Apr 8, 2007.

  1. Renegade_R

    Renegade_R Audio/Video Expert

    Apr 21, 2004
    Toronto, Ontario
    Alright so I'm two things right now. First I am a gamer. Second, I am a student. Being a student in university has led me to make many presentations involving my laptop using PowerPoint. There were many times that I would have prefered to move around while making the presentation but I did not have that ability as I was chained to my laptop to press the next button.

    Wireless presenters are generally $100+ so I built my wireless presenter around the functionality of a Logitech one. Actually it even exceeds it in functionality.

    The script is written for GlovePIE. You will need the GlovePIE program as well as a compatible Bluetooth adapter. I am releasing this script on GBATemp first so consider it a GBATemp exclusive [​IMG] *hopes to get on the front page*

    Get GlovePIE here:

    The script has the capability to advance the slides, go back a slide, override the mouse, start the presentation, end the presentation, blackout and white out the screen and give a vibration at a certain time to warn you when you're low on time. I don't think everyone here has a use for it, but if any of you is the aspiring business student or make presentations regularly. I think you'll find this very useful. By walking around the room instead of being chained to a laptop gives you a big plus in your credibility.

    Notes, you are free to use this code in any way you wish but please give credit to where its due. Thanks.

    //PowerPoint Presentation Script
    //by Jeffrey "Renegade_R" Lee
    // ---== Rumble Time Reminder ==---
    var.timer = 0
    var.time = 10
    var.remain = 2
    //Note, the timer will not activate if your remaining time is greater than
    //your presentation time.
    // ---== Comments ==---
    //This program is designed to be a cheap alternative to a wireless presenter.
    //The program has the capability to change slides, override the mouse, begin,
    //end, Whiteout, Blackout and low time vibration warning.
    //The vibration warning will vibrate the Wiimote briefly when you have a
    //certain amount of time remaining.  For example, if you set var.time to 10
    //and var.remain to 2, the Wiimote will warn vibrate at the 8 minute mark
    //telling you that you have 2 minutes of the presentation remaining.  I would
    //have built a timer into the Wiimote LEDs but...well, lets say I'd save you
    //from distracting your audience, remember everyone loves blue lights.;)
    //The timer will not activate until you hit the 'Home' button to start the
    //I designed this script simply because I wish I had this program in my years
    //at univeristy as it would have helped me a lot when I made presentations.
    // ---== Controls ==---
    //A Button -> Previous Slide
    //B Trigger -> Next Slide (There was a lawsuit about this one actually :wink:)
    //Home Button -> Being Slide Show
    //1 + 2 Buttons -> End Slide Show
    //1 Button -> White out the screen
    //2 Button -> Black out the screen
    //Arrows -> Move Mouse
    //Minus Button -> Left Click
    //Plus Button -> Right Click
    //Remaining Time Warning
    if var.timer = 1 and Wiimote.Home
    var.timer = 0
    var.time = var.time * 60
    var.time = var.time * 1000
    var.remain = var.remain * 60
    var.remain = var.remain * 1000
    var.time = var.time - var.remain
    wait var.time ms
    wiimote.Rumble = true
    wait 300 ms
    wiimote.Rumble = false
    wait 300 ms
    wiimote.Rumble = true
    wait 300 ms
    wiimote.Rumble = false
    wait 300 ms
    wiimote.Rumble = true
    wait 300 ms
    wiimote.Rumble = false
    wait 300 ms
    wiimote.Rumble = true
    wait 300 ms
    wiimote.Rumble = false
    var.remain = 0
    var.time = 0
    wiimote.Leds = 0
    //Navigation Controls
    N = wiimote.B
    P = wiimote.A
    B = wiimote.One
    W = wiimote.Two
    //Begin and End Slideshow
    if wiimote.One and wiimote.Two
    Keyboard.Escape = true
    wait 1000 ms
    Keyboard.Escape = false
    if wiimote.Home
    Keyboard.F5 = true
    wait 1000 ms
    Keyboard.F5 = false
    //Mouse Movements
    if wiimote.Up
    mouse.y = mouse.y - 1/200
    if wiimote.Down
    mouse.y = mouse.y + 1/200
    if wiimote.Right
    mouse.x = mouse.x + 1/300
    if wiimote.Left
    mouse.x = mouse.x - 1/300
    Mouse.LeftButton = wiimote.Minus
    Mouse.RightButton = wiimote.Plus
  2. FAST6191

    FAST6191 Techromancer

    pip Reporter
    Nov 21, 2005
    United States
    I have no remote to use this with but nice going, I too know the unrivaled fun of presentations.
  3. Reepa

    Reepa Member

    Feb 3, 2007
    Have to say, thanks a lot for this!

    Used it on my uni presentation this morning, and wanted to make a good impression to the visiting industry members.

    The presentation was limited to 10 minutes exactly excluding questions, and this rumble feature saved my life, I knew to speed up the last couple of slides because of it, and managed to finish at 9:59!... literally "Thanks for listening"...RIIIIIIIING [​IMG]

    Got a few odd looks while carrying the wiimote with me into the room though [​IMG]
  4. xalphax

    xalphax Internet killed the Ponystar.

    Nov 18, 2006
    nice, thank you for this

    might put this to some good use ;-)
  5. mikeosoft

    mikeosoft GBAtemp Regular

    Dec 9, 2004
    United States
    yo bro im a northeastern university business administration undergrad and i gotta thank you for this. it'll def prove worthy to me with all these presentations i have to give. thanks a lot man
  6. Killian

    Killian Member

    Jul 18, 2006
    If I installed this GlovePIE does it actually overwrite anything on the Wiimote. May sound a bit of a stupid question but I want to be sure of it before I have a go. Thanks for designing the code too, I'm sure it will come in handy many times for me!

    Also, could you recommend a good compatible Bluetooth adapter?

    Thanks in advance guys,

  7. Renegade_R

    Renegade_R Audio/Video Expert

    Apr 21, 2004
    Toronto, Ontario
    I'm so glad you guys like it and have a use for it! Makes me feel good I can help my fellow student and business presenter alike!

    I just made two presentations with my Wiimote PowerPoint script. My first one was for my capstone project. I have to say, the Wiimote increased the confidence of my entire project team and needless to say. We got an A!! [​IMG]

    I also used the same Wiimote in a Communications presentation. I got a few funny looks but the professor was instantly impressed with the innovation I put into my presentation.

    Killian: GlovePIE will not overwrite anything in the Wiimote. When you are done with the program, you can hit the Power button on the Wiimote and it will desyncronize and it will work with the Wii again. As for a Bluetooth adapter, I use this one:

    Really cheap stuff. I think any new Bluetooth adapter will work great!
  8. Cyan

    Cyan GBATemp's lurking knight

    Global Moderator
    Oct 27, 2002
    Engine room, learning
    You had a good idea including rumble with estimated presentation time.

    I already though about using a wiimote for powerpoint presentation, but with mouse pointing at the screen with a homemade censor.
    I made one, and tried a script with mouse pointing, but it was a little slow to move the mouse on screen.
    I tried to change the screen resolution in the script, but wasn't good.

    I tried the wiimote with 2 IR spots, but maybe it's better at positionning the mouse with only one IR spot. (or 10IR 12V instead of 3V and 2 solo IR ^^; )

    I used this script for the mouse, found on :

    /* Direct Pointing Script With Wii-mote by Arianol v1.02 */
    /* This PIE requires that you have either one or two IR points to aim the
    Â Wiimote at. The Wii Sensor Bar is best for the two-point setting. At any
    Â time you can point the Wiimote away from the light and Press 1 to move
    Â your cursor back to center-screen. Please set the value of the following
    Â variable equal to your number of infrared points (1 or 2). */
    Â var.irAmount = 1 Â Â Â Â Â// 1 OR 2
    /* Set these numbers so that the cursor reaches the edges
    Â of your screen. (Defaults are both 1.1) */
    Â var.xStretch = 1.1
    Â var.yStretch = 1.1
    /* Region where no motion is detected (in pixels). ÂHigher values make the
    Â cursor jumpier, but more precise if you have unsteady hands */
    Â var.deadzone = 0
    /* Speed at which the cursor moves (Default 1/5). 1 is instantaneous. */
    Â var.Speed = 1/5
    // Remote Controls
          Up = Wiimote.Up           // Up
         Down = Wiimote.Down          // Down
         Left = Wiimote.Left          // Left
        ÂRight = Wiimote.Right         Â// Right
    Âmouse.LeftButton = Wiimote.A Â Â Â Â Â Â Â Â Â // Left Click
    mouse.middlebutton = Wiimote.B Â Â Â Â Â Â Â Â Â // Click MouseWheel
    mouse.RightButton = Wiimote.Minus        Â// Right Click
      ÂWindows + M = Wiimote.Home         // Show Desktop
         ÂEnter = Wiimote.Plus         // Enter
      Escape = Wiimote.Plus            // Escape
    Windows + M = Wiimote.Home            // Show Desktop
    // LED Lights
    Wiimote.Led4 = four
    Wiimote.Led3 = three
    Wiimote.Led2 = two
    Wiimote.Led1 = one
    /* Code for Pointing Mechanism
    Â ---------------------------
    Â Â Â Â Â Â ÂDo Not Modify */
    // If two dots are visible, find midpoint
    If var.irAmount = 2 Then
    Â var.xPos = (Wiimote.dot1x + Wiimote.dot2x) / 2
    Â var.yPos = (Wiimote.dot1y + Wiimote.dot2y) / 2
    Â var.xPos = Wiimote.dot1x
    Â var.yPos = Wiimote.dot1y
    If Wiimote.dot1vis Then        Â// If at least one IR point is visible
    Â // Locate Infrared Point(s)
    Â var.xPoint = (1-(round(var.xPos) / 1024)) * Screen.Width
    Â var.yPoint = ((round(var.yPos) / 768)) * Screen.Height
    Â // Create Virtual Grid System And Draw Point Coordinates
    Â var.xGrid = var.xPoint - (Screen.Width / 2)
    Â var.yGrid = var.yPoint - (Screen.Height / 2)
    Â // Find Cursor on Grid
    Â var.xCursor = Mouse.CursorPosX - (Screen.Width / 2)
    Â var.yCursor = Mouse.CursorPosY - (Screen.Height / 2)
    Â // Calculate Distance To Move
    Â var.xSpeed = (var.xGrid - var.xCursor)
    Â var.ySpeed = (var.yGrid - var.yCursor)
    Â // Calculate New Cursor Position
    Â If abs(var.xSpeed) > var.deadzone Then
    Â Â Âvar.xCursor = (var.xCursor + var.xSpeed * var.Speed) * var.xStretch
    Â EndIf
    Â If abs(var.ySpeed) > var.deadzone Then
    Â Â Âvar.yCursor = (var.yCursor + var.ySpeed * var.Speed) * var.yStretch
    Â EndIf
    Â // Move Cursor
    Â Mouse.CursorPosX = var.xCursor + (Screen.Width / 2)
    Â Mouse.CursorPosY = var.yCursor + (Screen.Height / 2)
    Â // Assign the One button
    Â Alt + Tab = Wiimote.One
    ElseIf Pressed(Wiimote.One) Then    // If no IR point is visible
    Â // Move Cursor Back to Center
    Â Mouse.CursorPosX = Screen.Width / 2
    Â Mouse.CursorPosY = Screen.Height / 2
    // Debug
    debug = 'Debug: Â Grid Coordinates: (' + var.xGrid + ', ' + var.yGrid + ')'
  9. Renegade_R

    Renegade_R Audio/Video Expert

    Apr 21, 2004
    Toronto, Ontario
    I don't think GlovePIE is meant for mouse movements. It always seemed a bit slow when emulating the mouse. This is why I settled for the arrow button press in the end. my communications class we were not allowed to point at the screen continuously [​IMG]

    I think the Wiimote needs more IR lights to plot itself...perhaps that could increase sensitivity.