
Imp-io is a Firmata-compatibility IO class for writing node programs that interact with Electric Imp devices. Imp-io was built at Bocoup
To communicate with an Electric Imp using Johnny-Five w/ Imp-IO, you will need to upload the special Tyrion agent and device firmware through Electric Imp's IDE. We recommend you review Electric Imp's Getting Started before continuing.
agent.nut into the Agent pane and device.nut into the Device pane:

In the Electric Imp IDE, locate and copy the agent id, located in agent url Look for the agent id located in the agent url:

Store your agent ID in a dot file so it can be accessed as a property of process.env. Create a file in your home directory called .imprc that contains:
export IMP_AGENT_ID="your agent id"
Then add the following to your dot-rc file of choice:
source ~/.imprc
The "Hello World" of microcontroller programming:
var Imp = require("imp-io");
var board = new Imp({
agent: process.env.IMP_AGENT_ID
});
board.on("ready", function() {
console.log("CONNECTED");
this.pinMode(9, this.MODES.OUTPUT);
var byte = 0;
// This will "blink" the on board led
setInterval(function() {
this.digitalWrite(9, (byte ^= 1));
}.bind(this), 1000);
});
Imp-IO can be used as an IO Plugin for Johnny-Five:
var five = require("johnny-five");
var Imp = require("imp-io");
var board = new five.Board({
io: new Imp({
agent: process.env.IMP_AGENT_ID
})
});
board.on("ready", function() {
var led = new five.Led(9);
led.blink();
});
See LICENSE file.