Controlling some devices with Android ( LED test )

Hello guys !

I am an electronic engineering student and i am finishing my studies, but i need to present a project as a final subject. It consists in controlling some devices ( TV , air conditionating , ... ) with an Android device via WIFI, this is the main project.

For introducing me to Arduino and controlling it via WIFI, my teacher asked me to work in a minor project where :

1) I should make a LED blink via WIFI and print in a server the LED status (On/Off), so i thought in working it based in an example of a WebClient from the WiFly library i downloaded from Internet.

2) I should make the LED On / Off by pressing a button on a Internet page.

Material i am using in this project:

But i am having some issues with it, so far i just did this for the first point of my minor project, but i don't know how to create my own server to test if it is print the LED status.

// (Based on Ethernet's WebClient Example)

#include "WiFly.h"
#include "Credentials.h"

byte server[] = { 66, 249, 89, 104 }; // Google

int led=13;

//Client client(server, 80);

Client client("", 80); // not my server

void setup() {

  if (!WiFly.join(ssid, passphrase)) {
    Serial.println("Association failed.");
    while (1) {
      // Hang on failure.


  if (client.connect()) {
    client.println("GET /search?q=arduino HTTP/1.0");
    pinMode(led, OUTPUT);
  } else {
    Serial.println("connection failed");

void loop() {
  if (client.available()) {
    char c =;
    digitalWrite(led, HIGH);
    client.println("The LED is On");
    digitalWrite(led, LOW);
    client.println("The LED is Of");
  if (!client.connected()) {
#ifndef __CREDENTIALS_H__
#define __CREDENTIALS_H__

// Wifi parameters
char passphrase[] = "mypassphrase";
char ssid[] = "myssid";

After having some issues with the module i could configure it following this link (

I would appreciate any help.