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.
- Follow Electric Imp's Getting Started instructions to set up a wifi connection to your Electric Imp device.
- Once your Imp is setup, open the IDE (familiarize yourself here) and click Create New Model, give it a name and assign it to your device.
- Paste the contents of
agent.nutinto the Agent pane and
device.nutinto the Device pane:
- Expand the Active Model in the column on the left by click on the rightward arrow. The model will appear below, click on the model.
- Click Build and Run to finish preparing your Electric Imp.
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:
Blink an Led
The "Hello World" of microcontroller programming:
var Imp = ;var board =agent: processenvIMP_AGENT_ID;board;
Johnny-Five IO Plugin
var five = ;var Imp = ;var board =io:agent: processenvIMP_AGENT_ID;board;
See LICENSE file.