I apologise if this is a dumb question, but I'm trying to find information on whether or not this is possible. I'd like to build a arcade machine to play my custom Javascript 2D game. The game currently runs in the browser (of course), but is it possible to execute the code in the Arduino. I'd like to make an arcade machine that runs from the Arduino and connect the game controls to a joystick. Can anyone tell me is this is possible, or any suggestions about how I can achieve this without rewriting the application.

I found the below link that has some information but this is for a PI https://www.raspberrypi.org/forums/viewtopic.php?t=194808

  • You're probably better off using a Raspberry Pi (or actual small PC). It is not going to run on Arduino w/o re-writing it to Arduino/C/C++. – Paul Mar 22 '19 at 17:41

The Arduino cannot run Javascript, no.

It could serve Javascript from an SD card to a web browser running on a PC / Pi / Phone, etc, but there is no way it can run it itself.

| improve this answer | |
  • Thanks for the reply, So it is possible to run the game from an SD card in the browser that would be on the device. I just need to figure out if I can read the input from a joystick and read that input in the browser – themanwiththemasterplan Mar 18 '19 at 21:34
  • 1
    There is no browser on an Arduino. The Ardunio would just be a (slow) web server to some other device. Which is pretty pointless, since whatever device it sends the javascript to would be a far better candidate for serving the javascript. – Majenko Mar 18 '19 at 21:36
  • 1
    Think about it - you can't even connect a monitor to an Arduino. How could you run a browser? How would you see it? – Mark Smith Mar 18 '19 at 21:37
  • this is true, thanks for your help. I think the best solution is to run the application from a laptop. But thanks for the fast answer! – themanwiththemasterplan Mar 18 '19 at 21:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.