Introducing our online development environment
Electric Imp’s impCentral™ provides all of the tools you need to deploy the software that will control your imp-enabled connected products. In this section, we’ll quickly run through impCentral’s key features so you’re ready to begin your first impAccelerator™ Fieldbus Gateway 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.
If you’re not signed into impCentral already, open it by visiting impcentral.electricimp.com and sign in using the account log-in details you created earlier.
impCentral comprises three areas:
Let’s put impCentral to use to get your Fieldbus Gateway loaded with code.
Your newly configured Fieldbus Gateway 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 Fieldbus Gateway is currently ‘unassigned’, which simply means that it is not yet associated with any application. Right now, all you should see is your Fieldbus Gateway’s unique device ID in the DEVICE ID/NAME column:
Before we go on to create the software that your Fieldbus Gateway 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 imp005 module like you have in your Fieldbus Gateway, or it could be one of a number of other imp modules. A device is the combination of imp and other hardware components. With the Fieldbus Gateway, the device is the combination of the imp005, its host board and the other hardware components it contains. Because the imp is just one part of the device, it is devices which are represented in impCentral, not imps.
Your Fieldbus Gateway’s current name isn’t a very helpful or friendly, so let’s change it. The name your Fieldbus Gateway 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 Fieldbus Gateway 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 Fieldbus Gateway. For the Fieldbus Gateway 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 Fieldbus Gateway by name or device ID, select the checkbox alongside it and click Assign.
Now that you have assigned your Fieldbus Gateway to the Test Hardware Development 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 Fieldbus Gateway");
If your Fieldbus Gateway is powered up and connected to the Internet, click Build and Force Restart. You won’t see the Fieldbus Gateway do anything, but the log pane should show:
[Status] Downloading new code; 0.13% program storage used
[Device] Hello from the Fieldbus Gateway
Your simple, one-line program is running. You’re now ready to run some real software — which we’ll do in the next section.