Controlling Appliances connected to Outlet w/Beam Sensor

Hi, I'm a beginner on using Arduino Microcontroller , I just wanna ask how should i make use of my arduino microcontroller to control the outlet . This is for our Thesis in Software Engineering I wanna ask the Proper codes, as well as the Beam Sensor. It would make a LOT HELP thankyou in Advance! :) I got 1 Arduino M.Controller and 2 Pairs of Beam Sensor and a 24V of Relay. Thankyou in Advance for the KIND HELP! :)

Logic of our Project:

"Automatic Switch for Light & Air Conditioner in offices w/Sensor"

The Lights & all appliances will be Open as soon as the 1st person goes inside the Room and Turn off all the appliances except for the Computer as soon as the room got zero (0) Person on it.

--THANKYOU SO MUCH! :)

You want someone else to write the code for your thesis in Software Engineering? I would have thought for a Software Engineering course, you would need to engineer the software.

If you have written something, and need help with it, then post it and we'll see what we can do.

What happens when two people enter the room together? What happens when one person stands in the doorway? What happens when someone crawls under, or steps over, the light beam to enter or exit the room?

Writing the code for the project is about an hour’s worth of effort. Getting the position of the sensors so that they can’t be cheated/bypassed is the really hard part.

That hardly seems like a software engineering task, though. If it were my job, I’d go have a Pepsi while the hardware engineer worked that part out.

And, no, we won’t write your code for you. If you give us your advisor’s e-mail address though, we’d be happy to talk to him or her.

That was right the question of "what will happen if..." is right, it may be the weak side of the project..Thanks for the help and advice..

I'm really not asking for the whole codes of this project.. but, I wanna ask if there's also an identical project like ours, or ready codes for microcontroller in terms of controlling the appliances. thankyou :)

but, I wanna ask if there's also an identical project like ours

That is not a programming question. It is a Project Guidance question.

or ready codes for microcontroller in terms of controlling the appliances.

There certainly are. The digitalRead() and digitalWrite() functions will perform 90% of the work for you. The rest is just a matter of calling one in response to the output of the other.

From a programming point of view, your project is less complicated that many elementary school science fair projects I've seen.