A microwave oven and a method of controlling the same that is capable of detecting
the respective positions of heaters using detectors for which a number thereof
is less than a number of cooking modes. Cooking is performed with the heaters in
respective horizontal positions in a cooking mode in which cooking requiring the
heaters to heat food is performed, while cooking is performed with the heaters
positioned in the respective initial positions in a cooking mode in which the cooking
not requiring the heaters to heat the food is performed. Each of the detectors
is a micro switch operated by a cam. Accordingly, in the microwave oven and in
the method of controlling the same, the number of the detectors to detect the respective
positions of the heaters is decreased. Further, an electrical wire is connected
to a single micro switch to detect the respective positions of the heaters.