Hi, i'm trying to do a sketch that when receive string with 3 value R,G,B, it put the value on three pwn pin so that i could change the colors of my led strip with any browser. the sketche work like a charm, value is correctly displayed in the serial monitor but as soon as i put in the code the three analogWrite, it freeze.

//Michael sketche//Arduino server for 8 relay, stove and RGB led strip//for use with IDE 1.0//open serial monitor to see what the arduino receives //address will look like http://192.168.1.102:84 for the ledserver//address will look like http://192.168.1.102:85 for the relayserver//for use with W5100 based ethernet shields

Serial.begin(9600); Serial.println("Arduino starting"); // so I can keep track of what is loaded if (Ethernet.begin(mac) == 0) { Serial.println("Failed to configure Ethernet using DHCP"); // no point in carrying on, so do nothing forevermore: while(true); } else{ Serial.println("Ethernet ready local IP:"); Serial.println(Ethernet.localIP()); } // give the Ethernet shield a second to initialize: delay(1000);}

yes i'm able to compile it, as soon as i send a http request and i compile it with the analogwrite, it freeze. but if the analogwrite isn't there, it's ok and i'm able to see the three value r,g,b in the serial. the rest of the sketches work like charm.

Yes i use the ethernet shield, Don't know how to extract the rgb value without using the string, cause when the server receive a data, it look like (get/ 255,255,255 / HTTP1.1) So could you point me on how to extrat 255,255,255 and put them individually to r = 255 g = 255 b = 255 without using string.

So could you point me on how to extrat 255,255,255 and put them individually to r = 255 g = 255 b = 255 without using string.

Use c-strings (not Strings) and the standard 'C' runtime library functions to manipulate them. The Arduino runtime environment includes a reasonably complete AVR 'C' runtime library and the Arduino reference section contains a link to the AVR documentation for it. The functions you want are declared in string.h. Since these standard 'C' runtime library functions are common to a huge number of platforms, there is an enormous quantity of documentation and tutorials on the internet explaining how to use them. To give you a start, the strtok() function lets you divide a string into tokens separated by defined characters, and there are many functions such as atoi() to parse a numeric string into the corresponding number.

I only provide help via the forum - please do not contact me for private consultancy.