### Arduino Hints

A few hints gathered while experimenting with the Arduino's.
Arduino Current
http://playground.arduino.cc/Main/ArduinoPinCurrentLimitations
For the various LED experiments, a current of 20mA has been used and 2.1V for the LED.
Ethernet Shield SD card enable
Below statements are important, else the SD card can not be used (copy and past in your code)
// IMPORTANT else this experiment will not work
pinMode(53, OUTPUT); // change this to 53 on a mega
pinMode(10,OUTPUT); // pin 10 must be left as an OUTPUT so it can be set HIGH
digitalWrite(10,HIGH); // pin 10 needs to be put HIGH to explicitly deselect the WiFi HDG104 chip[code]
digitalWrite(4,LOW);
Ethernet Shield SD card disable
The Ethernet chip and SD card are accessed using the same SPI bus.
If the SD card is not used then remove the card or disable pin 4:
pinMode(4, OUTPUT);
digitalWrite(4, HIGH);
Ethernet Shield HTTP Request Response
If a HTTP GET request is made, a standard response looks like:
EthernetClient client = server.available(); // try to get client
if (client) {
// ...
// Send a standard http response header (200 means ok).
// Important = The blank line after Connection close is a must else response will fail.
client.println("HTTP/1.1 200 OK");
client.println("Content-Type: text/html");
client.println("Connection: close");
client.println();
// ...
Note:
List of HTTP Response Codes: http://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml
LCD Shield
Reference: http://www.arduino.cc/en/Reference/LiquidCrystal

Changed: , Category: Arduino, File: T6C161M1199.htm, ID: 1199