Using Wiimote's accelerometter as input

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
Posts: 9
Joined: Tue Sep 04, 2018 5:23 pm

Using Wiimote's accelerometter as input

Post by Pordrack » Tue Aug 20, 2019 1:18 pm

    Hi ! I had an idea of game where the wiimote would be used as Swords, I searched on the forum for Wiimotes library, but only found 7 years olds forums, and since love2d changes pretty fast... So , is there a way to use accelerometter as input ? Or to controle the light of the wiimote ? Or to output sound through the wiimote ?

    nameless tee
    Posts: 8
    Joined: Mon Apr 22, 2019 8:16 am

    Re: Using Wiimote's accelerometter as input

    Post by nameless tee » Thu Aug 22, 2019 2:08 pm

    If you want to use the WiiMote you're going to need an external library for that. You could use wiiuse ( like this forum member ( ... te#p164826) did.

    What they were doing is building a dynamically linked library/shared object that can be used with lua. It might be easier to skip that step and instead use luajits ffi to load the library directly. Here ( is a tutorial that shows how to do that (the zlib example). The drawback of using a library is that you have to compile wiiuse for every platform you want to support and ship the library with your game.

    If you're really sure that all you need is the accelerometer (and not the gyroscope) and you want a lovelier solution you could ditch the Wiimote and use an android phone instead. On android love2d exposes the accelerometer as a joystick, so you could write an application that sends the accelerometer data to a PC using enet if the PC and the phone are on the same network.

    Post Reply

    Who is online

    Users browsing this forum: No registered users and 16 guests