Gearmotor program

Write your programme to do the following
a) Manually input set points for temperature and humidity
b) Measure temperature and humidity (measured variables)
c) If measured variables equal set-point then motor drive = zero
d) If measured variables exceed set point then drive motor clockwise
e) If measured variables are lower than set point then drive motor anti-clockwise

You can add a further function in that the motor speed is set as a function of the error between setpoint and measured variables. This can be achieved by using a PWM output.

Edit : And once you have that up and running you can also introduce Integral and derivative functions so you end up with a fully operational PID controller.

As others have said you will need an H-drive

Be aware that you cannot drive a DC motor to a known position unless it has some form of position sensor fitted. If you do require predetermined positions you need to use a servo motor.