Trouble posting DHT data to webpage, solved.

Hello, (cleaning up this thread, I made some mistakes along the way)

Was: having trouble displaying the data from a DHT22 on the webpage my arduino serves, despite the data showing on the serial monitor.

I tried various iterations of print commands for (t) and (h) under the webserver area, saving iterations of the sketch as I went, due the amount of things I was testing, as I was researching.

And with 14 more hours today, I solved this!

Finally, I was able to get all the DHT data to post with the i2c relay buttons, and used a meta refresh to keep the data streaming live, while NOT affect the outputs of the relays. Achieved this by declaring my t/h variables in the void "serverCmd" area, AND, using server.print (variables) nested inside the GET area.

It was pretty tough to figure out, learning as I went, but I am happy with I have done so far.

Darren

It looks like you are using POST for your HTTP.

HTTP Made Really Easy may help to explain what makes POST work

I'd be inclined to be a little more liberal with your use of the F() macro, and retest.

#define DHTPIN 0     // what pin we're connected to

On some Arduinos pin 0 is the hardware serial RX pin.

Can anyone help?

No, but you could help yourself to get help by posting your code.

I can see the code in the original post but I can't see the code that "Every time I try a different command, or line of code relating to getting my readings to show up on the page I get an error verifying the code, saying "error: expected ',' or ';' before...." and so I try adding and removing and " and ' and nothing works."

I still can't see any code.

Update: Cleaned up the first post, includes successes.

This project already serves a simple webpage with buttons to control some i2c relays, but the issue I was having, was to print the DHT data to the page along side the relay buttons, whether above, below or the side I didn't really mind.