Input vulue into string

Hello,

I dont think the topicname is a good one, but I cant think a better one.

I can rotate a Dynamixel through ethernet with the ethernet shield.
Now I want to change the speed, position and PID values through ethernet.

I think it can work by:

Example speed
Speed Value -> input field -> into string -> StrContains(HTTP_req, "Speed-value") -> read string speed-value convert to int value -> 
Dynamixel.servo(SERVO_ID,0x3FF,speed_val); // Dynamixel go to IN-position

I rewrite the code this Ethernet tutorial: Arduino Webserver Input and Output

I tried:
Save input values into string and than read them in the arduino sketch with:

if (StrContains(HTTP_req, "speed")) {
speed1 = StrContains(HTTP_req, "speed")
 Dynamixel.servo(SERVO_ID,0x3FF,speed1);
}

Without any luck.
Does someone know a way to put those values into the StrContains(HTTP_req, "speed") string and read the value into the arduino sketch?

Thanks in advance.

arduino_sketch.txt (9.9 KB)

sd_card_htmlindex.txt (7.06 KB)

Does someone know a way to put those values into the StrContains(HTTP_req, "speed") string and read the value into the arduino sketch?

The StrContains() function determines if a string contains some substring. You would want to make sure that the string in HTTP_req contained the substring "speed". The return value from the call is 0 if the string is not found, and 1 if it is.

Using the return value as the speed is incorrect.

The HTTP_req string is populated from the GET request, which contains name=value pairs for each named item on the form. So, you need something on the form named speed. The value (in the text field?) will be taken from the form item.