I have always wanted to create a home automation system around sensors to make more easy process like see temperature , humidity or if there was some movement in the room, to I switch the lights without having to enter blindly searching the switch to turn on.
So I've decided to start a basic project. The project consists of a temperature sensor and LED which simulate the relay to switch the lights of the room on/off.
The sensor and led communicate with an arduino mega and then the Ethernet shield get the info and send using UDP packet to Java program i wrote.
Sorry for the quality of video i have not a good equipment
First we connect the temperature sensor in A3 analog pin.
Then set in breadboard the led with the resistors and connect them in the pins 13,12,11 Pins.
Sorry i cant find image for the DHT21/AM2301 sensor and put another
First download the DHT library from hear [Download]
Download Java files from hear[Download][Download]
Arduino files from hear [Download]
Open the sketch UDPClient. put the mac of Ethernet shield an IP Andress and a port
Upload the sketch to the arduino.
Make a project name UDPClient in netbeans or any of the IDE you know to use.
Then copy the two Java files in the Java project you make. In Java class Panel set the Arduino IP address and the port of arduino
Now youare ready to run the Java program you can open the led1 led2 and led3 and for temperature is the analog button :)
If you liked my project, please vote for me :)
I try to make an automation room with android phone and arduino, An excerpt from one of the project prepare you can see in the video.