Relays and Sensors and Lcd

Hi everybody.
I have connected a 16x2 LCD , a moisture sensor , a motion sensor , A 8 channel relay board and a HC-05 bluetooth module . All the wiring is correct but I don't know what the arduino sketch should be . I am using arduino Uno and I am controlling the relays with bluetooth module and android phone application (https://play.google.com/store/apps/details?id=com.app.control).Plese help me . I want to display on the lcd what is turned on/off using the relays and sensor data and whenever a phone connects or disconnects to the bluetooth module(if possible)

I don't know what the arduino sketch should be

Don't try and do everything at once. Write separate, small programs to become familiar with the components and how to use them.

Print a message on the LCD
Turn the relays on and off
Display the status of the Bluetooth connection.

How to display status connection of the bluetooth?

mushahidq:
How to display status connection of the bluetooth?

I don't know but you need to find out.

Hi mushahidq,

Have you looked if there was a library provided by the manufacturer ?
Or perhaps there is a generic library
Have you installed it ? That should be done BEFORE writing any sketch...

Also, library usually includes some easy "hello world" already made sketches which demonstrates the functionality.
I think you should look into that.

Try writing a simple message to the lcd
there are few gazilions examples/sketches if you take the time to oogle or search in the forum.

Turning the relays on and off should be as easy as the "blink" program.
You are familiar with the blink program, correct ?

To reinforce what UKHeliBob has said, you should write several simple, small programs that do simple tasks.
I have personally found the following to be quite interesting and educational in terms of programming.

http://forum.arduino.cc/index.php?topic=261445.0

dan