Pages: [1]   Go Down
Author Topic: Arduino Ethernet shield and SD-Card Question  (Read 1062 times)
0 Members and 1 Guest are viewing this topic.
Wiscon
Offline Offline
Newbie
*
Karma: 1
Posts: 22
Admin whatisacnc.com
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,
I have a website that is hosted with "Hostgator" and I would like to use it with the ethernet sheild and mega2560 to switch on or off a light and was wondering if anyone has any tips to help me along. I have the Arduino live http://70.68.49.190:89 so it's port forwarded, and I have the example Sketch working so it shows the Analogue port data.
How do I write a simple sketch that works with my website rather than Twitter to interface with my Arduino and ethernet shield? Is it RSS related, so a simple .xml file?
Alternately, I have a Micro SD card plugged into the Ethernet shield it's 8gb in size, is there a way to store HTML, XML and PHP documents on it and just call them when they are needed?

Thanks for your help and time.
Rob
Logged

http://whatisacnc.com
The frustration of a CNC

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 653
Posts: 50881
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I have the example Sketch working so it shows the Analogue port data.
That would be an Arduino-as-server or Arduino-as-client sketch?

Quote
How do I write a simple sketch that works with my website rather than Twitter to interface with my Arduino and ethernet shield? Is it RSS related, so a simple .xml file?
Typically, this is done with the Arduino as server. It matters not where you connect from, then.

You appear to want the Arduino to contact your web server for information (should the light be on or off). Why is that?

Quote
Is it RSS related, so a simple .xml file?
No.

Quote
Alternately, I have a Micro SD card plugged into the Ethernet shield it's 8gb in size, is there a way to store HTML, XML and PHP documents on it and just call them when they are needed?
You call functions. You read text files.

Sending data that contains php code doesn't make sense. The PHP code is supposed to be executed on the server, so it alters the data that is sent. You can't run PHP on an Arduino.
Logged

Wiscon
Offline Offline
Newbie
*
Karma: 1
Posts: 22
Admin whatisacnc.com
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I have the example Sketch working so it shows the Analogue port data.
That would be an Arduino-as-server or Arduino-as-client sketch?

Quote
How do I write a simple sketch that works with my website rather than Twitter to interface with my Arduino and ethernet shield? Is it RSS related, so a simple .xml file?
Typically, this is done with the Arduino as server. It matters not where you connect from, then.

You appear to want the Arduino to contact your web server for information (should the light be on or off). Why is that?

Quote
Is it RSS related, so a simple .xml file?
No.

Quote
Alternately, I have a Micro SD card plugged into the Ethernet shield it's 8gb in size, is there a way to store HTML, XML and PHP documents on it and just call them when they are needed?
You call functions. You read text files.

Sending data that contains php code doesn't make sense. The PHP code is supposed to be executed on the server, so it alters the data that is sent. You can't run PHP on an Arduino.
The Sketch is just the sample one provided by with the IDE.

I do want the Arduino to contact my website so it can be updated from it, like Twitter is used.

If I call functions (text files) how?

Is RSS now xml? and isn't twitter RSS?

If PHP is server side that would work for an online Web-server to do some post processing right? Why rely strictly on the Arduino?

Can you help me with this or no?
Logged

http://whatisacnc.com
The frustration of a CNC

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 653
Posts: 50881
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
The Sketch is just the sample one provided by with the IDE.
Last time I looked, there was more than one sample provided with the IDE.

Quote
I do want the Arduino to contact my website so it can be updated from it, like Twitter is used.
Then, you want to start with an Arduino-as-client sample, and change which server it connects to.

Quote
If I call functions (text files) how?
Calling functions and reading text files are completely unrelated activities, except that reading from an SD card requires calling some functions in the SD library. Have you looked at any of those examples.

Quote
Is RSS now xml? and isn't twitter RSS?
Does it matter? What matters is what YOUR server sends out. What is your server sending in response to a GET request?

Quote
If PHP is server side that would work for an online Web-server to do some post processing right? Why rely strictly on the Arduino?
PHP is server side code. You are the one that wants to have the Arduino-as-client do something. Supposedly, that something is something that no other hardware can perform.

Quote
Can you help me with this or no?
When it is clear what you need help with, yes.

Logged

Pages: [1]   Go Up
Jump to: