Electric Imp’s impCentral provides all of the tools you need to deploy the software that will control your imp-enabled connected product. In this section, we’ll quickly run through impCentral’s key features so you’re ready to begin your first impExplorer Developer Kit program, which we’ll cover in the next section.
impCentral runs in a desktop web browser. It has been optimized for Firefox and Google Chrome, but it will run in other popular browsers on Linux, macOS and Windows, such as Safari and Edge. Internet Explorer is not supported.
impCentral comprises three areas:
Let’s put impCentral to use to get your impExplorer™ Developer Kit loaded with code.
Your newly configured impExplorer Developer Kit was bound to your account by the BlinkUp™ operation you performed in the previous section. Click on the first icon () in the Top Bar over on the right-hand side. This is the devices menu, and from it select My Development Devices to view a list of devices added to your account. Your impExplorer Developer Kit is currently ‘unassigned’, which simply means that it is not yet associated with any application. Right now, all you should see is your impExplorer Developer Kit’s unique device ID in the DEVICE ID/NAME column:
Before we go on to create the software that your impExplorer Developer Kit will run, it’s necessary to talk about a fundamental aspect of Electric Imp terminology: what is a ‘device’ and what is an ‘imp’.
An imp is a component which brings Internet connectivity and computing intelligence to your connected device. It might be an imp001 card like you have in your impExplorer Developer Kit, or a soldered down module like the imp003, inp004m or imp005. A device is the combination of imp and other hardware components. With the impExplorer Developer Kit, the device is the combination of the imp001 card, its host board and any other hardware you add, such as sensors, displays, buttons and switches.
Because the imp is just one part of the device, it is devices which are represented in impCentral, not imps. Imagine that you have two impExplorer Developer Kits, both listed in impCentral and set to run very different applications. At any time, you can swap these devices’ imp001 cards round, but the devices will still work correctly. Each imp001 automatically gets the software it needs to ensure the device functions properly. The imp always ‘inherits’ the behavior of the device it’s fitted into, and that’s why impCentral focuses on devices rather than imps.
Your impExplorer Developer Kit’s current name isn’t a very helpful or friendly, so let’s change it. The name your impExplorer Developer Kit has at first is its unique ID code, which it will retain even if we change the name under which the device appears in impCentral.
Note This functionality has not yet been implemented in impCentral yet. We’ll update this section when it has been added. You can still continue with this tutorial.
Your impExplorer Developer Kit is currently listed as an unassigned device. This is because it hasn’t been told which software it will run. No software is assigned by default, so we need to create some. impCentral organizes device and code as follows:
An Electric Imp application comprises two parts: one half runs on the device and which we’ll write in the next section, while the other half runs in the cloud; we’ll write that later on.
Move your mouse pointer into the nav bar and click on your account name. You will now seen a list of your Products. It’s empty, so click the Create New Product button over at the top right. This will call up the Create Product panel, which invites you to enter the Product’s name and the name of its first Development Device Group. Enter Connected Product into the Product field, and Test Hardware into the Development Device Group field, then click Create:
impCentral takes you straight to your new Development Device Group’s code editor, which you’ll use to develop application code. To test that code, you need hardware, such as your impExplorer Developer Kit. For the impExplorer Developer Kit to run the code you develop in the Device Group, it needs to be ‘assigned’ to that Group. Let’s do that now.
Look in the log pane at the bottom of the window and you’ll see a link titled Assign devices — click this now:
A panel will appear which allows you to select one or more of the development devices linked to your Electric Imp account and assign them to the current Development Device Group:
Find your impExplorer Developer Kit by name or device ID, select it and click Assign.
Now that you have assigned your impExplorer Developer Kit to the Test Hardware Device Group, you need to write some code for it to run. The code editor features three panes: one each for the agent code and device code that make up your application, and a third which displays a list of the devices assigned to the current Device Group. Select one of those devices and you’ll see in a space to the right the messages it has logged.
Above these three panes, you’ll see some buttons. The first allows you your current code draft or earlier code revisions. The second, Build and Force Restart, causes the device code to be deployed to all the devices assigned to the Device Group. Next is a button you can use to check the syntax of code you’ve entered. If your account has production permissions, you will also see a Promote button too, but that’s not something we’ll be exploring here.
Click on the device code pane and type in the following:
server.log("Hello from the impExplorer Developer Kit");
If your impExplorer Developer Kit is powered up and connected to the Internet, click Build and Force Restart. You won’t see the impExplorer Developer Kit do anything, but the log pane should show:
[Status] Downloading new code; 0.13% program storage used [Device] Hello from the impExplorer Developer Kit
Your simple, one-line program is running. You’re now ready to run some real software — which we’ll do in the next section.