Simplified Electric Imp to Arduino Due Tutorial

This is a basic tutorial to send information from the Electric Imp to the Arduino Due through UART (RX, TX) I am pretty new to both so some things I write may be incorrect. Most of the information I got from

Electric Imp to the Arduino

If you know how to program well that tutorial may be way better then this one, but I thought this would be a more basic and easier tutorial for people to use.

Step 1: Connect Everything Up

First you have to solder the headers into the electric imp shield, to power it you need to have 5V and GND connected from the Arduino Due to the Electric Imp Shield so these are really the only ones you have to solder but its better to do at least a row as you can see in the pictures.
You then need to place the Electric Imp card into the shield. I’m Assuming if everything is commissioned already this part is probably all already done.

Step 2: Actually Connecting the Arduino Due with the Electric Imp

Since this is the Arduino Due, you unfortunately can’t use software serial library as far as I am aware, due to this you have to use the hardware serials on the Arduino and the Software on the electric imp.

It’s important to look at the schematic of the Arduino Shield for the imp
Hosted by SparkFun

On here you can see that for the UART the RX and TX for software is on holes 8 and 9 of the arduino shield.
So we will connect a cable from each of this to the hardware UART Rx and Tx of the Arduino Due. I use RX1 (input 18) and Tx1 (input 19) but note that the Rx of the Imp Shield connects to the Tx of the Arduino Due, and the Tx of the imp shield connects to the Rx of the Arudino Due.
That way you can transfer with the shield and read with the arduino, or read with the shield and transfer with the arduino.

Electric Imp to the Arduino connection

Step 3: Coding the Imp

With the Electric Imp connected, go onto your imp account and create a new code under the code tab. and name it however you like. The code will be pretty simple and just output “hello world” to the Arduino then it will wait 5 seconds and repeat again.

This details can all be obtained from which explains it really well but I will go through my code still.
First we configure the pins as follows, if you remember from the schematic before uart57 connects to pins 8 and 9 of the software serial of the imp shield. A baud rate of 19200 is used for both the shield and the arduino that we used before. 8 Bits are sent and no parity bit.
hardware.uart57.configure(19200, 8, PARITY_NONE, 1, NO_CTSRTS);

We then create the function that writes “hello world” to the UART using the hardware.write

function write()
imp.wakeup(5.0, write);
hardware.uart57.write(“hello world”);

I then call this function every 5 seconds, you can change this time but it just seems like around a nice time to see it work easily
imp.wakeup(5.0, write);

After that, thats it, press the save and run button on the Electric Imp online code, and make sure you change it in the planner tab to make sure the code you just made is the one that is running.

[box color=”#985D00″ bg=”#FFF8CB” font=”verdana” fontsize=”14 ” radius=”20 ” border=”#985D12″ float=”right” head=”Major Components in Project” headbg=”#FFEB70″ headcolor=”#985D00″]Things You Need:
Electric Imp Shield
Commissioned Electric Imp (
Electric Imp Account
Arduino Due
1 USB to Arduino Cable
2 Wires
2 Headers[/box]

About The Author

Ibrar Ayyub

I am an experienced technical writer with a Master's degree in computer science from BZU Multan University. I have written for various industries, mainly home automation, and engineering. I have a clear and simple writing style and am skilled in using infographics and diagrams. I am a great researcher and is able to present information in a well-organized and logical manner.

Scroll to Top