[Solved] Having problems with my adaptation of TinyWebServer

zoomkat:
Some test code below that shows how to capture the GET request string. Once the string is captured, it can be parsed and evaluated in many different ways. I've got some old bot code that sends values for two servo us positions that captures the ascii positions in the string then converts it into numbers for use. Fairly simple to do. With the code below you can open the serial monitor to see what the arduino server is receiving from the web page via the GET request.

After much trial and error, I have sort of gotten it to work. Using a method much like this one (see joachimp's post), I can get the value of the red LED that I entered on the web page, and get it to both print in Serial Monitor and change the brightness of the LED to this value.

The problem now is that it only works when I put in a 3 digit value (so if I wanted a brightness of 0, I would have to enter 000). If I do not do this, the Arduino crashes! Do you have an idea of how I could allow the entry of a one or two digit number?

I have attached my current .ino file, and I am going to try adding the other two values.

What I am working on now will eventually be the P, I and D gains of a PID controller, so I will have to change to float or another number type at some point!

RGBControl.ino (4.26 KB)