/* * ChickenDoor.cpp Part 1 * * Created on: Jan 28, 2013 * Author: John */ /* * Requirements/Specs/Dreams/WhatYouExpect: * This is extremely important: * Close door at night, open door at sunrise. * Motor to move door can go forward and reverse. * Limit switches exist to detect opened and closed. */ void loop() { if (sunriseDetected()) startMotorOpening(); if (sunsetDetected()) startMotorClosing(); if (openedLimitDetected()) stopMotor(); if (closedLimitDetected()) stopMotor(); if (manualButtonPushDetected()) startMotorWhichEverWayMakesSense(); }