Hello.

I have a open android java code called cellbots from GOOGLE, that make a cellphone stream video to a website and the website have javascript that transmit back robot control by pressing arrow keys and then send it to robot by bluetooth.
But it also make the phone work as a hand controller for the robot where it send stepless control by bluetooth.

The code can control 4 types of robots and I use the NXT robot.

I try to see in the code how it listen to commands from the website and how it send stepless commands from the phone.
But I can't understand / find the code.

Can anybody explain to me where it
1: listen to incoming website commands from index.html
2: listen to stepless hand control phone commands
3: transform it to bluetooth commands
4: send it by bluetooth to the NXT robot
and if it is possible to make it listen to stepless commands from the website?

Here is the index.html website code.

https://code.google.com/p/cellbots/s...ets/index.html

HTML Code:
if (evt.keyCode == keyCodes.SPACE)
            sendAction('s');
        else if (evt.keyCode == keyCodes.ARROWUP && prevAction != 'f') {
            sendAction('f');
        } else if (evt.keyCode == keyCodes.ARROWDOWN && prevAction != 'b') {
            sendAction('b');
        } else if (evt.keyCode == keyCodes.ARROWRIGHT && prevAction != 'r') {
            sendAction('r');
        } else if (evt.keyCode == keyCodes.ARROWLEFT && prevAction != 'l') {
            sendAction('l');
        }
----
    function sendAction(act) {
        prevAction = act;
        sendPut('command.php', act);
    }
---
    function sendPut(str, content) {
        var xhr = new XMLHttpRequest();
        xhr.open("PUT", "http://" + ipPort + "/" + str);
        xhr.send(content);
    }
Here is a WIKI that explain how it can send commands from phone to robot by bluetooth I guess.

https://code.google.com/p/cellbots/s...mentation.wiki

I guess it is here it listen for commands from the website but I do not understand exactly where and how.

https://code.google.com/p/cellbots/s...s%2Fhttpserver

I guess it is somewhere here it send commands to the robot by bluetooth.

https://code.google.com/p/cellbots/s...trollerservice


Thanks

-