Using CC3000 Wifi Shield as Client

Hi there.
i am using an Arduino Mega connected with an Adafruit CC3000 Wifi Shield for my project.

  1. is it possible that as a client, my wifi shield try to connect to a localhost browser(a html file on my desktop i.e file:///C:/Users/user/Desktop/gabung%20wifi/Interface/fyp.html) instead of a www server. how do i change the programming to connect to that specific location?

  2. i intend to use the client.read functionality to read a variable value from the html file. i save the file as a div id=“value”. how do i get the client.read to get that value, coz from the example that i’ve encountered, i only found that most of them put a “<” before a client.read.

thank you for your reply. :smiley:

  1. is it possible that as a client, my wifi shield try to connect to a localhost browser

No. You can use the Arduino as client to execute a script on a server. It can NOT get the data that a browser has rendered. That would be like trying to read the data that is on my screen. That is not going to happen.

a html file on my desktop i.e file:///C:/Users/user/Desktop/gabung%20wifi/Interface/fyp.html

The Arduino can execute scripts on a server, or can get static files from the server.

instead of a www server.

You clearly do not understand what the localhost name means. It tells the browser (a client) that it is to talk to the machine that the client is running on as the server. There is no “instead of” about it. The server has a name. Clients on other computers need to know the name. Clients on the same computer don’t need to know the name; they can use localhost instead.

how do i change the programming to connect to that specific location?

If you are able to use the localhost name, that means that the machine the client (a browser, for instance) is running on is running server software, such as IIS or Apache. If the server has published an IP address and name, DNS can return the IP address for the name. If the server has not published an IP address and name, then the only way to access the server is bu knowing the IP address.

how do i get the client.read to get that value, coz from the example that i’ve encountered, i only found that most of them put a “<” before a client.read.

No idea what you are talking about. Posting some code might help.