小编mad*_*man的帖子

如何让 Wii 遥控器与 Three.js 进行通信?

如果我通过蓝牙将 Wii Remote 连接到带有 Wiican 和 Wmgui 之类的 Ubuntu 笔记本电脑,那么显示 Wii Remote 与浏览器交互的基本程序是什么?

我已经能够让 Xbox 游戏手柄与 chrome 兼容,这并不难。但这对于 Wii 来说可能吗?首先是向上、向下、向左、向右工作和按钮,然后可能是加速度计输入!

我想我希望将其组合起来: http://stemkoski.github.io/Three.js/Mesh-Movement.html -movement 和 https://github.com/s-haha-n/GameTPS /blob/master/sample.html -我的示例 Xbox 游戏手柄输出页面。

对于这样的事情我应该从哪里开始呢?Gamepad.js 能与 Wii 遥控器一起使用吗?

javascript bluetooth three.js

5
推荐指数
1
解决办法
1308
查看次数

如何在 C 中将文本文件的行读入大字符串?

读文件.c

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
int main(int argc, char **argv) {
      /*For File input, I'm copying the lines of the file into a 
       * large string with fgets*/
        FILE *filePtr;

        char buffIter[200];//How much fgets iterates by???
        char *pToken;      //Should hold the large string.

        filePtr = fopen(argv[2],"r");// the filename is passed as the second argument

        while(fgets(bufferIter, 200, filePtr){ ...?

                  filePtr = something?


      /*For File input*/
}
Run Code Online (Sandbox Code Playgroud)

我希望上面的程序将整个文件读入 C 中的字符串中。我希望 filePtr 是该字符串,如果 example.txt 如下所示:

This is a test …
Run Code Online (Sandbox Code Playgroud)

c string fgets

0
推荐指数
1
解决办法
114
查看次数

标签 统计

bluetooth ×1

c ×1

fgets ×1

javascript ×1

string ×1

three.js ×1