Charles
Charles

Reputation: 648

Control push JavaScript commands to a website through Arduino

I have an HTML5 ping pong game. You can check it out at (http://pong.hackrdojo.com/). How do I make a controller, where I can use a breadboard interface with two buttons all linked to an Arduino microcontroller for moving the paddle up and down?

Upvotes: 0

Views: 364

Answers (2)

steve
steve

Reputation: 21

An even easier method is to buy an arduino leonardo board (cheap on ebay). There is demo code to create a keyboard.

  1. Map your pots and switches to a specific key like up down on keyboard etc.
  2. If you are using windows you could then use a program called glovepie that lets you set up profiles to remap the key for the specific key to the game to save reprogramming the arduino for each game.

Have fun making out there game controllers. That's how I did it and it works beautifully.

Upvotes: 2

Charles
Charles

Reputation: 648

Right now I am going with Aknosis' solution of using Johnny Five(https://github.com/rwldrn/johnny-five)

I am open to any other alternatives.

Upvotes: 0

Related Questions