Remote Android sensor node

Week ago I came to conclusion that my laptop would be to slow for rapid developing android game. Yes, I know I could develop on other target and at the end move to android. But my input was accelerometer and that was a problem.

Started thinking about using accelerometer on phone as remote joystick for browser target. Found out there was a function in Kha, Http.request which is underneath for browser target XMLHttpRequest API. So I wrote little android app which is serving accelerometer data on desired port in json format. Next thing I modified Sensor Coords node so It could accept data from android app.

But It didn’t go well. There were some hiccups in input. At first I tought maybe it is because of sending unfiltered accelerometer data and then in node setup creating low pass filter. Maybe I should do low pass filter on android side and then send data(some kind of optimisation). It was better but still not good.

It sad that there is no way to do UDP connection in browser.
At least I tried :smiley:

Here is some picture and video.


There might be a way to do UDP in Krom? Then you could develop your app using Krom and and connect to your android sensor like you were thinking. I like the idea.

Also, Krom is supposed to be comming to Android soon, so that would make android builds just as fast as desktop builds. That will be great. :slight_smile:

1 Like