日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問(wèn) 生活随笔!

生活随笔

當(dāng)前位置: 首頁(yè) > 编程资源 > 编程问答 >内容正文

编程问答

如何将Wii遥控器用作陀螺仪鼠标

發(fā)布時(shí)間:2023/12/9 编程问答 36 豆豆
生活随笔 收集整理的這篇文章主要介紹了 如何将Wii遥控器用作陀螺仪鼠标 小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

If you have a spare Nintendo Wii remote with the Motion Plus add-on, you can use it to control your Windows PC from across the room. Here’s how to get it working in a couple of easy steps.

如果您有帶Motion Plus附加組件的備用Nintendo Wii遙控器,則可以使用它在整個(gè)房間內(nèi)控制Windows PC。 這是通過(guò)幾個(gè)簡(jiǎn)單的步驟使其運(yùn)行的方法。

Using the Wii’s Motion Plus add-on and some software, you can easily control presentations or your home theater PC.? You will need:

使用Wii的Motion Plus附加組件和某些軟件,您可以輕松控制演示文稿或家庭影院PC。 你會(huì)需要:

  • A Wii remote (obviously)

    Wii遙控器(顯然)
  • The Motion Plus add-on

    Motion Plus附加組件
  • Windows XP, Vista, or 7

    Windows XP,Vista或7
  • A Bluetooth dongle for your PC

    適用于PC的藍(lán)牙加密狗
  • The WIDCOMM Bluetooth stack (from Broadcom’s website) (version 6.2.1.100 at the time of writing)

    WIDCOMM藍(lán)牙堆棧(來(lái)自Broadcom的網(wǎng)站) (在撰寫(xiě)本文時(shí)為版本6.2.1.100)

  • GlovePIE with Emotiv support (from the GlovePIE Project website) (version 0.43 at the time of writing)

    在Emotiv支持下的GlovePIE(來(lái)自GlovePIE Project網(wǎng)站) (撰寫(xiě)本文時(shí)為0.43版)

  • 軟體 (The Software)

    The WIDCOMM Bluetooth stack allows you to pair your computer with the Wii remote without using a code.? That’s the key piece to getting it working, and although the BlueSoleil stack can do this as well if not better, it’s not free.? After the pairing is complete, the GlovePIE application will run a script that takes your controller input and translate that into mouse emulation.? With some tweaking, you can extend the functionality of your makeshift mouse and even use it as a joystick/gamepad.

    WIDCOMM藍(lán)牙堆棧使您無(wú)需使用代碼即可將計(jì)算機(jī)與Wii遙控器配對(duì)。 這是使其正常工作的關(guān)鍵,盡管BlueSoleil堆棧即使不是更好也可以做到這一點(diǎn),但它不是免費(fèi)的。 配對(duì)完成后,GlovePIE應(yīng)用程序?qū)⑦\(yùn)行一個(gè)腳本,該腳本接受您的控制器輸入并將其轉(zhuǎn)換為鼠標(biāo)仿真。 通過(guò)一些調(diào)整,您可以擴(kuò)展臨時(shí)鼠標(biāo)的功能,甚至可以將其用作操縱桿/游戲手柄。

    硬體 (The Hardware)

    You need a compatible Bluetooth dongle to communicate with your Wii remote, and they can be found cheaply online if your computer doesn’t have one built-in already.? Using an alternative Bluetooth stack actually allows a wider compatibility with adapters, a very useful side-effect.? You can even use one that’s meant for wireless headphones or the like, as long as it uses Bluetooth.

    您需要一個(gè)兼容的藍(lán)牙加密狗才能與Wii遙控器進(jìn)行通信,如果您的計(jì)算機(jī)尚沒(méi)有內(nèi)置的加密狗,可以在網(wǎng)上便宜地找到它們。 實(shí)際上,使用備用藍(lán)牙堆棧可以實(shí)現(xiàn)與適配器的廣泛兼容性,這是非常有用的副作用。 您甚至可以使用無(wú)線耳機(jī)之類的耳機(jī),只要它使用藍(lán)牙即可。

    Strictly speaking, you don’t need the Motion Plus add-on.? GlovePIE can take Wii remote input and use the pitch and yaw to move the cursor, but this doesn’t work very fluidly.? The controller can also use two IR light sources as an absolute reference point, which is how it works with the Wii itself, and get a more fluid movement.? You can even use two candles to get the same effect.? What makes the Motion Plus approach worthwhile is that you get a more fluid movement than using just the controller, while simultaneously not having to rely on the IR sources.? This makes it ideal for a quick setup for presentations, or when you’ve got daylight streaming in on your home theater setup.

    嚴(yán)格來(lái)說(shuō),您不需要Motion Plus附加組件。 GlovePIE可以接受Wii遠(yuǎn)程輸入,并使用音高和偏航來(lái)移動(dòng)光標(biāo),但這并不是很流暢。 控制器還可以使用兩個(gè)IR光源作為絕對(duì)參考點(diǎn),這就是它與Wii本身一起工作的方式,并獲得了更加流暢的運(yùn)動(dòng)。 您甚至可以使用兩支蠟燭來(lái)獲得相同的效果。 使Motion Plus方法值得的是,與僅使用控制器相比,您獲得了更多的流暢運(yùn)動(dòng),同時(shí)又不必依賴紅外光源。 這使得它非常適合用于演示文稿的快速設(shè)置,或者在家庭影院設(shè)置中有日光流進(jìn)時(shí)。

    安裝軟件 (Installing the Software)

    First, get your Bluetooth dongle plugged in and enabled.? This will vary from computer to computer and dongle to dongle, but you can skip installing drivers and extra software if you only want to use it for this, as the WIDCOMM stack includes its own drivers.

    首先,插入并啟用藍(lán)牙加密狗。 這將因計(jì)算機(jī)的不同而有所不同,從軟件狗到軟件狗也有所不同,但是如果您只想為此使用驅(qū)動(dòng)程序和其他軟件,則可以跳過(guò)安裝驅(qū)動(dòng)程序和其他軟件的步驟,因?yàn)閃IDCOMM堆棧包括其自己的驅(qū)動(dòng)程序。

    Next, download the WIDCOMM Bluetooth stack and double-click to install it.? Accept the license agreement and agree when it prompts you to install software.

    接下來(lái),下載WIDCOMM藍(lán)牙堆棧并雙擊以安裝它。 接受許可協(xié)議并在提示您安裝軟件時(shí)同意。

    After the installation is finished, you should see a Bluetooth icon in your system tray, like so:

    安裝完成后,您應(yīng)該在系統(tǒng)托盤(pán)中看到一個(gè)藍(lán)牙圖標(biāo),如下所示:

    That takes care of half of the software.? Next, download GlovePIE (with Emotiv support) and unzip the file.? Inside the folder you’ve just created, you’ll see a file called GlovePIE, which is what we’ll use to script the inputs.

    這將處理一半的軟件。 接下來(lái),下載GlovePIE(具有Emotiv支持)并解壓縮文件。 在剛創(chuàng)建的文件夾中,您會(huì)看到一個(gè)名為GlovePIE的文件,這是我們用來(lái)編寫(xiě)輸入腳本的文件。

    連接Wii遙控器 (Connecting the Wii Remote)

    Right-click on the system tray icon, and go to “Add a Device.”

    右鍵單擊系統(tǒng)任務(wù)欄圖標(biāo),然后轉(zhuǎn)到“添加設(shè)備”。

    Next up, you’ll see a screen that says it’s searching for Bluetooth-enabled devices.? Hit the 1 + 2 buttons on your Wii remote now.

    接下來(lái),您將看到一個(gè)屏幕,顯示正在搜索支持藍(lán)牙的設(shè)備。 立即點(diǎn)擊Wii遙控器上的1 + 2按鈕。

    You’ll see an input device named “Nintendo RVL-CNT-01” pop up in the window.? Select it and hit Next.

    您會(huì)在窗口中看到一個(gè)名為“ Nintendo RVL-CNT-01”的輸入設(shè)備。 選擇它,然后單擊下一步。

    In the next pane, you’ll be asked how you’d like to pair with the device.? Choose “Pair without using a code.”

    在下一個(gè)窗格中,將詢問(wèn)您如何與設(shè)備配對(duì)。 選擇“無(wú)需使用代碼即可配對(duì)”。

    You should then see a screen that says it’s been paired and Windows is installing the necessary drivers for the device.

    然后,您應(yīng)該看到一個(gè)屏幕,上面顯示已配對(duì),并且Windows正在為設(shè)備安裝必要的驅(qū)動(dòng)程序。

    GlovePIE設(shè)置 (GlovePIE Setup)

    Open up GlovePIE with a quick double-click, and hit “Yes” at the security prompt.? You’ll see a complicated looking window like this:

    快速雙擊打開(kāi)GlovePIE,然后在安全提示下單擊“是”。 您會(huì)看到一個(gè)看起來(lái)很復(fù)雜的窗口,如下所示:

    Don’t let that intimidate you!? Just go to File > Open, navigate into your GlovePIE folder, and head into the “WiimoteScripts” folder.

    不要讓那嚇到你! 只需轉(zhuǎn)到“文件”>“打開(kāi)”,導(dǎo)航到您的GlovePIE文件夾,然后轉(zhuǎn)到“ WiimoteScripts”文件夾。

    Choose the “l(fā)ednerg WiiMotion Plus Mouse.PIE” script, and click Open.? You’ll see the main GlovePIE window displaying the script.

    選擇“ lednerg WiiMotion Plus Mouse.PIE”腳本,然后單擊“打開(kāi)”。 您將看到GlovePIE主窗口顯示該腳本。

    Click on the “Run” button to execute the script.? You should see your Wii remote’s LEDs change configuration, from 1 and 4 being lit, to 2 and 3 being lit, and finally, only 1 will be lit.

    單擊“運(yùn)行”按鈕執(zhí)行腳本。 您應(yīng)該看到Wii遙控器的LED更改配置,從1和4點(diǎn)亮到2和3點(diǎn)亮,最后只有1點(diǎn)亮。

    If you see a little sign next to the “Run” button that says “Motion Plus not detected!” just click “Stop,” make sure it’s inserted properly into the Wii remote, and try again.? It may take one or two tries but soon it’ll be properly interfacing with GlovePIE.

    如果您在“運(yùn)行”按鈕旁邊看到一個(gè)小標(biāo)志,上面寫(xiě)著“未檢測(cè)到Motion Plus!” 只需單擊“停止”,確保將其正確插入Wii遙控器,然后重試。 可能需要一兩次嘗試,但很快它將與GlovePIE正確連接。

    使用陀螺儀鼠標(biāo) (Using Your Gyroscopic Mouse)

    The “B” button on the bottom of the controller enables the cursor to move.? If you let go of it and reposition the controller, when you hit B next, it will continue holding the cursor from that position.? The movement sort of like using a touchpad on a laptop, where holding “B” is like having your finger touch the pad.? Sometimes, you’ve moved too far on the pad and need to lift your finger and move it to continue pushing the cursor.

    控制器底部的“ B”按鈕使光標(biāo)移動(dòng)。 如果放開(kāi)它并重新定位控制器,則當(dāng)下次按下B時(shí),它將繼續(xù)從該位置保持光標(biāo)。 動(dòng)作就像在筆記本電腦上使用觸摸板一樣,按住“ B”就像是用手指觸摸觸摸板一樣。 有時(shí),您在墊板上的移動(dòng)距離過(guò)長(zhǎng),需要抬起手指并移動(dòng)它才能繼續(xù)按光標(biāo)。

    The “A” button acts as a left-click, the “Plus” button acts as a right-click, and “Down” on the directional pad acts as a middle-click.? The buttons work just like mouse buttons; they click when you push down on the button and unclick when you let go.

    “ A”按鈕充當(dāng)左鍵單擊,“ Plus”按鈕充當(dāng)右鍵單擊,方向盤(pán)上的“ Down”充當(dāng)中鍵單擊。 這些按鈕的工作方式類似于鼠標(biāo)按鈕。 當(dāng)您按下按鈕時(shí)它們會(huì)單擊,放開(kāi)時(shí)它們會(huì)單擊取消。

    Almost happy with the script, I’ve ended up tweaking it to my favor.? After the first block of text, you can insert the following lines:

    我?guī)缀鯇?duì)腳本感到滿意,但最終對(duì)其進(jìn)行了調(diào)整,使其對(duì)我有利。 在第一段文本之后,您可以插入以下行:

    mouse.WheelUp = wiimote.Onemouse.WheelDown = wiimote.Two

    mouse.WheelUp = wiimote.Onemouse.WheelDown = wiimote.Two

    It should look like this:

    它看起來(lái)應(yīng)該像這樣:

    When this is run, you’ll get the added benefit of being able to use the 1 and 2 buttons to scroll up and down, respectively.? If you want to disconnect your controller, hold the power button until the LEDs turn off, and to reconnect, just hold down the 1 + 2 buttons to auto-pair with your PC.

    運(yùn)行此命令時(shí),您將獲得額外的好處,即能夠分別使用1和2按鈕上下滾動(dòng)。 如果要斷開(kāi)控制器的連接,請(qǐng)按住電源按鈕直到LED熄滅,然后重新連接,只需按住1 + 2按鈕即可與PC自動(dòng)配對(duì)。

    Come up with clever uses of your own, or have a favorite GlovePIE script?? Be sure to share with us in the comments.

    想出自己的聰明用法,還是喜歡一個(gè)GlovePIE腳本? 請(qǐng)務(wù)必在評(píng)論中與我們分享。

    翻譯自: https://www.howtogeek.com/howto/35470/how-to-use-your-wii-remote-as-a-gyroscopic-mouse/

    總結(jié)

    以上是生活随笔為你收集整理的如何将Wii遥控器用作陀螺仪鼠标的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。

    如果覺(jué)得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。