Pages: [1]   Go Down
Author Topic: Read Arduino from JavaScript  (Read 280 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 41
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi, Im just looking for a simple example of how I might poll an arduino, with an accelerometer, from within the game loop of a javascript program. Basically I'm wanting to swing a physical bat to swing a bat in-game.
Thanks!
Logged

UK
Offline Offline
Shannon Member
****
Karma: 223
Posts: 12630
-
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Is there a network connection between the application that is hosting the javascript, and the Arduino? If so, design a protocol between the two that meets your bandwidth/latency requirements. For example, you might choose to run a long-running query over HTTP.
Logged

I only provide help via the forum - please do not contact me for private consultancy.

Pages: [1]   Go Up
Jump to: