DHT11 with Arduino and powerswitch tail 2

Hey guys, i needed some kinda direction on my project.

What my project is about: I'm using a sensor called DHT11, it measures temperature and humidity percentage. I'm using it to control my humidifier with the help of a relay called the powerswitch tail 2. I'm also using an LCD to display the output. The LCD will show the temperature in Fahrenheit and the humidity percentage.

What i have done so far: I have a code for the DHT11 and it's working I have a code for the LCD and it's working I bought a powerswitch tail 2 (this is a relay)

what i want to know: do I need a separate code for the powerswitch? If I do where can I find one? And also, to prevent my humidifier from turning on and off too often I understand I need to have hysteresis in my code, however I'm not sure if it's supposed to be included in the DHT11 code or the powerswitch code(assuming there's a code needed for the powerswitch)

Any help will be appreciated.

You need to write the code to include anything you want....

In principle you turn a relay on and off by telling a digital pin to go high or low.

As for hysteresis what you would do is look to turn on the relay at one level of humidity and turn it off after it has got above your desired humidity not precisely on it. Then turn it back on when it is a bit below not just below.

you could start here - http://playground.arduino.cc/Main/DHT11Lib - and merge in the rest