DTH11 sensor with relay

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 7.

Moderator: Benj

Post Reply
Artis
Posts: 10
Joined: Mon Jan 19, 2015 10:59 pm
Has thanked: 1 time
Been thanked: 1 time

DTH11 sensor with relay

Post by Artis »

Hi can someone know how to connect relay to DTH11 sensor temperature readings. I added my flowcode file, in it in decison "relay ieslegsanas" i want to input "str>28" but its give me error. i think is becauce i should change str to bite. But when i do that my sensor readings aren't fine.
Attachments
DHT11_Strada.fcfx
(11.13 KiB) Downloaded 262 times

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: DTH11 sensor with relay

Post by Benj »

Hello,

This should hopefully help. I use the strings to send data to the LCD and then read the temperature value again but this time as a whole number rather than a string. This way I can make the comparison directly on the value.
DHT11_Strada.fcfx
(11.52 KiB) Downloaded 267 times
You could add some hysteresis to stop the relay from oscillating on and off like this.
Hyst.jpg
Hyst.jpg (33.06 KiB) Viewed 3164 times

Artis
Posts: 10
Joined: Mon Jan 19, 2015 10:59 pm
Has thanked: 1 time
Been thanked: 1 time

Re: DTH11 sensor with relay

Post by Artis »

Thanks it's help a lot.

Post Reply