First, thanks in advance for any help.
Can anybody out there recommend any good reading about the Uno+Ethernet shield? I'm running into very sporadic behavior even with very basic sketches/configurations. Example: I have a sketch that connects to a server every 30 seconds. My servo spits out very simple output and I know the server is responding exactly the same way every single time. Now, the Arduino sometimes fails to connect and hangs (say ever third time). Eventually, it fails to connect and retries, in which case it normally works. But it seems random, and not very reliable. Ideas? Info to read? Tips?
Originally, I created a RESTful API for the data that I'm serving from my web server, but I couldn't find anything that'd make parsing an XML string or JSON/etc very easy on Arduino, so I switched to simply outputting a single line. I started with the example sketch for Ethernet, and basically am reading one character at a time. Unfortunately, the header data is part of the response. In order to get the data I want (an integer, 0-99) I need to set some sort of flag in my output so I know where to stop simply looping over characters and start recording them. So my server outputs something like !$!$:4: - when I encounter a ! character I then check if the next character is a $ and then if the next character is a ! and so fourth, until I get to the : then I start keeping the values until I hit the : character. This works, but is something of a pain and not very scalable... Is there any great way to do this that's better/cleaner/etc?
Stupid question: what about ignoring header data? Is there any functionality in place that would allow me to automatically skip over header data to get to the actual response only? That would solve my problem, as I'd just need to look at the body of the response. Again, my return type is just text, and I can control my server headers to some extent.
Thanks for any help, I really appreciate it!