web-arduino
v0.0.3
Published
A Web Component to control an Arduino device.
Downloads
8
Maintainers
Readme
Web Arduino
A Web Component to control an Arduino device.
Import It in Your Project
- Download: Run
bower install web-arduino
ornpm install web-arduino
. - Import: Add
<link id="webArduino" rel="import" href="path/to/web-arduino/web-arduino.html">
in your Web app.
Examples
Blink a LED.
<web-arduino id="arduino" device-name="ARDUINO"></web-arduino>
<script>
var arduino = document.querySelector('#arduino');
arduino.onconnected = function() {
arduino.d7 = Arduino.HIGH;
setInterval(function() {
arduino.d7 = !arduino.d7;
}, 1000);
});
</script>
Platform Compatibility
- Firefox OS 3.0.0.0-prerelease