This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
I2CFirmata.h - Firmata library | |
Copyright (C) 2006-2008 Hans-Christoph Steiner. All rights reserved. | |
Copyright (C) 2010-2011 Paul Stoffregen. All rights reserved. | |
Copyright (C) 2009 Shigeru Kobayashi. All rights reserved. | |
Copyright (C) 2013 Norbert Truchsess. All rights reserved. | |
Copyright (C) 2009-2016 Jeff Hoefs. All rights reserved. | |
This library is free software; you can redistribute it and/or | |
modify it under the terms of the GNU Lesser General Public |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Dependencies: | |
* - This code depends on the ArduinUnit library. Get it here: | |
* https://github.com/mmurdoch/arduinounit and copy it to your | |
* Arduino libraries folder. | |
* - You must use a Firmata client library that has the STRING_DATA | |
* message implemented (node-firmata, johnny-five, BreakoutJS) | |
* | |
* Copy this into a new Arduino file, compile and upload. | |
* It will report the available memory approximately every 10 seconds. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <ConfigurableFirmata.h> | |
#include <DigitalInputFirmata.h> | |
DigitalInputFirmata digitalInput; | |
#include <DigitalOutputFirmata.h> | |
DigitalOutputFirmata digitalOutput; | |
#include <AnalogInputFirmata.h> | |
AnalogInputFirmata analogInput; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Firmata is a generic protocol for communicating with microcontrollers | |
from software on a host computer. It is intended to work with | |
any host computer software package. | |
To download a host software package, please clink on the following link | |
to open the list of Firmata client libraries your default browser. | |
https://github.com/firmata/arduino#firmata-client-libraries |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*============================================================================== | |
* NETWORK CONFIGURATION | |
* | |
* You must configure your particular hardware. Follow the steps below. | |
* | |
* Currently StandardFirmataEthernet is configured as a client. An option to | |
* configure as a server may be added in the future. | |
*============================================================================*/ | |
// STEP 1 [REQUIRED] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Firmata is a generic protocol for communicating with microcontrollers | |
from software on a host computer. It is intended to work with | |
any host computer software package. | |
To download a host software package, please clink on the following link | |
to open the list of Firmata client libraries your default browser. | |
https://github.com/firmata/arduino#firmata-client-libraries |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Tested using node v0.12.7 | |
* npm install etherport-client | |
* npm install firmata | |
* | |
* To run in Debug mode: | |
* DEBUG=etherport-client node wifi-test | |
*/ | |
var Firmata = require("firmata").Board; | |
var EtherPortClient = require("etherport-client").EtherPortClient; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Board = require("firmata"); | |
Board.requestPort(function(error, port) { | |
if (error) { | |
console.log(error); | |
return; | |
} | |
var board = new Board(port.comName); | |
board.on("ready", function() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// treat the scope as read-only in views | |
// treat the scope as write-only in controllers | |
/** | |
* use attrs to read from scope | |
*/ | |
<div my-attribute="propName"> | |
app.directive('myDirective', function () { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset=utf-8 /> | |
<title>Hello World</title> | |
</head> | |
<body> | |
<button id="ledToggle">Toggle LED</button> | |
<p id="btnStatus"></p> | |
<script src="../../dist/Breakout.js"></script> |