What is the best way for Arduino to read data from a text field from a website? I have looked at various libraries and can't seem to find one that will accomplish this without a TON of extra overlap.
When the site is loaded, a single text field exists and is already populated with data (0 or a 1). I do not need to post it or anything, the text field is already populated with the data.
This is what the field looks like in HTML:
Is there an HTTP server/client or restful way of the arduino board (mkr1000) to just read that text value and store it in a variable?
A full on HTML parser would be likely be unreasonable on a low RAM device, so instead you just read the returned HTML and look for a string of text that identifies the section of interest, eg. id="bState", read on for the value that immediately follows and then extract the value.
It might be easiest for you to read the input stream line by line and search each line for the interesting stuff.
See Robin2's excellent tutorial on serial input for advice.
When I get the sketch uploaded, I get the following:
Connected to network
My IP address is: 10.0.0.26
connecting...
connected
HTTP/1.1 404 Not Found
Date: Fri, 26 Oct 2018 23:20:01 GMT
Server: Apache
Accept-Ranges: bytes
Vary: Accept-Encoding,User-Agent
Content-Length: 1699
Connection: close
Content-Type: text/html
If try the get request with as follows (change to HTTP /1.1):
client.println("GET /api/boardState?data HTTP/1.1");
I get the following message:
Connected to network
My IP address is: 10.0.0.26
connecting...
connected
HTTP/1.1 400 Bad Request
Date: Fri, 26 Oct 2018 23:33:26 GMT
Server: Apache
Accept-Ranges: bytes
Vary: Accept-Encoding,User-Agent
Connection: close
Content-Type: text/html
Since the server you are contacting will likely have multiple websites on it (all accessible through (maybe only) 1 IP address) you need to tell the server which website you are requesting to. You do that with a host header.