Let's Make Robots!

best way to connect arduino to internet

Hello so my question is what is the best way to connect an arduino to the internet without an ethernet shield.

I tried using PHP but i dont get it. Like how do you use a PHP script with HTML and how to send that to the arduino

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

I would suggest setting up either a computer or a smartphone (Android) as the client to the web server. This would do all the communication between the web server and the phone. Then the phone or computer would talk to the aduino. So what you need to first setup is to program an App that communicates with the aduino and then program that App to communicate with a web server. App to web server should be easy. App to aduino is the first obsitcle you should try to do. Google does officialy support Aduino for Android accessories. 


You need to setup the Aduino as a client. Probuably the easiest way to have an Anduino communicate with a server is via telnet. Your first issue though is how are you going to physicaly communicate with the server. This will require more hardware than a standard Aduino. Some options are an ethernet, bluetooth, WIFI, or use the aduino USB cable directly connected to the computer. I personally have done the bluetooth route to a local computer not a web server. Basicly, via telnet I was able to send text to the aduino and have text sent back as well. Here is some resources.

Ethernet Example


You also may want to look at the software serial library. I used it to transmit over bluetooth without having to use the Aduino's built in serial.


Also, if you want to have your server run PHP code and telnet look into PHP sockets. You can technically connect to a web server via telnet but http headers will give you a headache. Good luck.

Oh wow thanks alot im using bluetooth serial as well but for the telnet example do you need the ethernet sheild. and since we are doing the same thing can you send the refrerence links you used.

I was actually doing telnet over bluetooth between the Aduino and a Mac. No software to install and pretty easy. You have to first pair the Aduino bluetooth to the Mac which is done the same way any other Bluetooth item. Hopefully the bluetooth module you have came with some instructions on the pass code. Most likely it is 0000. After that through a terminal in OSX you can do the following.


If you are on a windows box I think you will need to install a telnet client. Also, here is some quick Aduino code that receives the character you send it and then sends it back with some extra text. I have the bluetooth module installed on pins 8 and 7 and am using the software serial library.


My next test when ever I get around to it will be to write a simple Android app to connect to the aduino over bluetooth and then maybe try to do it over USB as well. USB I am guessing will be much more complicated communication since you have a USB host and client situation. Also, not all android hardware can act as a USB host.

Windows has always had a telnet client built in, and server too however on windows Vista and newer the server is disabled by default (you can go to add and remove programs/Programs and features, then click "Turn windows features on or off" in order to enable it again). I'm not sure if the client is enabled by default but I know it can be enabled/disabled from the same area as the server (infact its the option above the server entry).

You then simply type telnet into cmd.

Failing that, I use PuTTY for SSH onto my raspberry pi, I think that also supports telnet. 

I am sincerely sorry i didnt mean to insult you guys.

I tried many things but they didnt work.

What i finaly want to acheive is to control a robot from online.

But right now i am just trying to learn how to blink a led.

that you gave us no info to work with.
What have you tried?
What didn't work?
Did you get any error messages?
What was the expected behaviour and what did it do?


The problems were I used phpserial but when i used it. I could tell there was a connection since once i started the php program the pin 13 led blinks more than 10 times really fast. When its only supposed to blink once.

How about posting your tested code?
Have you tried it through the Serial Monitor?


You provided very little information. And then, you shot down all the help that has been offered so far. I believe you need to become more adept at explaining your situation.