Javid Jamae
Javid Jamae

Reputation: 8999

Controlling an Arduino device from a browser plugin/extension

I want to create a browser plugin or extension that I can use to control an Arduino device. The Arduino device would be connected to a user's computer through USB. The user would visit a website which the plugin would recognize and download instructions that would be used to control the device locally.

The preference is that the user only needs to install a browser plugin, and not have to install any separate software on their machine.

What would be a good way to connect the browser to the Arduino device. I'd prefer to have a solution that would work on any browser.

One thought was to communicate with the Arduino device using node.js (or some other webserver), but that would mean that I'd have to install a node.js server along with the browser plugin. I couldn't find any information out there on how to do this. I'm open to considering any language / framework.

Update: The Arduino device that I'm using is the Teensy 2.0 USB Board (http://www.pjrc.com/store/teensy_pins.html). The reason we went with this device is that there is no COM/Serial conversion so it gives full USB 2.0 throughput. The smaller device also works better for the form-factor of the device we're building.

Upvotes: 3

Views: 1289

Answers (2)

Yansky
Yansky

Reputation: 4760

The Arduino programming language is based on the Wiring programming language which has a tutorial here about using flash to communicate with the board: http://wiring.org.co/learning/tutorials/flash/index.html

(note: it does use an executable though for the server/proxy).

Upvotes: 0

Maks
Maks

Reputation: 7935

If you want to stick with only requiring a browser plugin and only requiring the device be plugged into the host computers USB port, than using Java is one solution.

The Java applet would need to be signed, though using a self-signed cert should be alright. In the context of Java applets, this has been asked a number of times on SO that should help you get started:

  1. signed applet
  2. java usb library

Do be aware that there are numerous issues with using the Java browser plugin and users need to accept the plugins security prompt to "trust" your applet.

Upvotes: 1

Related Questions