In your loop function, you are calling server.accept() to check for a client connection. But then the function ends without checking whether there has been a connection attempt, and without calling the process() function to handle the connection.
Take another look at the Bridge Tutorial, and pay particular attention to the section where it describes the actions of the loop() function.
I didn't try fixing and running the code, but after a quick glance, there appears to be other issues as well:
-
You are calling the individual LED update routines, but you are still not updating the actual LED pin outputs. Instead of adding a call to the switchLeds() function that was missing in your previous version, it looks like you removed that function in this version?
-
In your analogCommand() function, all it does is try to read a pin number. It then doesn't do anything with that pin number, nor does it try to read the PWM value or update an output. There is a lot that is missing from this function before it will do anything useful.
-
There is a new function updateDC1() at the end of the sketch. It has multiple issues:
-
The function is not called from anywhere
-
It calls server.accept(), and then goes on to process the connection, but without checking whether a connection was made. This is an issue since the vast majority of the time that server.accept() is called, it will return a disconnected client indicating that no connection is in progress.
-
Since it tries to parse a 0 to 255 value, I'm guessing this is trying to parse the PWM field of your analog URL request, and the intent is to call this from the processAnalog() function. If this is the case, the server.accept() call at the beginning of updateDC1() is going to cause big problems - it will overwrite the client object you are trying to read from with a new client object, which is almost certainly going to indicate no connection (the only time it will show a connection is if you had made a second URL request in the microseconds before it finished processing the first request.) If you do happen to get a connection with that client object, it will be reading the beginning of the new URL request, not continuing on from the prior one.