leds.cpp:1:79: error: LED.h: No such file or directory ( where is LED.h to download ? )
leds:4: error: missing terminating " character
leds:5: error: missing terminating " character
leds:5: error: expected primary-expression before '<' token
leds:5: error: 'form' was not declared in this scope
leds:5: error: expected ',' or ';' before 'method'
leds:17: error: expected primary-expression before '}' token
leds:17: error: expected ',' or ';' before '}' token
leds:17: error: expected declaration before '}' token
I use Arduino Uno + Ethernet Shield ( with MiniSD ) + Arduino 0022
Hey, I'm quite new to the Arduino and the Ethernet shield but I managed to find you the link where you can download the LED.h library. they have instructions on how to put the library in and there is a sample code for you to try out. I don't know if this is going to fix your problem but at least you have the library. (Arduino Playground - LED Library)
sketch_mar26a.cpp:1:17: error: LED.h: No such file or directory
sketch_mar26a:46: error: 'LED' does not name a type
sketch_mar26a:47: error: 'LED' does not name a type
sketch_mar26a:48: error: 'LED' does not name a type
sketch_mar26a:49: error: 'LED' does not name a type
sketch_mar26a.cpp: In function 'void loop()':
sketch_mar26a:84: error: 'class String' has no member named 'append'
sketch_mar26a:89: error: 'class String' has no member named 'contains'
sketch_mar26a:91: error: 'led1' was not declared in this scope
sketch_mar26a:97: error: 'class String' has no member named 'contains'
sketch_mar26a:99: error: 'led2' was not declared in this scope
sketch_mar26a:105: error: 'class String' has no member named 'contains'
sketch_mar26a:107: error: 'led3' was not declared in this scope
sketch_mar26a:113: error: 'class String' has no member named 'contains'
sketch_mar26a:115: error: 'led4' was not declared in this scope
sketch_mar26a:122: error: 'class String' has no member named 'contains'
sketch_mar26a:124: error: cannot convert 'String' to 'char*' for argument '1' to 'char* strcpy(char*, const char*)'
You're going to have to tell us what about it doesn't work.
By "working" you have in your mind some observable sequence of events, so you need to tell us how what you actually observe differs from that.
sketch_mar27b.cpp: In function 'void loop()':
sketch_mar27b:83: error: 'class String' has no member named 'append'
sketch_mar27b:88: error: 'class String' has no member named 'contains'
sketch_mar27b:96: error: 'class String' has no member named 'contains'
sketch_mar27b:104: error: 'class String' has no member named 'contains'
sketch_mar27b:112: error: 'class String' has no member named 'contains'
sketch_mar27b:121: error: 'class String' has no member named 'contains'
sketch_mar27b:123: error: cannot convert 'String' to 'char*' for argument '1' to 'char* strcpy(char*, const char*)'
OK, so we still don't know whether or not your shield actually works.
If you open your IDE, and go to "file"/"examples"/"Etherenet"/"Web server", and compile and upload that, what happens?
(BTW "doesn't work" on this forum is taken to mean "I have correctly compiled and uploaded a sketch, but it doesn't appear to do what I expect", not "it doesn't even compile")
/*
* Web Server
*
* A simple web server that shows the value of the analog input pins.
*/
#include <Ethernet.h>
byte mac[] = { 0x0, 0xCE, 0xA5, 0xED, 0xF0, 0x0D};
byte ip[] = { 192, 168, 0, 64 };
Server server(80);
const int buttonPin = 2;
const int LEDpin = 13;
void setup()
{
Ethernet.begin(mac, ip);
server.begin();
pinMode (buttonPin, INPUT);
digitalWrite (buttonPin, HIGH);
pinMode (LEDpin, OUTPUT); // probably not needed
}
void loop()
{
digitalWrite (LEDpin, digitalread (buttonPin));
//or maybe digitalWrite (LEDpin, !digitalread (buttonPin));
Client client = server.available();
if (client) {
// an http request ends with a blank line
boolean current_line_is_blank = true;
while (client.connected()) {
if (client.available()) {
char c = client.read();
// if we've gotten to the end of the line (received a newline
// character) and the line is blank, the http request has ended,
// so we can send a reply
if (c == '\n' && current_line_is_blank) {
// send a standard http response header
client.println("HTTP/1.1 200 OK");
client.println("Content-Type: text/html");
client.println();
// output the value of each analog input pin
for (int i = 0; i < 6; i++) {
client.print("analog input ");
client.print(i);
client.print(" is ");
client.print(analogRead(i));
client.println("
");
}
break;
}
if (c == '\n') {
// we're starting a new line
current_line_is_blank = true;
} else if (c != '\r') {
// we've gotten a character on the current line
current_line_is_blank = false;
}
}
}
// give the web browser time to receive the data
delay(1);
client.stop();
}
}