Procedure to Autostart the Arduino Sketch on an Intel Edison board

By Promotion | Published on 16 May 2017
Procedure to Autostart the Arduino Sketch on an Intel Edison board

There are many ways to do this, but on the Intel® Edison board, I found that the easiest way is using the /etc/init.d directory.  If this is your first time using init.d for start-up scripts, you’re going to have to first create the directory. Else, skip to Step 2:

Step 1

root@edison:~# mkdir /etc/init.d

Now let's switch into that directory.

Step 2

root@edison:~# cd /etc/init.d

Next, we’re going to create a bash script in this folder that contains our boot commands. In this case, we’re automating the Arduino sketch to run at startup.

In any case, open your favorite text editor and create the script

root@edison:/etc/init.d# vi

Add the following contents into the script.


exec /sketch/sketch.elf /dev/ttyGS0 /dev/ttyGS0

Really, it’s just the two commands.

Now we can make the script executable by changing the permissions with chmod.

root@edison:/etc/init.d# chmod +x /etc/init.d/
root@edison:/etc/init.d# chmod +x

Now, to make sure this script is executed every time Linux* boots, issue the following command and wait for the response shown below:
oot@edison:/etc/init.d# update-rc.d defaults

Adding system startup for /etc/init.d/

And we're done! We can see if it worked:

root@edison:/etc# reboot

For more such intel IoT resources and tools from Intel, please visit the Intel® Developer Zone


Digit caters to the largest community of tech buyers, users and enthusiasts in India. The all new Digit in continues the legacy of as one of the largest portals in India committed to technology users and buyers. Digit is also one of the most trusted names when it comes to technology reviews and buying advice and is home to the Digit Test Lab, India's most proficient center for testing and reviewing technology products.

We are about leadership-the 9.9 kind! Building a leading media company out of India.And,grooming new leaders for this promising industry. Protection Status