|
Ethernet Shield The ethernet shield allows basic I/O over an TCP/IP network. Using the SD slot If you want to use the sdfatlib library, you absolutely need the following lines in your setup to access the SD card. 01
02 03 04 05 06 // set the SS pin as an output (necessary!) pinMode(4, OUTPUT); // turn off the W5100 chip! digitalWrite(4, HIGH); // use digital 4 as the SD SS line uint8_t r = card.init(SPI_HALF_SPEED, 4); For more detailed information about this, please read the official Arduino Ethernet + SD page. Links Data exchange When exchanging data with other system, think about JSON. Your Arduino could output somthing like this: 01
{"temperature":22.70,"pressure":1002.71,"humdity":48.86,"light":91.50} Using PHP, to only state an example, you could then get and decode the data like this: 01
$data = json_decode(file_get_contents('http://<ip_of_your_arduino>'));
|