Sketch to control two ventilation fans connected to a heat recovery unit that is ducted to all of the bedrooms and bathrooms. Fresh air is warmed by the stale air extracted from the bathrooms and then fed into the bedrooms. 4 DHT11 sensors, one in each duct. Stale air humidity and temp is used to calc dewpoint and that is used to control the fan speeds. Intake disabled if below freezing to avoid the heat recovery unit freezing up. Data logged to serial which is connected to a bluetooth module and fed via Node-red to thingspeak.com
ChangeLog - Changed wiring to have just trickle for inFan to bedrooms. Trickle or full for outFan - Changed frost temp - Implemented count when slowing down so that I have continuous readings - Reset added for freeze flag - Output freeze flag and fan status in log - Changed log to JSON format - Added fan status , frost vars to log - Changed JSON format to match IBM IoT format - constrained dew from 10-21 to ensure fan speeds only increase in that range