Relay 8 project, as Jon shows, with DHT22 added... trouble

The EtherTen combines an Uno-equivalent Arduino-compatible board and Wiznet-based Ethernet support, along with a microSD card slot and Power-over-Ethernet support. [Product page]
Post Reply
bigd003
Posts: 10
Joined: Thu Apr 14, 2016 2:30 am

Relay 8 project, as Jon shows, with DHT22 added... trouble

Post by bigd003 » Thu Apr 14, 2016 2:45 am

Hello! First let me say it has been a pleasure working with FreeTronics hardware so far, top notch quality for sure.

Background:
I have followed Superhouse Jon Oxer video #12, on how to build a web based home relay controller using 2x "relay 8" shields and an EtherTen. I copied the project pretty closely, omitting only the POE option (using a 9v adapter instead, and powering the relay 8 with it's own power source), and used the sketch he provided.

Where I am at:
Success! The EtherTen, relay 8's and the sketch are working just fine, which is wonderful.

What I can't figure out:
How to incorporate a DHT22 (in the form of a prewired and resistor'd AM2302 from adafruit). I have my library updated, and know to specify it, and to define the DHT pin etc., but overall, after many attempt to compile and upload the sketch, it always fails.

Can anyone help me with this? I have a working sketch, that I want to add to. I have a functional DHT22 sketch to pull code from. My goal is to simply add the Temp and Humidity sensing ability, as well as for the values to be displayed above the buttons that control the relays. I thought it would be simple, and my guess is I am missing something simple.

I can post my sketch, and DHT22 codes if anyone wants, and link to the superhouse page too. I just wasn't sure what the protocol was here.

Thanks, Darren

bigd003
Posts: 10
Joined: Thu Apr 14, 2016 2:30 am

Re: Relay 8 project, as Jon shows, with DHT22 added... trouble

Post by bigd003 » Sun Apr 17, 2016 3:59 pm

I can't get the reading from the DHT22 to show up on the web page. It reads fine, on the serial monitor I see everything I am supposed to, but the reading will not show up above the buttons on the page.

I have tried to print them there, but it doesn't seem to work.

Can anyone help?

angusgr
Freetronics Staff
Freetronics Staff
Posts: 853
Joined: Tue Apr 09, 2013 11:19 pm
Location: Melbourne, Australia
Contact:

Re: Relay 8 project, as Jon shows, with DHT22 added... trouble

Post by angusgr » Tue May 03, 2016 6:10 am

Hi Darren,

Sorry for the slow reply. If you're still having problems displaying values from the DHT22 then please post your sketch. You can use the "code" button in the new post editor to add "code tags" - put your code between them and it will format properly for the forum.

Angus

bigd003
Posts: 10
Joined: Thu Apr 14, 2016 2:30 am

Re: Relay 8 project, as Jon shows, with DHT22 added... trouble

Post by bigd003 » Mon Sep 05, 2016 2:29 am

Angus,
Hello, thank you for the reply. I wasn't aware you had gotten back to me, so now I apologize for the delay.
After some tinkering, I was able to get it to work, though it does not seem logical. My DHT reading now appear as I wanted on the webpage, but strangely the coding for this appears AFTER the closing </HTML> tag... which is so bizarre.

I was originally using the code within the server.print HTML lines, and it would not work. When I finally got crossed eye and decided to move the HTML tag, I was shocked to see the results.

I am not onto another issue, in hardware this time. I will make another post for this, in hopes that I can get some insight, as I am stumped. Again!

Aimsecu
Posts: 1
Joined: Tue Sep 06, 2016 2:47 am
Contact:

Re: Relay 8 project, as Jon shows, with DHT22 added... trouble

Post by Aimsecu » Tue Sep 06, 2016 2:56 am

Hello, This Mr. Yang from AimSecu(http://www.aimsecu.com/)

Post Reply