Internet Controlled Arduino (no Ethernet Shield)




Ethernet Shields are a lot of fun, but they can be expensive. In this project I will show you how to control your Arduino from any computer that is connected to the internet, without using an Ethernet shield. This project is completely free, assuming you already have an Arduino.

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: Ingredients:

  1. An Arduino with USB cable
  2. Internet Connected Computer
  3. Web Hosting with php support (I use for free)
  4. Processing App (Which you can get here )

Step 2: Getting Started: Arduino Part

This is where we add the functionality we want to the Arduino. This part is very similar to setting up a simple Arduino project; the difference is the input the arduino receives.

Set up an arduino sketch that does whatever you like upon receiving the input of a certain character from the serial port. This is done by starting the serial conversatin with Serial.begin(9600); in the setup. Then in the loop if (Serial.available() > 0) checks for serial input and; returns a string of input text. The example I will refer to throughout opens and closes my blinds for me. You can see that my Arduino will open my blinds upon receiving the character 2 and will close them upon receiving the character 1.

Step 3: The Internet Side

In this step we will create a webpage that takes user input, and using that input edits a text file on the server.

The website does not not to be complex, it just has to take some input and send it back to the server for processing. The easiest way to do this is with a get request. When making the form to receive the input, define method as "get".

My whole HTML consists of just a form.

The form is submitted back to my page itself, and is handled my the PHP. This is where the magic happens. If it receives a get request, it opens my file Blinds.txt on the server. When it opens the file in the "w" mode it deletes everything in the file and then writes whatever you tell it to on the blank file. I have mine write either a one or two, then replace it with a zero after five seconds. The delay comes from sleep(5);. I have the number, either one or two, written the the file from only five seconds because I am sure that my Processing app can detect the change during that interval. I reset it to zero afterwards because otherwise, if I want to open my shades twice in a row, the second time I updated Blinds.txt my processing app wouldn't see any difference and therefore wouldn't do anything.

Step 4: Put It Together With Processing

Processing is a useful little tool that comes in handy when interfacing the Arduino with the computer (among other times).

The point of the processing app is to retrieve the data from the text file on your server and feed it, through the serial port, to the Arduino. To send the data we need the processing serial library. To start we set up the serial port at the same baud rate as we set the Arduino (9600). In the draw loop we begin by retrieving the data from my text file using loadstrings("url"); which returns an array of strings, each element being a line of text from the document. I then parse the array element into an int so it is a primitive instead of a reference variable, and I can compare its value. After waiting a second I retrieve another value and if they are different I know that something has happened and I need to tell my Arduino, so I send the data using ComPort.write(data);. I also test for nullity throughout so I do not accidentally pass on misread data.

Step 5: Test It Out!

  1. Make sure your Arduino is plugged into your computer
  2. Upload Arduino Sketch (You cannot do this while your processing app is running).
  3. Run Processing app
  4. Go to your website and submit your forms!

2 People Made This Project!


  • Made with Math Contest

    Made with Math Contest
  • Multi-Discipline Contest

    Multi-Discipline Contest
  • Robotics Contest

    Robotics Contest

59 Discussions


Question 1 year ago

Blinds.txt? is it the php file or what? thank you for the answer :)


4 years ago on Introduction

Here is the Code(if anybody wants) :D


"int led =13;

void setup() {




void loop() {

if (Serial.available()>0){




else if(Key==2)


void Open(){

digitalWrite(led, HIGH);



void Close(){

digitalWrite(led, LOW);



Processing "

import processing.serial.*;

Serial ComPort;

String input[];

void setup(){

String portName=Serial.list()[0];

ComPort = new Serial(this, portName,9600);



void draw(){

input =loadStrings("site");


String s_last=input[0];

int last =Integer.parseInt(s_last);


input =loadStrings("site");


String s_current=input[0];

int current =Integer.parseInt(s_current);







HTML + PHP"<?php

if($_GET["action"] !="0"){

$myfile = fopen("Blinds.txt", "w") or die("Unable to open file!");

if($_GET["action"] =="close"){


}elseif($_GET["action"] =="open"){





$myfile = fopen("Blinds.txt", "w") or ("Unable to open file!");







<form method="get">

<input type="radio" name="action" Value="open" > open


<input type="radio" name="action" Value="close" > close


<input type="submit">




9 replies
Josiah J.Uneohearted

Reply 2 years ago

Please be thorough I like your work but it is so hard to follow.

What codes are for arduino sketches?

create them and keep them for us.

What html or whatever php goes to the web host?

create them and keep it for your fans.

What code goes to processor?

Create these files and be explicit on how to set them up.

do you need a data base or whatever.

In your displayed codes there are string identifiers that act up during compilation. The quotations mark might not be necessary if not needed in the code don't use them. EVERY ONE DOESN'T UNDERSTAND CODES.

Thanks when my grandma can use this then I know you have done a good job.

Thanks again.

hj.html is the place that you are getting the data from. This file should consist of just a number, nothing else. It looks like it contains more than that. Maybe you accidentally have your webpage saved as hj.html.

It looks like the first line of hj.html is <?php which would mean that that file is your webpage. You should have your php in hj.html write the data to a file, say "info.txt" and then your processing would say input = loadStrings"info.txt". Also don't forget that if your page is on the web you need the whole address (


Reply 4 years ago on Introduction

hi i use you code ,,, arduino part was fine but getting error in processing "arrayindexoutofboundsexception-0" will you please helm to solve it


Reply 4 years ago

You get this error when the list of serial devices is null - so your Arduino is not being seen. Try resetting it and restarting it, or maybe you have the serial monitor open on your Arduino.


2 years ago

i need help
iam using a teensy 3.2 board and and using this board and a temp ,humidity sensor we have done a task to check the temp an humidity of a room......we have displayed it can i upload it to a web page without using ethernet shield


4 years ago on Introduction

sorry. noob here. On the Internet side, are those two separate files? an .html file and .php file? I have the form working, but when I submit, the txt file doesn't get updated. I have both files in the same place, and php is running on my server...

2 replies

Reply 2 years ago

I'll challenge christoperq for the noob crown....

I tried for quite awhile to make this work with the php code inside the html file until I finally realized the html code has to be inside a php file :)

In my example they are the same file. If you have them as different files, the html form should look like <form method="get" action="yourPHPfile.php">


2 years ago

Somehow it doesn't update the Blinds.txt on my server...

I made a blinds.html and it's running fine. But it seems like it doesn't or is not allowed to rewrite the file.txt.....

1 reply

Reply 2 years ago

change the chmod values for the "Blinds.txt" file in your ftp server


2 years ago

what do you mean by the processing app is it like XAMPP or something different app


2 years ago

i have aproblem with step 3

please can you help me?

chat with me on facebook

Muhannad Maher


3 years ago


When I push the button the file gets updated but it doesn't seam that "Processing" understands it.

When i open the file manually on my website server and change the number in the text file and save it, it works.

Someone know how to fix it?