First off I want to apologize if I come of as incompetent at all. I'm a second year mechanical engineering student who was put in a position to run the electrical engineering portion of a project. I know very little about circuits and programming and could really use some help.
I need to come up with a circuit that can open/close a window based on certain information. The circuit is required to have two temperature sensors (for inside and outside) and two humidity sensors. Luckily this project only needs to prove a concept so the sensors don't need to be inside or outside or even far apart. They just have to work.
For the temperature sensors I did some research and decided to use two DS18x20 since there's a nice tutorial with example code on the playground.
I'm not sure what kind of humidity sensors so use yet. Any suggestions would be appreciated.
To determine whether the window is open or closed, I had an idea that a potentiometer can be hooked up in such a way that the motor that controls the window can also move the potentiometer. This way the program can stop powering the motor after certain values are reached. Also the circuit can determine exactly how far open the window is.
So far I figured most of the program that determines whether to open or close the window can be written with lot of if, then, and else statements.
The one thing I'm not sure how to do yet is how to write a program to read the analog inputs. I read the analogRead page but was still a little confused.
Also what would be the best way to go about hooking up DC motor to the circuit? I'm still in the process of researching this and any help would be greatly appreciated.
Some other features I would like to include but wouldn't care to much if I don't get around to them:
An override switch or button. When this is switched on the window can be opened manually.
An LCD display that would just display the readings from the 4 sensors.
Some way to hook up the sensors wirelessly.